Class: Asdawqw::FeeTaxMandatory

Inherits:
BaseModel show all
Defined in:
lib/asdawqw/models/fee_tax_mandatory.rb

Overview

FeeTaxMandatory Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(is_fee_mandatory = nil, is_tax_mandatory = nil) ⇒ FeeTaxMandatory

Returns a new instance of FeeTaxMandatory.



29
30
31
32
33
# File 'lib/asdawqw/models/fee_tax_mandatory.rb', line 29

def initialize(is_fee_mandatory = nil,
               is_tax_mandatory = nil)
  @is_fee_mandatory = is_fee_mandatory
  @is_tax_mandatory = is_tax_mandatory
end

Instance Attribute Details

#is_fee_mandatoryBoolean

Used in BookingPal validator. Info does property require any fee or not. Default value is TRUE. This setup can be overridden on property level with different API call, which is stronger.

Returns:

  • (Boolean)


13
14
15
# File 'lib/asdawqw/models/fee_tax_mandatory.rb', line 13

def is_fee_mandatory
  @is_fee_mandatory
end

#is_tax_mandatoryBoolean

Used in BookingPal validator. Info does property require any tax or not. Default value is TRUE. This setup can be overridden on property level with different API call, which is stronger.

Returns:

  • (Boolean)


19
20
21
# File 'lib/asdawqw/models/fee_tax_mandatory.rb', line 19

def is_tax_mandatory
  @is_tax_mandatory
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/asdawqw/models/fee_tax_mandatory.rb', line 36

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  is_fee_mandatory = hash['isFeeMandatory']
  is_tax_mandatory = hash['isTaxMandatory']

  # Create object from extracted values.
  FeeTaxMandatory.new(is_fee_mandatory,
                      is_tax_mandatory)
end

.namesObject

A mapping from model property names to API property names.



22
23
24
25
26
27
# File 'lib/asdawqw/models/fee_tax_mandatory.rb', line 22

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['is_fee_mandatory'] = 'isFeeMandatory'
  @_hash['is_tax_mandatory'] = 'isTaxMandatory'
  @_hash
end