Class: Cetustek::Models::AllowanceData
- Inherits:
-
Object
- Object
- Cetustek::Models::AllowanceData
- Defined in:
- lib/cetustek/models/allowance_data.rb
Overview
Request data for CreateAllowance (開立折讓單), spec AVM-26-03 Table 15/16. Line items reuse InvoiceItem (code/name/quantity/unit/unit_price).
Instance Attribute Summary collapse
-
#allowance_date ⇒ Object
readonly
Returns the value of attribute allowance_date.
-
#allowance_number ⇒ Object
readonly
Returns the value of attribute allowance_number.
-
#buyer_address ⇒ Object
readonly
Returns the value of attribute buyer_address.
-
#buyer_email ⇒ Object
readonly
Returns the value of attribute buyer_email.
-
#invoice_number ⇒ Object
readonly
Returns the value of attribute invoice_number.
-
#invoice_year ⇒ Object
readonly
Returns the value of attribute invoice_year.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#round_num ⇒ Object
readonly
Returns the value of attribute round_num.
-
#tax_type ⇒ Object
readonly
Returns the value of attribute tax_type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AllowanceData
constructor
A new instance of AllowanceData.
Constructor Details
#initialize(attributes = {}) ⇒ AllowanceData
Returns a new instance of AllowanceData.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cetustek/models/allowance_data.rb', line 14 def initialize(attributes = {}) @allowance_number = attributes[:allowance_number] @allowance_date = attributes[:allowance_date] @invoice_number = attributes[:invoice_number] @invoice_year = attributes[:invoice_year] @buyer_address = attributes[:buyer_address] @buyer_email = attributes[:buyer_email] @tax_type = attributes[:tax_type] || TaxType::TAXABLE @reason = attributes[:reason] @round_num = attributes[:round_num] # optional 金額計算位數 @items = attributes[:items] || [] end |
Instance Attribute Details
#allowance_date ⇒ Object (readonly)
Returns the value of attribute allowance_date.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def allowance_date @allowance_date end |
#allowance_number ⇒ Object (readonly)
Returns the value of attribute allowance_number.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def allowance_number @allowance_number end |
#buyer_address ⇒ Object (readonly)
Returns the value of attribute buyer_address.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def buyer_address @buyer_address end |
#buyer_email ⇒ Object (readonly)
Returns the value of attribute buyer_email.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def buyer_email @buyer_email end |
#invoice_number ⇒ Object (readonly)
Returns the value of attribute invoice_number.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def invoice_number @invoice_number end |
#invoice_year ⇒ Object (readonly)
Returns the value of attribute invoice_year.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def invoice_year @invoice_year end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def items @items end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def reason @reason end |
#round_num ⇒ Object (readonly)
Returns the value of attribute round_num.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def round_num @round_num end |
#tax_type ⇒ Object (readonly)
Returns the value of attribute tax_type.
10 11 12 |
# File 'lib/cetustek/models/allowance_data.rb', line 10 def tax_type @tax_type end |