def set_provider_credit_details(provider_credit_details)
      member_details = {}
      provider_credit_details.each_with_index do |val, index|
        member = index + 1
        member_details["ProviderCreditList.member.#{member}.ProviderId"] = val[:provider_id]
        member_details["ProviderCreditList.member.#{member}.CreditAmount.Amount"] = val[:amount]
        member_details["ProviderCreditList.member.#{member}.CreditAmount.CurrencyCode"] = val[:currency_code]
      end

      member_details
    end
def set_provider_credit_details(provider_credit_details)
      member_details = {}
      provider_credit_details.each_with_index do |val, index|
        member = index + 1
        member_details["ProviderCreditList.member.#{member}.ProviderId"] = val[:provider_id]
        member_details["ProviderCreditList.member.#{member}.CreditAmount.Amount"] = val[:amount]
        member_details["ProviderCreditList.member.#{member}.CreditAmount.CurrencyCode"] = val[:currency_code]
      end

      member_details
    end
This method builds the provider credit details hash
 that will be combined with either the authorize or capture
 API call.