onlinepayments-sdk-ruby 7.0.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onlinepayments/sdk/client.rb +1 -1
  3. data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
  4. data/lib/onlinepayments/sdk/domain/cancel_payment_request.rb +12 -0
  5. data/lib/onlinepayments/sdk/domain/capture_payment_request.rb +12 -0
  6. data/lib/onlinepayments/sdk/domain/card_data_without_cvv.rb +44 -0
  7. data/lib/onlinepayments/sdk/domain/create_certificate_response.rb +37 -0
  8. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb +30 -0
  9. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb +46 -0
  10. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +9 -0
  11. data/lib/onlinepayments/sdk/domain/credit_card_validation_rules_hosted_tokenization.rb +37 -0
  12. data/lib/onlinepayments/sdk/domain/csr_request.rb +30 -0
  13. data/lib/onlinepayments/sdk/domain/detokenization_response.rb +35 -0
  14. data/lib/onlinepayments/sdk/domain/detokenized_token_response.rb +72 -0
  15. data/lib/onlinepayments/sdk/domain/import_cof_series_request.rb +60 -0
  16. data/lib/onlinepayments/sdk/domain/import_cof_series_response.rb +30 -0
  17. data/lib/onlinepayments/sdk/domain/line_item_detail.rb +37 -0
  18. data/lib/onlinepayments/sdk/domain/omnichannel_payment_specific_input.rb +30 -0
  19. data/lib/onlinepayments/sdk/domain/payment_output.rb +9 -0
  20. data/lib/onlinepayments/sdk/domain/payment_product840.rb +30 -0
  21. data/lib/onlinepayments/sdk/domain/refund_request.rb +12 -0
  22. data/lib/onlinepayments/sdk/domain/session_data.rb +62 -0
  23. data/lib/onlinepayments/sdk/domain/shopping_cart_output.rb +35 -0
  24. data/lib/onlinepayments/sdk/domain/show_form_data.rb +9 -0
  25. data/lib/onlinepayments/sdk/merchant/cofseries/cof_series_client.rb +55 -0
  26. data/lib/onlinepayments/sdk/merchant/cofseries.rb +4 -0
  27. data/lib/onlinepayments/sdk/merchant/hostedfields/hosted_fields_client.rb +55 -0
  28. data/lib/onlinepayments/sdk/merchant/hostedfields.rb +4 -0
  29. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +24 -0
  30. data/lib/onlinepayments/sdk/merchant/paymentlinks/get_payment_links_in_bulk_params.rb +28 -0
  31. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb +6 -6
  32. data/lib/onlinepayments/sdk/merchant/productgroups/get_product_groups_params.rb +6 -6
  33. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_networks_params.rb +4 -4
  34. data/lib/onlinepayments/sdk/merchant/products/get_payment_product_params.rb +6 -6
  35. data/lib/onlinepayments/sdk/merchant/products/get_payment_products_params.rb +6 -6
  36. data/lib/onlinepayments/sdk/merchant/products/get_product_directory_params.rb +2 -2
  37. data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_payments_params.rb +40 -0
  38. data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_tokens_params.rb +40 -0
  39. data/lib/onlinepayments/sdk/merchant/tokenization/tokenization_client.rb +112 -0
  40. data/lib/onlinepayments/sdk/merchant/tokenization.rb +4 -0
  41. data/onlinepayments-sdk-ruby.gemspec +1 -1
  42. metadata +26 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f0ccc29bcc6f58a324f66c0eef46a99d7464ffd16e2b2ff900668212f0f827c
4
- data.tar.gz: ca86bed33c8e75468dc17f8549b7b9dba0814a37ab73cd5ec2e94f1f7da051ba
3
+ metadata.gz: 5e7cb9ac92f598fdb1b46de7835bc571cc1ea6ae6dbc8280e0b8d4bd11d66789
4
+ data.tar.gz: 68a5f622d5e0f09218c4011d9221e13cb6a04040e72edbc125796e0d67c3739d
5
5
  SHA512:
6
- metadata.gz: 522111d90f2eeabaf27f0da7f67a7a350befb7bb49ad898987021b42757e8b13746fef269e592f07a38240ec56c6eb15206f12baae6f652419830fb51e26b18b
7
- data.tar.gz: b9991bb40cf14dcd9ef44462b19489b81ad9ea463f3af2d90d7decb4971608dc33421fe595d01555dddbb72c3abb78d41a1c2c6b8036ef4cb1648469797da190
6
+ metadata.gz: 71a201da39a7eaea4df36a890264e6d1b24f698cbf9b182ae3b456baea515cba83ced63744b224b905d1e2a7a5476de5e32ace889b2ba749983a4ac489139b21
7
+ data.tar.gz: a3147cade391aa8a68aa2dc64a116de320a91d29e7ada868144a6f03d91db9d9a82105edabb995fc945a141c9c13a4b92a85bed99080f3dad1c27917fe62a562
@@ -38,7 +38,7 @@ module OnlinePayments
38
38
  return Client.new(@communicator, nil)
