Class: Worldline::Connect::SDK::V1::Domain::DeferredBillingDetails

Inherits:
BaseBillingDetails show all
Defined in:
lib/worldline/connect/sdk/v1/domain/deferred_billing_details.rb

Instance Attribute Summary collapse

Attributes inherited from BaseBillingDetails

#description

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#deferred_payment_amountInteger



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

def deferred_payment_amount
  @deferred_payment_amount
end

#deferred_payment_dateString



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

def deferred_payment_date
  @deferred_payment_date
end

#free_cancellation_dateString



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

def free_cancellation_date
  @free_cancellation_date
end

#free_cancellation_date_time_zoneString



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

def free_cancellation_date_time_zone
  @free_cancellation_date_time_zone
end

Instance Method Details

#from_hash(hash) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/worldline/connect/sdk/v1/domain/deferred_billing_details.rb', line 36

def from_hash(hash)
  super
  if hash.has_key? 'deferredPaymentAmount'
    @deferred_payment_amount = hash['deferredPaymentAmount']
  end
  if hash.has_key? 'deferredPaymentDate'
    @deferred_payment_date = hash['deferredPaymentDate']
  end
  if hash.has_key? 'freeCancellationDate'
    @free_cancellation_date = hash['freeCancellationDate']
  end
  if hash.has_key? 'freeCancellationDateTimeZone'
    @free_cancellation_date_time_zone = hash['freeCancellationDateTimeZone']
  end
end

#to_hHash



27
28
29
30
31
32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/deferred_billing_details.rb', line 27

def to_h
  hash = super
  hash['deferredPaymentAmount'] = @deferred_payment_amount unless @deferred_payment_amount.nil?
  hash['deferredPaymentDate'] = @deferred_payment_date unless @deferred_payment_date.nil?
  hash['freeCancellationDate'] = @free_cancellation_date unless @free_cancellation_date.nil?
  hash['freeCancellationDateTimeZone'] = @free_cancellation_date_time_zone unless @free_cancellation_date_time_zone.nil?
  hash
end