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

#payment_product302_specific_inputWorldline::Connect::SDK::V1::Domain::PaymentProduct302SpecificInput

Returns the current value of payment_product302_specific_input.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 20

def payment_product302_specific_input
  @payment_product302_specific_input
end

#recurring_end_dateString

Returns the current value of recurring_end_date.

Returns:

  • (String)

    the current value of recurring_end_date



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 20

def recurring_end_date
  @recurring_end_date
end

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

Returns the current value of recurring_interval.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 20

def recurring_interval
  @recurring_interval
end

#recurring_start_dateString

Returns the current value of recurring_start_date.

Returns:

  • (String)

    the current value of recurring_start_date



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 20

def recurring_start_date
  @recurring_start_date
end

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

Returns the current value of trial_information.

Returns:



20
21
22
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 20

def trial_information
  @trial_information
end

Instance Method Details

#from_hash(hash) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/worldline/connect/sdk/v1/domain/recurring_payments_data.rb', line 43

def from_hash(hash)
  super
  if hash.has_key? 'paymentProduct302SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct302SpecificInput']] unless hash['paymentProduct302SpecificInput'].is_a? Hash
    @payment_product302_specific_input = Worldline::Connect::SDK::V1::Domain::PaymentProduct302SpecificInput.new_from_hash(hash['paymentProduct302SpecificInput'])
  end
  if hash.has_key? 'recurringEndDate'
    @recurring_end_date = hash['recurringEndDate']
  end
  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? 'recurringStartDate'
    @recurring_start_date = hash['recurringStartDate']
  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)


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

def to_h
  hash = super
  hash['paymentProduct302SpecificInput'] = @payment_product302_specific_input.to_h unless @payment_product302_specific_input.nil?
  hash['recurringEndDate'] = @recurring_end_date unless @recurring_end_date.nil?
  hash['recurringInterval'] = @recurring_interval.to_h unless @recurring_interval.nil?
  hash['recurringStartDate'] = @recurring_start_date unless @recurring_start_date.nil?
  hash['trialInformation'] = @trial_information.to_h unless @trial_information.nil?
  hash
end