Braintree.PaypalAccount (Braintree v0.15.0)

Find, update and delete Paypal Accounts using PaymentMethod token

Summary

Functions

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()

@type 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: [any()],
  token: String.t(),
  updated_at: String.t()
}

Functions

delete(token, opts \\ [])

@spec delete(String.t(), Keyword.t()) :: {:ok, t()} | Braintree.HTTP.error()

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, opts \\ [])

@spec find(String.t(), Keyword.t()) :: {:ok, t()} | Braintree.HTTP.error()

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)

new(params)

update(token, params, opts \\ [])

@spec update(String.t(), map(), Keyword.t()) :: {:ok, t()} | Braintree.HTTP.error()

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}
)