Class: Figo::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/models.rb

Overview

Object representing one bank account of the User

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#dump, dump_attributes, #initialize

Constructor Details

This class inherits a constructor from Figo::Base

Instance Attribute Details

#account_idString

Internal figo Connect account ID

Returns:

  • (String)


135
136
137
# File 'lib/models.rb', line 135

def 
  @account_id
end

#account_numberString

Account number

Returns:

  • (String)


155
156
157
# File 'lib/models.rb', line 155

def 
  @account_number
end

#additional_iconsHash

Account icon URLs for other resolutions

Returns:

  • (Hash)


187
188
189
# File 'lib/models.rb', line 187

def additional_icons
  @additional_icons
end

#auto_syncBoolean

This flag indicates whether the account will be automatically synchronized

Returns:

  • (Boolean)


151
152
153
# File 'lib/models.rb', line 151

def auto_sync
  @auto_sync
end

#balanceAccountBalance

AccountBalance object

Returns:



199
200
201
# File 'lib/models.rb', line 199

def balance
  @balance
end

#bank_codeString

Bank code

Returns:

  • (String)


159
160
161
# File 'lib/models.rb', line 159

def bank_code
  @bank_code
end

#bank_idString

Internal figo Connect bank ID

Returns:

  • (String)


139
140
141
# File 'lib/models.rb', line 139

def bank_id
  @bank_id
end

#bank_nameString

Bank name

Returns:

  • (String)


163
164
165
# File 'lib/models.rb', line 163

def bank_name
  @bank_name
end

#bicString

BIC

Returns:

  • (String)


175
176
177
# File 'lib/models.rb', line 175

def bic
  @bic
end

#currencyString

Three-character currency code

Returns:

  • (String)


167
168
169
# File 'lib/models.rb', line 167

def currency
  @currency
end

#ibanString

IBAN

Returns:

  • (String)


171
172
173
# File 'lib/models.rb', line 171

def iban
  @iban
end

#iconString

Account icon URL

Returns:

  • (String)


183
184
185
# File 'lib/models.rb', line 183

def icon
  @icon
end

#in_total_balanceBoolean

This flag indicates whether the balance of this account is added to the total balance of accounts

Returns:

  • (Boolean)


191
192
193
# File 'lib/models.rb', line 191

def in_total_balance
  @in_total_balance
end

#nameString

Account name

Returns:

  • (String)


143
144
145
# File 'lib/models.rb', line 143

def name
  @name
end

#ownerString

Account owner

Returns:

  • (String)


147
148
149
# File 'lib/models.rb', line 147

def owner
  @owner
end

#statusSynchronizationStatus

Synchronization status object



195
196
197
# File 'lib/models.rb', line 195

def status
  @status
end

#typeString

Account type

Returns:

  • (String)


179
180
181
# File 'lib/models.rb', line 179

def type
  @type
end

Instance Method Details

#bankBank

Retrieve bank of this account

Returns:

  • (Bank)

    ‘Bank` object for the respective bank



240
241
242
# File 'lib/models.rb', line 240

def bank
  @session.get_bank @bank_id
end

#get_payment(payment_id) ⇒ Payment

Retrieve specific payment on this account

Parameters:

  • payment_id (String)

    ID of the notification to be retrieved

Returns:

  • (Payment)

    ‘Payment` object for the respective payment



233
234
235
# File 'lib/models.rb', line 233

def get_payment(payment_id)
  @session.get_payment @account_id, payment_id
end

#get_transaction(transaction_id) ⇒ Transaction

Request specific transaction.

Parameters:

  • transaction_id (String)

    ID of the transaction to be retrieved

Returns:



218
219
220
# File 'lib/models.rb', line 218

def get_transaction(transaction_id)
  @session.get_transaction @acount_id, transaction_id
end

#paymentsPayment

Retrieve list of payments on this account

Returns:

  • (Payment)

    an array of ‘Payment` objects, one for each payment



225
226
227
# File 'lib/models.rb', line 225

def payments
  @session.payments @account_id
end

#transactions(since = nil, count = 1000, offset = 0, include_pending = false) ⇒ Array

Request list of transactions of this account

Parameters:

  • since (String, Date) (defaults to: nil)

    this parameter can either be a transaction ID or a date

  • count (Integer) (defaults to: 1000)

    limit the number of returned transactions

  • offset (Integer) (defaults to: 0)

    which offset into the result set should be used to determin the first transaction to return (useful in combination with count)

  • include_pending (Boolean) (defaults to: false)

    this flag indicates whether pending transactions should be included in the response; pending transactions are always included as a complete set, regardless of the ‘since` parameter

Returns:

  • (Array)

    an array of ‘Transaction` objects, one for each transaction of this account



210
211
212
# File 'lib/models.rb', line 210

def transactions(since = nil, count = 1000, offset = 0, include_pending = false)
  @session.transactions @account_id, since, count, offset, include_pending
end