Wallet - Mangopay/mangopay2-ruby-sdk GitHub Wiki

The Wallet Object

Property Type More
Id Integer
Tag String
CreationDate Time
Owners Array
Description String < 200 chars
Balance Money Hash { Currency: 'EUR', Amount: 10 }
Currency String ISO ("EUR", "USD", "GBP", "PLN" or "CHF")

Creating a Wallet

Arguments

  • wallet: a Hash:

Returns

A Wallet Object

Example

MangoPay::Wallet.create({
  Owners: [43243],
  Description: 'A test wallet',
  Currency: 'EUR',
  Tag: 'Test Time'
})

Updating a Wallet

Arguments

  • wallet_id: the id of the hash you want to update
  • wallet: a Hash:
    • Description
    • Tag

Returns

A Wallet Object

Example

MangoPay::Wallet.update(new_wallet['Id'], {
  Description: 'Updated Description',
  Tag: 'Updated Tag'
})

Retrieving a Wallet

Arguments

  • wallet_id: the id of the wallet you want to retrieve

Returns

A Wallet Object

Example

MangoPay::Wallet.fetch(32132)

⚠️ **GitHub.com Fallback** ⚠️