Skip to content
dduwoyemgp edited this page Mar 31, 2021 · 3 revisions

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'])
    1. Navigation
How to use the Gem? Available Operations
  - [Creating](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/BankAccounts#creating-a-new-BankAccount)
  - [Retrieving](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/BankAccounts#retrieving-a-BankAccount)
  • [Client](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/Client)
  • [LegalUser](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/LegalUser)
  • [NaturalUser](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/NaturalUser)
  • [PayIn](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/PayIn)
  • [PayOut](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/PayOut)
  • [Transaction](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/Transaction)
  • [Transfer](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/Transfer)
  • [User](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/User)
  • [Wallet](https://github.com/Mangopay/mangopay2-ruby-sdk/wiki/Wallet)
Clone this wiki locally