Class: Mollie::Balance

Inherits:
Base
  • Object
show all
Defined in:
lib/mollie/balance.rb,
lib/mollie/balance/report.rb,
lib/mollie/balance/transaction.rb

Defined Under Namespace

Classes: Report, Transaction

Instance Attribute Summary collapse

Attributes inherited from Base

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

all, #assign_attributes, cancel, create, #delete, delete, get, id_param, #initialize, parent_id, request, resource_name, update, #update

Constructor Details

This class inherits a constructor from Mollie::Base

Instance Attribute Details

Returns the value of attribute _links.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def _links
  @_links
end

#available_amountObject

Returns the value of attribute available_amount.



12
13
14
# File 'lib/mollie/balance.rb', line 12

def available_amount
  @available_amount
end

#created_atObject

Returns the value of attribute created_at.



12
13
14
# File 'lib/mollie/balance.rb', line 12

def created_at
  @created_at
end

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def description
  @description
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def id
  @id
end

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def mode
  @mode
end

#pending_amountObject

Returns the value of attribute pending_amount.



12
13
14
# File 'lib/mollie/balance.rb', line 12

def pending_amount
  @pending_amount
end

#statusObject

Returns the value of attribute status.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def status
  @status
end

#transfer_destinationObject

Returns the value of attribute transfer_destination.



12
13
14
# File 'lib/mollie/balance.rb', line 12

def transfer_destination
  @transfer_destination
end

#transfer_frequencyObject

Returns the value of attribute transfer_frequency.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def transfer_frequency
  @transfer_frequency
end

#transfer_referenceObject

Returns the value of attribute transfer_reference.



3
4
5
# File 'lib/mollie/balance.rb', line 3

def transfer_reference
  @transfer_reference
end

#transfer_thresholdObject

Returns the value of attribute transfer_threshold.



12
13
14
# File 'lib/mollie/balance.rb', line 12

def transfer_threshold
  @transfer_threshold
end

Class Method Details

.primary(options = {}) ⇒ Object



20
21
22
# File 'lib/mollie/balance.rb', line 20

def self.primary(options = {})
  get('primary', options)
end

Instance Method Details

#report(options = {}) ⇒ Object



44
45
46
47
# File 'lib/mollie/balance.rb', line 44

def report(options = {})
  response = Client.instance.perform_http_call("GET", "balances/#{id}", "report", {}, options)
  Balance::Report.new(response)
end

#transactions(options = {}) ⇒ Object



49
50
51
# File 'lib/mollie/balance.rb', line 49

def transactions(options = {})
  Balance::Transaction.all(options.merge(balance_id: id))
end