Class: Worldline::Connect::SDK::V1::Domain::LodgingCharge

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/connect/sdk/v1/domain/lodging_charge.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#charge_amountInteger

Returns the current value of charge_amount.

Returns:

  • (Integer)

    the current value of charge_amount



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/lodging_charge.rb', line 15

def charge_amount
  @charge_amount
end

#charge_amount_currency_codeString

Returns the current value of charge_amount_currency_code.

Returns:

  • (String)

    the current value of charge_amount_currency_code



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/lodging_charge.rb', line 15

def charge_amount_currency_code
  @charge_amount_currency_code
end

#charge_typeString

Returns the current value of charge_type.

Returns:

  • (String)

    the current value of charge_type



15
16
17
# File 'lib/worldline/connect/sdk/v1/domain/lodging_charge.rb', line 15

def charge_type
  @charge_type
end

Instance Method Details

#from_hash(hash) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/worldline/connect/sdk/v1/domain/lodging_charge.rb', line 32

def from_hash(hash)
  super
  if hash.has_key? 'chargeAmount'
    @charge_amount = hash['chargeAmount']
  end
  if hash.has_key? 'chargeAmountCurrencyCode'
    @charge_amount_currency_code = hash['chargeAmountCurrencyCode']
  end
  if hash.has_key? 'chargeType'
    @charge_type = hash['chargeType']
  end
end

#to_hHash

Returns:

  • (Hash)


24
25
26
27
28
29
30
# File 'lib/worldline/connect/sdk/v1/domain/lodging_charge.rb', line 24

def to_h
  hash = super
  hash['chargeAmount'] = @charge_amount unless @charge_amount.nil?
  hash['chargeAmountCurrencyCode'] = @charge_amount_currency_code unless @charge_amount_currency_code.nil?
  hash['chargeType'] = @charge_type unless @charge_type.nil?
  hash
end