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.
Instance Method Summary collapse
Methods inherited from DataObject
Instance Attribute Details
#card ⇒ OnlinePayments::SDK::Domain::CardDataWithoutCvv
Returns the current value of card.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 15 def card @card end |
#currency_code ⇒ String
Returns the current value of currency_code.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 15 def currency_code @currency_code end |
#payment_product_id ⇒ Integer
Returns the current value of payment_product_id.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 15 def payment_product_id @payment_product_id end |
#scheme_reference_data ⇒ String
Returns the current value of scheme_reference_data.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 15 def scheme_reference_data @scheme_reference_data end |
#token_id ⇒ String
Returns the current value of token_id.
15 16 17 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 15 def token_id @token_id end |
Instance Method Details
#from_hash(hash) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 38 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 end |
#to_h ⇒ Hash
28 29 30 31 32 33 34 35 36 |
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 28 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 end |