BankAccounts - Mangopay/mangopay2-ruby-sdk GitHub Wiki

The BankAccount Object

Attributes

Property Type
Id Integer
Tag String
CreationDate Time
UserId Integer
Type String
OwnerName String
OwnerAddress String
IBAN String
BIC String

Creating a new BankAccount

Arguments

  • user_id: The id of the User you want to add a BankAccount
  • bank_details: A hash:
    • Type
    • OwnerName
    • OwnerAddress
    • IBAN
    • BIC
    • Tag

Returns

A BankAccount Object

Example

MangoPay::BankAccount.create(78329, {
  Type: 'IBAN',
  OwnerName: 'John',
  OwnerAddress: 'Here',
  IBAN: 'FR7630004000031234567890143',
  BIC: 'BNPAFRPP',
  Tag: 'Test Time'
})

Retrieving a BankAccount

Arguments

  • user_id: the id of the user you attached the bank detail to
  • bank_detail_id: the id of the bank detail

Returns

A BankAccount Object

Example

MangoPay::BankAccount.fetch(87323, 32132)

Retrieving all the BankAccounts for a given User

Arguments

  • user_id: the id of the user you want to fetch the bank details from

Returns

An Array of BankAccount Objects

Example

MangoPay::BankAccount.fetch(new_iban_bank_detail['UserId'])
⚠️ **GitHub.com Fallback** ⚠️