Class: CodaStandard::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/coda_standard/transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#accountObject

Returns the value of attribute account.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def 
  @account
end

#addressObject

Returns the value of attribute address.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def address
  @address
end

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def amount
  @amount
end

#bicObject

Returns the value of attribute bic.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def bic
  @bic
end

#cityObject

Returns the value of attribute city.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def city
  @city
end

#countryObject

Returns the value of attribute country.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def country
  @country
end

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def currency
  @currency
end

#entry_dateObject

Returns the value of attribute entry_date.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def 
  @entry_date
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def name
  @name
end

#postcodeObject

Returns the value of attribute postcode.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def postcode
  @postcode
end

#reference_numberObject

Returns the value of attribute reference_number.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def reference_number
  @reference_number
end

#structured_communicationObject

Returns the value of attribute structured_communication.



3
4
5
# File 'lib/coda_standard/transaction.rb', line 3

def structured_communication
  @structured_communication
end

Instance Method Details

#amount_centsObject



9
10
11
# File 'lib/coda_standard/transaction.rb', line 9

def amount_cents
  (@amount.to_f * 100).to_i
end

#amount_moneyObject



13
14
15
# File 'lib/coda_standard/transaction.rb', line 13

def amount_money
  "#{ amount_cents.to_s.insert(-3, ',') } #{ @currency }"
end

#match_structured_communication(structured_communication) ⇒ Object



5
6
7
# File 'lib/coda_standard/transaction.rb', line 5

def match_structured_communication(structured_communication)
  @structured_communication == structured_communication
end