Class: OnlinePayments::SDK::Domain::ImportCofSeriesRequest
- Inherits:
-
DataObject
- Object
- DataObject
- OnlinePayments::SDK::Domain::ImportCofSeriesRequest
- Defined in:
- lib/onlinepayments/sdk/domain/import_cof_series_request.rb
Instance Attribute Summary collapse
-
#card ⇒ OnlinePayments::SDK::Domain::CardDataWithoutCvv
The current value of card.
-
#currency_code ⇒ String
The current value of currency_code.
-
#payment_product_id ⇒ Integer
The current value of payment_product_id.
-
#scheme_reference_data ⇒ String
The current value of scheme_reference_data.
-
#token_id ⇒ String
The current value of token_id.
-
#transaction_link_identifier ⇒ String
The current value of transaction_link_identifier.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#card ⇒ OnlinePayments::SDK::Domain::CardDataWithoutCvv
Returns the current value of card.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16 def card @card end |
#currency_code ⇒ String
Returns the current value of currency_code.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16 def currency_code @currency_code end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16 def payment_product_id @payment_product_id end |
#scheme_reference_data ⇒ String
Returns the current value of scheme_reference_data.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16 def scheme_reference_data @scheme_reference_data end |
#token_id ⇒ String
Returns the current value of token_id.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16 def token_id @token_id end |
#transaction_link_identifier ⇒ String
Returns the current value of transaction_link_identifier.
16 17 18 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16 def transaction_link_identifier @transaction_link_identifier 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 62 63 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 42 def from_hash(hash) super if hash.has_key? 'card' raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash @card = OnlinePayments::SDK::Domain::CardDataWithoutCvv.new_from_hash(hash['card']) end if hash.has_key? 'currencyCode' @currency_code = hash['currencyCode'] end if hash.has_key? 'paymentProductId' @payment_product_id = hash['paymentProductId'] end if hash.has_key? 'schemeReferenceData' @scheme_reference_data = hash['schemeReferenceData'] end if hash.has_key? 'tokenId' @token_id = hash['tokenId'] end if hash.has_key? 'transactionLinkIdentifier' @transaction_link_identifier = hash['transactionLinkIdentifier'] end end |
#to_h ⇒ Hash
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 31 def to_h hash = super hash['card'] = @card.to_h unless @card.nil? hash['currencyCode'] = @currency_code unless @currency_code.nil? hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil? hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil? hash['tokenId'] = @token_id unless @token_id.nil? hash['transactionLinkIdentifier'] = @transaction_link_identifier unless @transaction_link_identifier.nil? hash end |