Class: Beanie::VatRecord
Constant Summary collapse
- TYPE_SALES =
0- TYPE_PURCHASES =
1- TYPE_GOODS_FROM =
2- TYPE_GOODS_TO =
3- TYPE_SERVICES_FROM =
4- TYPE_SERVICES_TO =
5- TYPE_NAMES =
[ ["Sales", TYPE_SALES], ["Purchases", TYPE_PURCHASES], ["Goods From", TYPE_GOODS_FROM], ["Goods To", TYPE_GOODS_TO], ["Services From", TYPE_SERVICES_FROM], ["Services To", TYPE_SERVICES_TO] ].freeze
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#id ⇒ Object
Returns the value of attribute id.
-
#record_type ⇒ Object
Returns the value of attribute record_type.
-
#sales_tax_rate ⇒ Object
Returns the value of attribute sales_tax_rate.
-
#vat_return_id ⇒ Object
Returns the value of attribute vat_return_id.
Instance Method Summary collapse
-
#initialize ⇒ VatRecord
constructor
Initialize instance variables.
-
#record_type_name ⇒ Object
Conver the record type into a string.
Methods inherited from Api
all, build_url, #construct_path, delete, #extract, #field_name, find, get, #object_name, #populate, post, put, #save!, set_headers
Constructor Details
#initialize ⇒ VatRecord
Initialize instance variables
52 53 54 55 56 57 58 |
# File 'lib/beanie/vat_record.rb', line 52 def initialize @id = nil @amount = nil @record_type = nil @vat_return_id = nil @sales_tax_rate = nil end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
32 33 34 |
# File 'lib/beanie/vat_record.rb', line 32 def amount @amount end |
#id ⇒ Object
Returns the value of attribute id.
32 33 34 |
# File 'lib/beanie/vat_record.rb', line 32 def id @id end |
#record_type ⇒ Object
Returns the value of attribute record_type.
32 33 34 |
# File 'lib/beanie/vat_record.rb', line 32 def record_type @record_type end |
#sales_tax_rate ⇒ Object
Returns the value of attribute sales_tax_rate.
32 33 34 |
# File 'lib/beanie/vat_record.rb', line 32 def sales_tax_rate @sales_tax_rate end |
#vat_return_id ⇒ Object
Returns the value of attribute vat_return_id.
32 33 34 |
# File 'lib/beanie/vat_record.rb', line 32 def vat_return_id @vat_return_id end |
Instance Method Details
#record_type_name ⇒ Object
Conver the record type into a string
62 63 64 |
# File 'lib/beanie/vat_record.rb', line 62 def record_type_name TYPE_NAMES[self.record_type][0] end |