Class: OnlinePayments::SDK::Domain::SubsequentCardPaymentMethodSpecificInput

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#authorization_modeString

Returns the current value of authorization_mode.

Returns:

  • (String)

    the current value of authorization_mode



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def authorization_mode
  @authorization_mode
end

#market_placeOnlinePayments::SDK::Domain::MarketPlace

Returns the current value of market_place.

Returns:



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def market_place
  @market_place
end

#payment_numberInteger

Returns the current value of payment_number.

Returns:

  • (Integer)

    the current value of payment_number



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def payment_number
  @payment_number
end

#scheme_reference_dataObject

Deprecated.

Deprecated



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def scheme_reference_data
  @scheme_reference_data
end

#subsequent_typeString

Returns the current value of subsequent_type.

Returns:

  • (String)

    the current value of subsequent_type



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def subsequent_type
  @subsequent_type
end

#tokenObject

Deprecated.

ID of the token to use to create the payment.



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def token
  @token
end

#transaction_channelString

Returns the current value of transaction_channel.

Returns:

  • (String)

    the current value of transaction_channel



17
18
19
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 17

def transaction_channel
  @transaction_channel
end

Instance Method Details

#from_hash(hash) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 48

def from_hash(hash)
  super
  if hash.has_key? 'authorizationMode'
    @authorization_mode = hash['authorizationMode']
  end
  if hash.has_key? 'marketPlace'
    raise TypeError, "value '%s' is not a Hash" % [hash['marketPlace']] unless hash['marketPlace'].is_a? Hash
    @market_place = OnlinePayments::SDK::Domain::MarketPlace.new_from_hash(hash['marketPlace'])
  end
  if hash.has_key? 'paymentNumber'
    @payment_number = hash['paymentNumber']
  end
  if hash.has_key? 'schemeReferenceData'
    @scheme_reference_data = hash['schemeReferenceData']
  end
  if hash.has_key? 'subsequentType'
    @subsequent_type = hash['subsequentType']
  end
  if hash.has_key? 'token'
    @token = hash['token']
  end
  if hash.has_key? 'transactionChannel'
    @transaction_channel = hash['transactionChannel']
  end
end

#to_hHash

Returns:

  • (Hash)


36
37
38
39
40
41
42
43
44
45
46
# File 'lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb', line 36

def to_h
  hash = super
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
  hash['marketPlace'] = @market_place.to_h unless @market_place.nil?
  hash['paymentNumber'] = @payment_number unless @payment_number.nil?
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
  hash['subsequentType'] = @subsequent_type unless @subsequent_type.nil?
  hash['token'] = @token unless @token.nil?
  hash['transactionChannel'] = @transaction_channel unless @transaction_channel.nil?
  hash
end