Class: AdvancedBilling::ProformaInvoiceTaxBreakout
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- AdvancedBilling::ProformaInvoiceTaxBreakout
- Defined in:
- lib/advanced_billing/models/proforma_invoice_tax_breakout.rb
Overview
ProformaInvoiceTaxBreakout Model.
Instance Attribute Summary collapse
-
#tax_amount ⇒ String
TODO: Write general description for this method.
-
#taxable_amount ⇒ String
TODO: Write general description for this method.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(taxable_amount = SKIP, tax_amount = SKIP) ⇒ ProformaInvoiceTaxBreakout
constructor
A new instance of ProformaInvoiceTaxBreakout.
Methods inherited from BaseModel
Constructor Details
#initialize(taxable_amount = SKIP, tax_amount = SKIP) ⇒ ProformaInvoiceTaxBreakout
Returns a new instance of ProformaInvoiceTaxBreakout.
41 42 43 44 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 41 def initialize(taxable_amount = SKIP, tax_amount = SKIP) @taxable_amount = taxable_amount unless taxable_amount == SKIP @tax_amount = tax_amount unless tax_amount == SKIP end |
Instance Attribute Details
#tax_amount ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 18 def tax_amount @tax_amount end |
#taxable_amount ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 14 def taxable_amount @taxable_amount end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 47 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. taxable_amount = hash.key?('taxable_amount') ? hash['taxable_amount'] : SKIP tax_amount = hash.key?('tax_amount') ? hash['tax_amount'] : SKIP # Create object from extracted values. ProformaInvoiceTaxBreakout.new(taxable_amount, tax_amount) end |
.names ⇒ Object
A mapping from model property names to API property names.
21 22 23 24 25 26 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 21 def self.names @_hash = {} if @_hash.nil? @_hash['taxable_amount'] = 'taxable_amount' @_hash['tax_amount'] = 'tax_amount' @_hash end |
.nullables ⇒ Object
An array for nullable fields
37 38 39 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 37 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 32 33 34 |
# File 'lib/advanced_billing/models/proforma_invoice_tax_breakout.rb', line 29 def self.optionals %w[ taxable_amount tax_amount ] end |