39
39
  else
40
40
  # Checking to see if this is valid JSON (no JSON parse exceptions)
41
- @communicator.marshaller.unmarshal(client_meta_info, OnlinePayments::SDK::Domain::DataObject)
41
+ @communicator.marshaller.unmarshal(client_meta_info, DataObject)
42
42
  client_meta_info = Base64.strict_encode64(client_meta_info)
43
43
  if @client_meta_info == client_meta_info
44
44
  self
@@ -13,7 +13,7 @@ module OnlinePayments
13
13
  class MetadataProvider
14
14
  private
15
15
 
16
- SDK_VERSION = '7.0.0'.freeze
16
+ SDK_VERSION = '7.1.0'.freeze
17
17
  SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
18
18
  PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze
19
19
  CHARSET = 'utf-8'.freeze
@@ -3,6 +3,7 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/amount_of_money'
5
5
  require 'onlinepayments/sdk/domain/data_object'
6
+ require 'onlinepayments/sdk/domain/line_item_detail'
6
7
  require 'onlinepayments/sdk/domain/operation_payment_references'
7
8
 
8
9
  module OnlinePayments
@@ -10,6 +11,7 @@ module OnlinePayments
10
11
  module Domain
11
12
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
12
13
  # @attr [true/false] is_final
14
+ # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
13
15
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
14
16
  class CancelPaymentRequest < OnlinePayments::SDK::Domain::DataObject
15
17
 
@@ -17,6 +19,8 @@ module OnlinePayments
17
19
 
18
20
  attr_accessor :is_final
19
21
 
22
+ attr_accessor :line_item_details
23
+
20
24
  attr_accessor :operation_references
21
25
 
22
26
  # @return (Hash)
@@ -24,6 +28,7 @@ module OnlinePayments
24
28
  hash = super
25
29
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
26
30
  hash['isFinal'] = @is_final unless @is_final.nil?
31
+ hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
27
32
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
28
33
  hash
29
34
  end
@@ -37,6 +42,13 @@ module OnlinePayments
37
42
  if hash.has_key? 'isFinal'
38
43
  @is_final = hash['isFinal']
39
44
  end
45
+ if hash.has_key? 'lineItemDetails'
46
+ raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
47
+ @line_item_details = []
48
+ hash['lineItemDetails'].each do |e|
49
+ @line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
50
+ end
51
+ end
40
52
  if hash.has_key? 'operationReferences'
41
53
  raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
42
54
  @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
@@ -2,6 +2,7 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/line_item_detail'
5
6
  require 'onlinepayments/sdk/domain/operation_payment_references'
6
7
  require 'onlinepayments/sdk/domain/payment_references'
7
8
 
@@ -10,6 +11,7 @@ module OnlinePayments
10
11
  module Domain
11
12
  # @attr [Integer] amount
12
13
  # @attr [true/false] is_final
14
+ # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
13
15
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
14
16
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
15
17
  class CapturePaymentRequest < OnlinePayments::SDK::Domain::DataObject
@@ -18,6 +20,8 @@ module OnlinePayments
18
20
 
19
21
  attr_accessor :is_final
20
22
 
23
+ attr_accessor :line_item_details
24
+
21
25
  attr_accessor :operation_references
22
26
 
23
27
  attr_accessor :references
@@ -27,6 +31,7 @@ module OnlinePayments
27
31
  hash = super
28
32
  hash['amount'] = @amount unless @amount.nil?
29
33
  hash['isFinal'] = @is_final unless @is_final.nil?
34
+ hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
30
35
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
31
36
  hash['references'] = @references.to_h unless @references.nil?
32
37
  hash
@@ -40,6 +45,13 @@ module OnlinePayments
40
45
  if hash.has_key? 'isFinal'
41
46
  @is_final = hash['isFinal']
42
47
  end
48
+ if hash.has_key? 'lineItemDetails'
49
+ raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
50
+ @line_item_details = []
51
+ hash['lineItemDetails'].each do |e|
52
+ @line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
53
+ end
54
+ end
43
55
  if hash.has_key? 'operationReferences'
44
56
  raise TypeError, "value '%s' is not a Hash" % [hash['operationReferences']] unless hash['operationReferences'].is_a? Hash
