Class: Worldline::Connect::SDK::V1::Domain::RecurringPaymentsData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#recurring_intervalWorldline::Connect::SDK::V1::Domain::Frequency

Returns the current value of recurring_interval.

Returns:



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

def recurring_interval
  @recurring_interval
end

#trial_informationWorldline::Connect::SDK::V1::Domain::TrialInformation

Returns the current value of trial_information.

Returns:



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

def trial_information
  @trial_information
end

Instance Method Details

#from_hash(hash) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 30

def from_hash(hash)
  super
  if hash.has_key? 'recurringInterval'
    raise TypeError, "value '%s' is not a Hash" % [hash['recurringInterval']] unless hash['recurringInterval'].is_a? Hash
    @recurring_interval = Worldline::Connect::SDK::V1::Domain::Frequency.new_from_hash(hash['recurringInterval'])
  end
  if hash.has_key? 'trialInformation'
    raise TypeError, "value '%s' is not a Hash" % [hash['trialInformation']] unless hash['trialInformation'].is_a? Hash
    @trial_information = Worldline::Connect::SDK::V1::Domain::TrialInformation.new_from_hash(hash['trialInformation'])
  end
end

#to_hHash

Returns:

  • (Hash)


23
24
25
26
27
28
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 23

def to_h
  hash = super
  hash['recurringInterval'] = @recurring_interval.to_h unless @recurring_interval.nil?
  hash['trialInformation'] = @trial_information.to_h unless @trial_information.nil?
  hash
end