Class: OnlinePayments::SDK::Domain::MobilePaymentProduct320SpecificInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#is_recurringtrue/false

Returns the current value of is_recurring.

Returns:

  • (true/false)

    the current value of is_recurring



15
16
17
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15

def is_recurring
  @is_recurring
end

#recurringOnlinePayments::SDK::Domain::Product320Recurring

Returns the current value of recurring.

Returns:



15
16
17
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15

def recurring
  @recurring
end

#three_d_secureOnlinePayments::SDK::Domain::GPayThreeDSecure

Returns the current value of three_d_secure.

Returns:



15
16
17
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15

def three_d_secure
  @three_d_secure
end

#tokenizetrue/false

Returns the current value of tokenize.

Returns:

  • (true/false)

    the current value of tokenize



15
16
17
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 15

def tokenize
  @tokenize
end

Instance Method Details

#from_hash(hash) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 35

def from_hash(hash)
  super
  if hash.has_key? 'isRecurring'
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key? 'recurring'
    raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
    @recurring = OnlinePayments::SDK::Domain::Product320Recurring.new_from_hash(hash['recurring'])
  end
  if hash.has_key? 'threeDSecure'
    raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecure']] unless hash['threeDSecure'].is_a? Hash
    @three_d_secure = OnlinePayments::SDK::Domain::GPayThreeDSecure.new_from_hash(hash['threeDSecure'])
  end
  if hash.has_key? 'tokenize'
    @tokenize = hash['tokenize']
  end
end

#to_hHash

Returns:

  • (Hash)


26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/mobile_payment_product320_specific_input.rb', line 26

def to_h
  hash = super
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
  hash['recurring'] = @recurring.to_h unless @recurring.nil?
  hash['threeDSecure'] = @three_d_secure.to_h unless @three_d_secure.nil?
  hash['tokenize'] = @tokenize unless @tokenize.nil?
  hash
end