mangopay v0.1.0 MangoPay.Mandate

Functions for MangoPay mandate.

Link to this section Summary

Functions

List all mandates

List all mandates

List all mandates for a user

List all mandates for a user

Cancel a mandate object

Cancel a mandate object

Create a mandate

Create a mandate

Get a mandate

Get a mandate

Get path called

Get path called

Link to this section Functions

Link to this function all(query \\ %{})

List all mandates.

Examples

query    = %{
             "Page": 1,
             "Per_Page": 25,
             "Sort": "CreationDate:DESC",
             "BeforeDate": 1463440221,
             "AfterDate": 1431817821
}
{:ok, mandates} = MangoPay.Mandates.all(query)
Link to this function all!(query \\ %{})

List all mandates.

Examples

query    = %{
             "Page": 1,
             "Per_Page": 25,
             "Sort": "CreationDate:DESC",
             "BeforeDate": 1463440221,
             "AfterDate": 1431817821
}
mandates = MangoPay.Mandates.all!(query)
Link to this function all_by_bank_account(user_id, bank_account_id, query \\ %{})

List all mandates for a bank account.

Examples

user_id         = Id of a User object
bank_account_id = Id of a BankAccount object
query           = %{
                    "Page": 1,
                    "Per_Page": 25,
                    "Sort": "CreationDate:DESC",
                    "BeforeDate": 1463440221,
                    "AfterDate": 1431817821
}
{:ok, mandates} = MangoPay.Mandate.all_by_bank_account(user_id, bank_account_id)
Link to this function all_by_bank_account!(user_id, bank_account_id, query \\ %{})

List all mandates for a bank account.

Examples

user_id         = Id of a user object
bank_account_id = Id of a bank account object
query           = %{
                    "Page": 1,
                    "Per_Page": 25,
                    "Sort": "CreationDate:DESC",
                    "BeforeDate": 1463440221,
                    "AfterDate": 1431817821
}
mandates        = MangoPay.Mandate.all_by_bank_account!(user_id, bank_account_id, query)
Link to this function all_by_user(user_id, query \\ %{})

List all mandates for a user.

Examples

user_id     = Id of user object
query    = %{
             "Page": 1,
             "Per_Page": 25,
             "Sort": "CreationDate:DESC",
             "BeforeDate": 1463440221,
             "AfterDate": 1431817821
}
{:ok, mandates} = MangoPay.Mandate.all_by_user(user_id, query)
Link to this function all_by_user!(user_id, query \\ %{})

List all mandates for a user.

Examples

user_id  = Id of a user object
query    = %{
             "Page": 1,
             "Per_Page": 25,
             "Sort": "CreationDate:DESC",
             "BeforeDate": 1463440221,
             "AfterDate": 1431817821
}
mandates = MangoPay.Mandate.all_by_user!(user_id, query)
Link to this function cancel(mandate_id)

Cancel a mandate object.

Examples

{:ok, mandate} = MangoPay.Mandate.cancel("mandate_id")
Link to this function cancel!(mandate_id)

Cancel a mandate object.

Examples

mandate = MangoPay.Mandate.cancel!("mandate_id")

Create a mandate.

Examples

params         = %{
  "Tag": "custom meta",
  "BankAccountId": "14213351",
  "Culture": "EN",
  "ReturnURL": "http://www.my-site.com/returnURL/"
}
{:ok, mandate} = MangoPay.Mandate.create(params)
Link to this function create!(params)

Create a mandate.

Examples

params         = %{
  "Tag": "custom meta",
  "BankAccountId": "14213351",
  "Culture": "EN",
  "ReturnURL": "http://www.my-site.com/returnURL/"
}
mandate = MangoPay.Mandate.create!(params)

Get a mandate.

Examples

{:ok, mandate} = MangoPay.Mandate.get(id)

Get a mandate.

Examples

mandate = MangoPay.Mandate.get!(id)

Get path called.

Examples

"/users" = MangoPay.User.path()

Get path called.

Examples

"/users/id" = MangoPay.User.path(id)