Class: Asdawqw::FeeTaxMandatorySetting
- Defined in:
- lib/asdawqw/models/fee_tax_mandatory_setting.rb
Overview
FeeTaxMandatorySetting Model.
Instance Attribute Summary collapse
-
#is_fee_mandatory ⇒ Boolean
Fee is mandatory.
-
#is_tax_mandatory ⇒ Boolean
Tax is mandatory.
-
#product_id ⇒ Integer
Product id.
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.
Instance Method Summary collapse
-
#initialize(product_id = nil, is_fee_mandatory = nil, is_tax_mandatory = nil) ⇒ FeeTaxMandatorySetting
constructor
A new instance of FeeTaxMandatorySetting.
Methods inherited from BaseModel
Constructor Details
#initialize(product_id = nil, is_fee_mandatory = nil, is_tax_mandatory = nil) ⇒ FeeTaxMandatorySetting
Returns a new instance of FeeTaxMandatorySetting.
30 31 32 33 34 35 36 |
# File 'lib/asdawqw/models/fee_tax_mandatory_setting.rb', line 30 def initialize(product_id = nil, is_fee_mandatory = nil, is_tax_mandatory = nil) @product_id = product_id @is_fee_mandatory = is_fee_mandatory @is_tax_mandatory = is_tax_mandatory end |
Instance Attribute Details
#is_fee_mandatory ⇒ Boolean
Fee is mandatory
15 16 17 |
# File 'lib/asdawqw/models/fee_tax_mandatory_setting.rb', line 15 def is_fee_mandatory @is_fee_mandatory end |
#is_tax_mandatory ⇒ Boolean
Tax is mandatory
19 20 21 |
# File 'lib/asdawqw/models/fee_tax_mandatory_setting.rb', line 19 def is_tax_mandatory @is_tax_mandatory end |
#product_id ⇒ Integer
Product id
11 12 13 |
# File 'lib/asdawqw/models/fee_tax_mandatory_setting.rb', line 11 def product_id @product_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/asdawqw/models/fee_tax_mandatory_setting.rb', line 39 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. product_id = hash['productId'] is_fee_mandatory = hash['isFeeMandatory'] is_tax_mandatory = hash['isTaxMandatory'] # Create object from extracted values. FeeTaxMandatorySetting.new(product_id, is_fee_mandatory, is_tax_mandatory) end |
.names ⇒ Object
A mapping from model property names to API property names.
22 23 24 25 26 27 28 |
# File 'lib/asdawqw/models/fee_tax_mandatory_setting.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['product_id'] = 'productId' @_hash['is_fee_mandatory'] = 'isFeeMandatory' @_hash['is_tax_mandatory'] = 'isTaxMandatory' @_hash end |