Class: OnlinePayments::SDK::Domain::ImportCofSeriesRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#cardOnlinePayments::SDK::Domain::CardDataWithoutCvv

Returns the current value of card.

Returns:



16
17
18
# File 'lib/onlinepayments/sdk/domain/import_cof_series_request.rb', line 16

def card
  @card
end

#currency_codeString

Returns the current value of currency_code.

Returns:

  • (String)

    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_idInteger

Returns the current value of payment_product_id.

Returns:

  • (Integer)

    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_dataString

Returns the current value of scheme_reference_data.

Returns:

  • (String)

    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_idString

Returns the current value of token_id.

Returns:

  • (String)

    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

Returns the current value of transaction_link_identifier.

Returns:

  • (String)

    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_hHash

Returns:

  • (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