Class: OnlinePayments::SDK::Domain::MobilePaymentProduct302SpecificInput

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#apple_pay_recurring_payment_requestOnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest

Returns the current value of apple_pay_recurring_payment_request.

Returns:



11
12
13
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 11

def apple_pay_recurring_payment_request
  @apple_pay_recurring_payment_request
end

Instance Method Details

#from_hash(hash) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 22

def from_hash(hash)
  super
  if hash.has_key? 'applePayRecurringPaymentRequest'
    raise TypeError, "value '%s' is not a Hash" % [hash['applePayRecurringPaymentRequest']] unless hash['applePayRecurringPaymentRequest'].is_a? Hash
    @apple_pay_recurring_payment_request = OnlinePayments::SDK::Domain::ApplePayRecurringPaymentRequest.new_from_hash(hash['applePayRecurringPaymentRequest'])
  end
end

#to_hHash

Returns:

  • (Hash)


16
17
18
19
20
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product302_specific_input.rb', line 16

def to_h
  hash = super
  hash['applePayRecurringPaymentRequest'] = @apple_pay_recurring_payment_request.to_h unless @apple_pay_recurring_payment_request.nil?
  hash
end