45
57
  @operation_references = OnlinePayments::SDK::Domain::OperationPaymentReferences.new_from_hash(hash['operationReferences'])
@@ -0,0 +1,44 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] card_number
10
+ # @attr [String] cardholder_name
11
+ # @attr [String] expiry_date
12
+ class CardDataWithoutCvv < OnlinePayments::SDK::Domain::DataObject
13
+
14
+ attr_accessor :card_number
15
+
16
+ attr_accessor :cardholder_name
17
+
18
+ attr_accessor :expiry_date
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['cardNumber'] = @card_number unless @card_number.nil?
24
+ hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
25
+ hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
26
+ hash
27
+ end
28
+
29
+ def from_hash(hash)
30
+ super
31
+ if hash.has_key? 'cardNumber'
32
+ @card_number = hash['cardNumber']
33
+ end
34
+ if hash.has_key? 'cardholderName'
35
+ @cardholder_name = hash['cardholderName']
36
+ end
37
+ if hash.has_key? 'expiryDate'
38
+ @expiry_date = hash['expiryDate']
39
+ end
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] certificate_id
10
+ # @attr [String] signed_certificate
11
+ class CreateCertificateResponse < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :certificate_id
14
+
15
+ attr_accessor :signed_certificate
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['certificateId'] = @certificate_id unless @certificate_id.nil?
21
+ hash['signedCertificate'] = @signed_certificate unless @signed_certificate.nil?
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ if hash.has_key? 'certificateId'
28
+ @certificate_id = hash['certificateId']
29
+ end
30
+ if hash.has_key? 'signedCertificate'
31
+ @signed_certificate = hash['signedCertificate']
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] locale
10
+ class CreateHostedFieldsSessionRequest < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :locale
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['locale'] = @locale unless @locale.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'locale'
24
+ @locale = hash['locale']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,46 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/session_data'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [String] sdk_sri
11
+ # @attr [String] sdk_url
12
+ # @attr [OnlinePayments::SDK::Domain::SessionData] session_data
13
+ class CreateHostedFieldsSessionResponse < OnlinePayments::SDK::Domain::DataObject
14
+
15
+ attr_accessor :sdk_sri
16
+
17
+ attr_accessor :sdk_url
18
+
19
+ attr_accessor :session_data
20
+
21
+ # @return (Hash)
22
+ def to_h
23
+ hash = super
24
+ hash['sdkSri'] = @sdk_sri unless @sdk_sri.nil?
25
+ hash['sdkUrl'] = @sdk_url unless @sdk_url.nil?
26
+ hash['sessionData'] = @session_data.to_h unless @session_data.nil?
27
+ hash
28
+ end
29
+
30
+ def from_hash(hash)
31
+ super
32
+ if hash.has_key? 'sdkSri'
33
+ @sdk_sri = hash['sdkSri']
34
+ end
35
+ if hash.has_key? 'sdkUrl'
36
+ @sdk_url = hash['sdkUrl']
37
+ end
38
+ if hash.has_key? 'sessionData'
39
+ raise TypeError, "value '%s' is not a Hash" % [hash['sessionData']] unless hash['sessionData'].is_a? Hash
40
+ @session_data = OnlinePayments::SDK::Domain::SessionData.new_from_hash(hash['sessionData'])
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -6,6 +6,7 @@ require 'onlinepayments/sdk/domain/data_object'
6
6
  require 'onlinepayments/sdk/domain/feedbacks'
7
7
  require 'onlinepayments/sdk/domain/fraud_fields'
8
8
  require 'onlinepayments/sdk/domain/mobile_payment_method_specific_input'
9
+ require 'onlinepayments/sdk/domain/omnichannel_payment_specific_input'
9
10
  require 'onlinepayments/sdk/domain/order'
10
11
  require 'onlinepayments/sdk/domain/redirect_payment_method_specific_input'
11
12
  require 'onlinepayments/sdk/domain/sepa_direct_debit_payment_method_specific_input'
@@ -20,6 +21,7 @@ module OnlinePayments
20
21
  # @attr [String] hosted_fields_session_id
21
22
  # @attr [String] hosted_tokenization_id
22
23
  # @attr [OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput] mobile_payment_method_specific_input
24
+ # @attr [OnlinePayments::SDK::Domain::OmnichannelPaymentSpecificInput] omnichannel_payment_specific_input
23
25
  # @attr [OnlinePayments::SDK::Domain::Order] order
24
26
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentMethodSpecificInput] redirect_payment_method_specific_input
25
27
  # @attr [OnlinePayments::SDK::Domain::SepaDirectDebitPaymentMethodSpecificInput] sepa_direct_debit_payment_method_specific_input
