Braintree.Merchant.Account (Braintree v0.12.0)
Represents a merchant account in a marketplace.
For additional reference, see: https://developers.braintreepayments.com/reference/response/merchant-account/ruby
Link to this section Summary
Functions
Create a merchant account or return an error response after failed validation
If you want to look up a single merchant using ID, use the find method.
Convert a map into a Braintree.Merchant.Account struct.
To update a merchant, use its ID along with new attributes. The same validations apply as when creating a merchant. Any attribute not passed will remain unchanged.
Link to this section Types
Specs
t() :: %Braintree.Merchant.Account{
business: Braintree.Merchant.Business.t(),
currency_iso_code: String.t(),
default: boolean(),
funding: Braintree.Merchant.Funding.t(),
id: String.t(),
individual: Braintree.Merchant.Individual.t(),
master_merchant_account: String.t(),
status: String.t()
}
Link to this section Functions
create(params \\ %{}, opts \\ [])
Specs
create(map(), Keyword.t()) :: {:ok, t()} | {:error, Braintree.ErrorResponse.t()}
Create a merchant account or return an error response after failed validation
Example
= Braintree.Merchant.Account.create(%{
tos_accepted: true,})
find(id, opts \\ [])
Specs
find(binary(), Keyword.t()) :: {:ok, t()} | {:error, Braintree.ErrorResponse.t()}
If you want to look up a single merchant using ID, use the find method.
Example
merchant = Braintree.Merchant.find("merchant_id")
new(params)
Convert a map into a Braintree.Merchant.Account struct.
update(id, params, opts \\ [])
Specs
update(binary(), map(), Keyword.t()) :: {:ok, t()} | {:error, Braintree.ErrorResponse.t()}
To update a merchant, use its ID along with new attributes. The same validations apply as when creating a merchant. Any attribute not passed will remain unchanged.
Example
{:ok, merchant} = Braintree.Merchant.update("merchant_id", %{
funding_details: %{account_number: "1234567890"}
})
merchant.funding_details.account_number # "1234567890"