mangopay v0.1.0 MangoPay.Wallet

Functions for MangoPay wallet.

Link to this section Summary

Functions

List all wallets by user

List all wallets by user

Create a wallet

Create a wallet

Get a wallet

Get a wallet

Get path called

Get path called

Update a wallet

Update a wallet

Link to this section Functions

Link to this function all_by_user(id, query \\ %{})

List all wallets by user.

Examples

user_id = Id of a user
query   = %{
  "Page": 1,
  "Per_Page": 25,
  "Sort": "CreationDate:DESC"
}
{:ok, wallets} = MangoPay.Wallet.all_by_user!(user_id, query)
Link to this function all_by_user!(id, query \\ %{})

List all wallets by user.

Examples

user_id = Id of a user
query   = %{
  "Page": 1,
  "Per_Page": 25,
  "Sort": "CreationDate:DESC"
}
wallets = MangoPay.Wallet.all_by_user!(user_id, query)

Create a wallet.

Examples

params         = %{
  "Tag": "custom meta",
  "Owners": [ "8494514" ],
  "Description": "My big project",
  "Currency": "EUR"
}
{:ok, wallet} = MangoPay.Wallet.create(params)
Link to this function create!(params)

Create a wallet.

Examples

params         = %{
  "Tag": "custom meta",
  "Owners": [ "8494514" ],
  "Description": "My big project",
  "Currency": "EUR"
}
wallet = MangoPay.Wallet.create!(params)

Get a wallet.

Examples

{:ok, wallet} = MangoPay.Wallet.get(id)

Get a wallet.

Examples

wallet = MangoPay.Wallet.get!(id)

Get path called.

Examples

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

Get path called.

Examples

"/users/id" = MangoPay.User.path(id)
Link to this function update(id, params)

Update a wallet.

Examples

params         = %{
  "Tag": "custom meta",
  "Description": "My big project"
}
{:ok, wallet} = MangoPay.Wallet.update(id, params)
Link to this function update!(id, params)

Update a wallet.

Examples

params         = %{
  "Tag": "custom meta",
  "Description": "My big project"
}
wallet = MangoPay.Wallet.update!(id, params)