Current section

Files

Jump to
docusign lib docusign api payment_gateway_accounts.ex
Raw

lib/docusign/api/payment_gateway_accounts.ex

# NOTE: This file is auto generated by OpenAPI Generator
# https://openapi-generator.tech
# Do not edit this file manually.
defmodule DocuSign.Api.PaymentGatewayAccounts do
@moduledoc """
API calls for all endpoints tagged `PaymentGatewayAccounts`.
"""
import DocuSign.RequestBuilder
alias DocuSign.Connection
alias DocuSign.Model.ErrorDetails
alias DocuSign.Model.PaymentGatewayAccountsInfo
@doc """
List payment gateway accounts
This method returns a list of payment gateway accounts and basic information about them.
### Parameters
- `connection` (DocuSign.Connection): Connection to server
- `account_id` (String.t): The external account number (int) or account ID GUID.
- `opts` (keyword): Optional parameters
### Returns
- `{:ok, DocuSign.Model.PaymentGatewayAccountsInfo.t}` on success
- `{:error, Req.Response.t}` on failure
"""
@spec payment_gateway_accounts_get_all_payment_gateway_accounts(DocuSign.Connection.t(), String.t(), keyword()) ::
{:ok, PaymentGatewayAccountsInfo.t()}
| {:error, Req.Response.t()}
def payment_gateway_accounts_get_all_payment_gateway_accounts(connection, account_id, _opts \\ []) do
request =
%{}
|> method(:get)
|> url("/v2.1/accounts/#{account_id}/payment_gateway_accounts")
|> Enum.to_list()
connection
|> Connection.request(request)
|> evaluate_response([
{200, PaymentGatewayAccountsInfo},
{400, ErrorDetails}
])
end
end