Class: FidorApi::Account

Inherits:
Connectivity::Resource show all
Extended by:
AmountAttributes, ModelAttribute
Defined in:
lib/fidor_api/account.rb

Defined Under Namespace

Modules: ClientSupport

Instance Attribute Summary

Attributes inherited from Connectivity::Resource

#error_keys

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AmountAttributes

amount_attribute, attributes, extended

Methods inherited from Connectivity::Resource

all, find, #initialize, model_name, #persisted?, #reload, #save, #update_attributes

Constructor Details

This class inherits a constructor from FidorApi::Connectivity::Resource

Class Method Details

.firstObject



26
27
28
# File 'lib/fidor_api/account.rb', line 26

def self.first
  all(page: 1, per_page: 1).first
end

Instance Method Details

#customers=(array) ⇒ Object



30
31
32
# File 'lib/fidor_api/account.rb', line 30

def customers=(array)
  @customers = array.map { |customer| Customer.new(customer) }
end