Class: WireClient::Account

Inherits:
Object
  • Object
show all
Extended by:
Converter
Includes:
ActiveModel::Validations, AccountTransactionHelpers
Defined in:
lib/wire_client/account/account.rb

Direct Known Subclasses

CreditorAccount, DebtorAccount

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Converter

convert

Methods included from AccountTransactionHelpers

#country_subdivision_abbr, #country_subdivision_name

Constructor Details

#initialize(attributes = {}) ⇒ Account

Returns a new instance of Account.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/wire_client/account/account.rb', line 38

def initialize(attributes = {})
  attributes.each do |name, value|
    public_send("#{name}=", value)
  end

  @currency ||= 'USD'
  @postal_code ||= 'NA'
  @address_line ||= 'NA'
  @city ||= 'NA'
  @country ||= 'US'
  @country_subdivision ||= 'MA' if self.country == 'US'
  @schema_code ||= 'CUST'
  @clear_system_code ||= 'USABA'
  custom_defaults if self.respond_to? :custom_defaults
end

Instance Attribute Details

#account_numberObject

Returns the value of attribute account_number.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def 
  @account_number
end

#address_lineObject

Returns the value of attribute address_line.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def address_line
  @address_line
end

#bicObject

Returns the value of attribute bic.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def bic
  @bic
end

#charge_bearerObject

Returns the value of attribute charge_bearer.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def charge_bearer
  @charge_bearer
end

#cityObject

Returns the value of attribute city.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def city
  @city
end

#clear_system_codeObject

Returns the value of attribute clear_system_code.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def clear_system_code
  @clear_system_code
end

#countryObject

Returns the value of attribute country.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def country
  @country
end

#country_subdivisionObject

Returns the value of attribute country_subdivision.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def country_subdivision
  @country_subdivision
end

#currencyObject

Returns the value of attribute currency.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def currency
  @currency
end

#ibanObject

Returns the value of attribute iban.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def iban
  @iban
end

#identifierObject

Returns the value of attribute identifier.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def identifier
  @identifier
end

#nameObject

Returns the value of attribute name.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def name
  @name
end

#postal_codeObject

Returns the value of attribute postal_code.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def postal_code
  @postal_code
end

#schema_codeObject

Returns the value of attribute schema_code.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def schema_code
  @schema_code
end

#wire_routing_numberObject

Returns the value of attribute wire_routing_number.



11
12
13
# File 'lib/wire_client/account/account.rb', line 11

def wire_routing_number
  @wire_routing_number
end