@@ -39,6 +41,8 @@ module OnlinePayments
39
41
 
40
42
  attr_accessor :mobile_payment_method_specific_input
41
43
 
44
+ attr_accessor :omnichannel_payment_specific_input
45
+
42
46
  attr_accessor :order
43
47
 
44
48
  attr_accessor :redirect_payment_method_specific_input
@@ -55,6 +59,7 @@ module OnlinePayments
55
59
  hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil?
56
60
  hash['hostedTokenizationId'] = @hosted_tokenization_id unless @hosted_tokenization_id.nil?
57
61
  hash['mobilePaymentMethodSpecificInput'] = @mobile_payment_method_specific_input.to_h unless @mobile_payment_method_specific_input.nil?
62
+ hash['omnichannelPaymentSpecificInput'] = @omnichannel_payment_specific_input.to_h unless @omnichannel_payment_specific_input.nil?
58
63
  hash['order'] = @order.to_h unless @order.nil?
59
64
  hash['redirectPaymentMethodSpecificInput'] = @redirect_payment_method_specific_input.to_h unless @redirect_payment_method_specific_input.nil?
60
65
  hash['sepaDirectDebitPaymentMethodSpecificInput'] = @sepa_direct_debit_payment_method_specific_input.to_h unless @sepa_direct_debit_payment_method_specific_input.nil?
@@ -88,6 +93,10 @@ module OnlinePayments
88
93
  raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']] unless hash['mobilePaymentMethodSpecificInput'].is_a? Hash
89
94
  @mobile_payment_method_specific_input = OnlinePayments::SDK::Domain::MobilePaymentMethodSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput'])
90
95
  end
96
+ if hash.has_key? 'omnichannelPaymentSpecificInput'
97
+ raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelPaymentSpecificInput']] unless hash['omnichannelPaymentSpecificInput'].is_a? Hash
98
+ @omnichannel_payment_specific_input = OnlinePayments::SDK::Domain::OmnichannelPaymentSpecificInput.new_from_hash(hash['omnichannelPaymentSpecificInput'])
99
+ end
91
100
  if hash.has_key? 'order'
92
101
  raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
93
102
  @order = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order'])
