Braintree v0.7.0 Braintree.PaypalAccount

Find, update and delete Paypal Accounts using PaymentMethod token

Summary

Functions

Convert a response into one or more typed structs

Delete a paypal account record using token or return an error response if the token is invalid

Find a paypal account record using token or return an error response if the token is invalid

Update a paypal account record using token or return an error response if the token is invalid

Types

t :: %Braintree.PaypalAccount{billing_agreement_id: String.t, created_at: String.t, customer_id: String.t, default: boolean, email: String.t, image_url: String.t, is_channel_initated: boolean, payer_info: String.t, subscriptions: [], token: String.t, updated_at: String.t}

Functions

construct(params)

Specs

construct(Map.t | [Map.t]) :: t | [t]

Convert a response into one or more typed structs.

delete(token)

Specs

delete(String.t) ::
  {:ok, t} |
  {:error, Braintree.ErrorResponse.t}

Delete a paypal account record using token or return an error response if the token is invalid.

Example

{:ok, paypal_account} = Braintree.PaypalAccount.delete(token)
find(token)

Specs

find(String.t) ::
  {:ok, t} |
  {:error, Braintree.ErrorResponse.t}

Find a paypal account record using token or return an error response if the token is invalid.

Example

{:ok, paypal_account} = Braintree.PaypalAccount.find(token)
update(token, params)

Specs

update(String.t, Map.t) ::
  {:ok, t} |
  {:error, Braintree.ErrorResponse.t}

Update a paypal account record using token or return an error response if the token is invalid.

Example

{:ok, paypal_account} = Braintree.PaypalAccount.update(
  token,
  %{options: %{make_default: true}
)