Class: Worldline::Connect::SDK::V1::Domain::MobilePaymentMethodSpecificInput

Inherits:
AbstractMobilePaymentMethodSpecificInput show all
Defined in:
lib/worldline/connect/sdk/v1/domain/mobile_payment_method_specific_input.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractMobilePaymentMethodSpecificInput

#authorization_mode, #customer_reference, #initial_scheme_transaction_id, #recurring, #requires_approval, #skip_fraud_service, #token, #tokenize, #unscheduled_card_on_file_requestor, #unscheduled_card_on_file_sequence_indicator

Attributes inherited from AbstractPaymentMethodSpecificInput

#payment_product_id

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#decrypted_payment_dataWorldline::Connect::SDK::V1::Domain::DecryptedPaymentData

Returns the current value of decrypted_payment_data.

Returns:



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

def decrypted_payment_data
  @decrypted_payment_data
end

#encrypted_payment_dataString

Returns the current value of encrypted_payment_data.

Returns:

  • (String)

    the current value of encrypted_payment_data



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

def encrypted_payment_data
  @encrypted_payment_data
end

#is_recurringtrue/false

Returns the current value of is_recurring.

Returns:

  • (true/false)

    the current value of is_recurring



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

def is_recurring
  @is_recurring
end

#merchant_initiated_reason_indicatorString

Returns the current value of merchant_initiated_reason_indicator.

Returns:

  • (String)

    the current value of merchant_initiated_reason_indicator



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

def merchant_initiated_reason_indicator
  @merchant_initiated_reason_indicator
end

#payment_product320_specific_inputWorldline::Connect::SDK::V1::Domain::MobilePaymentProduct320SpecificInput

Returns the current value of payment_product320_specific_input.

Returns:



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

def payment_product320_specific_input
  @payment_product320_specific_input
end

Instance Method Details

#from_hash(hash) ⇒ Object



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

def from_hash(hash)
  super
  if hash.has_key? 'decryptedPaymentData'
    raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']] unless hash['decryptedPaymentData'].is_a? Hash
    @decrypted_payment_data = Worldline::Connect::SDK::V1::Domain::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData'])
  end
  if hash.has_key? 'encryptedPaymentData'
    @encrypted_payment_data = hash['encryptedPaymentData']
  end
  if hash.has_key? 'isRecurring'
    @is_recurring = hash['isRecurring']
  end
  if hash.has_key? 'merchantInitiatedReasonIndicator'
    @merchant_initiated_reason_indicator = hash['merchantInitiatedReasonIndicator']
  end
  if hash.has_key? 'paymentProduct320SpecificInput'
    raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']] unless hash['paymentProduct320SpecificInput'].is_a? Hash
    @payment_product320_specific_input = Worldline::Connect::SDK::V1::Domain::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput'])
  end
end

#to_hHash

Returns:

  • (Hash)


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

def to_h
  hash = super
  hash['decryptedPaymentData'] = @decrypted_payment_data.to_h unless @decrypted_payment_data.nil?
  hash['encryptedPaymentData'] = @encrypted_payment_data unless @encrypted_payment_data.nil?
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
  hash['merchantInitiatedReasonIndicator'] = @merchant_initiated_reason_indicator unless @merchant_initiated_reason_indicator.nil?
  hash['paymentProduct320SpecificInput'] = @payment_product320_specific_input.to_h unless @payment_product320_specific_input.nil?
  hash
end