@@ -0,0 +1,37 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [true/false] cvv_mandatory_for_existing_token
10
+ # @attr [true/false] cvv_mandatory_for_new_token
11
+ class CreditCardValidationRulesHostedTokenization < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :cvv_mandatory_for_existing_token
14
+
15
+ attr_accessor :cvv_mandatory_for_new_token
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['cvvMandatoryForExistingToken'] = @cvv_mandatory_for_existing_token unless @cvv_mandatory_for_existing_token.nil?
21
+ hash['cvvMandatoryForNewToken'] = @cvv_mandatory_for_new_token unless @cvv_mandatory_for_new_token.nil?
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ if hash.has_key? 'cvvMandatoryForExistingToken'
28
+ @cvv_mandatory_for_existing_token = hash['cvvMandatoryForExistingToken']
29
+ end
30
+ if hash.has_key? 'cvvMandatoryForNewToken'
31
+ @cvv_mandatory_for_new_token = hash['cvvMandatoryForNewToken']
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] csr
10
+ class CsrRequest < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :csr
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['csr'] = @csr unless @csr.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'csr'
24
+ @csr = hash['csr']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,35 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/detokenized_token_response'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [Array<OnlinePayments::SDK::Domain::DetokenizedTokenResponse>] tokens
11
+ class DetokenizationResponse < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :tokens
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['tokens'] = @tokens.collect{|val| val.to_h} unless @tokens.nil?
19
+ hash
20
+ end
21
+
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key? 'tokens'
25
+ raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array
26
+ @tokens = []
27
+ hash['tokens'].each do |e|
28
+ @tokens << OnlinePayments::SDK::Domain::DetokenizedTokenResponse.new_from_hash(e)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,72 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] card_brand
10
+ # @attr [String] card_expiry_date
11
+ # @attr [String] card_holder_name
12
+ # @attr [String] encrypted_card_number
13
+ # @attr [String] payment_id
14
+ # @attr [String] scheme_reference_data
15
+ # @attr [String] token
16
+ class DetokenizedTokenResponse < OnlinePayments::SDK::Domain::DataObject
17
+
18
+ attr_accessor :card_brand
19
+
20
+ attr_accessor :card_expiry_date
21
+
22
+ attr_accessor :card_holder_name
23
+
24
+ attr_accessor :encrypted_card_number
25
+
26
+ attr_accessor :payment_id
27
+
28
+ attr_accessor :scheme_reference_data
29
+
30
+ attr_accessor :token
31
+
32
+ # @return (Hash)
33
+ def to_h
34
+ hash = super
35
+ hash['cardBrand'] = @card_brand unless @card_brand.nil?
36
+ hash['cardExpiryDate'] = @card_expiry_date unless @card_expiry_date.nil?
37
+ hash['cardHolderName'] = @card_holder_name unless @card_holder_name.nil?
38
+ hash['encryptedCardNumber'] = @encrypted_card_number unless @encrypted_card_number.nil?
39
+ hash['paymentId'] = @payment_id unless @payment_id.nil?
40
+ hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
41
+ hash['token'] = @token unless @token.nil?
42
+ hash
43
+ end
44
+
45
+ def from_hash(hash)
46
+ super
47
+ if hash.has_key? 'cardBrand'
48
+ @card_brand = hash['cardBrand']
49
+ end
50
+ if hash.has_key? 'cardExpiryDate'
51
+ @card_expiry_date = hash['cardExpiryDate']
52
+ end
53
+ if hash.has_key? 'cardHolderName'
54
+ @card_holder_name = hash['cardHolderName']
55
+ end
56
+ if hash.has_key? 'encryptedCardNumber'
57
+ @encrypted_card_number = hash['encryptedCardNumber']
58
+ end
59
+ if hash.has_key? 'paymentId'
60
+ @payment_id = hash['paymentId']
61
+ end
62
+ if hash.has_key? 'schemeReferenceData'
63
+ @scheme_reference_data = hash['schemeReferenceData']
64
+ end
65
+ if hash.has_key? 'token'
66
+ @token = hash['token']
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,60 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/card_data_without_cvv'
5
+ require 'onlinepayments/sdk/domain/data_object'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [OnlinePayments::SDK::Domain::CardDataWithoutCvv] card
11
+ # @attr [String] currency_code
12
+ # @attr [Integer] payment_product_id
13
+ # @attr [String] scheme_reference_data
14
+ # @attr [String] token_id
15
+ class ImportCofSeriesRequest < OnlinePayments::SDK::Domain::DataObject
16
+
17
+ attr_accessor :card
18
+
19
+ attr_accessor :currency_code
20
+
21
+ attr_accessor :payment_product_id
22
+
23
+ attr_accessor :scheme_reference_data
24
+
25
+ attr_accessor :token_id
26
+
27
+ # @return (Hash)
28
+ def to_h
29
+ hash = super
30
+ hash['card'] = @card.to_h unless @card.nil?
31
+ hash['currencyCode'] = @currency_code unless @currency_code.nil?
32
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
33
+ hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
34
+ hash['tokenId'] = @token_id unless @token_id.nil?
35
+ hash
36
+ end
37
+
38
+ def from_hash(hash)
39
+ super
40
+ if hash.has_key? 'card'
41
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
42
+ @card = OnlinePayments::SDK::Domain::CardDataWithoutCvv.new_from_hash(hash['card'])
43
+ end
44
+ if hash.has_key? 'currencyCode'
45
+ @currency_code = hash['currencyCode']
46
+ end
47
+ if hash.has_key? 'paymentProductId'
48
+ @payment_product_id = hash['paymentProductId']
49
+ end
50
+ if hash.has_key? 'schemeReferenceData'
51
+ @scheme_reference_data = hash['schemeReferenceData']
52
+ end
53
+ if hash.has_key? 'tokenId'
54
+ @token_id = hash['tokenId']
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] payment_id
10
+ class ImportCofSeriesResponse < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :payment_id
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['paymentId'] = @payment_id unless @payment_id.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'paymentId'
24
+ @payment_id = hash['paymentId']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] line_item_id
10
+ # @attr [Integer] quantity
11
+ class LineItemDetail < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :line_item_id
14
+
15
+ attr_accessor :quantity
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['lineItemId'] = @line_item_id unless @line_item_id.nil?
21
+ hash['quantity'] = @quantity unless @quantity.nil?
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ if hash.has_key? 'lineItemId'
28
+ @line_item_id = hash['lineItemId']
29
+ end
30
+ if hash.has_key? 'quantity'
31
+ @quantity = hash['quantity']
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+
6
+ module OnlinePayments
7
+ module SDK
8
+ module Domain
9
+ # @attr [String] operator_id
10
+ class OmnichannelPaymentSpecificInput < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :operator_id
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['operatorId'] = @operator_id unless @operator_id.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'operatorId'
24
+ @operator_id = hash['operatorId']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end