onlinepayments-sdk-ruby 6.4.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 (65) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +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/card_payment_method_specific_input.rb +9 -0
  8. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +9 -0
  9. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_for_hosted_checkout.rb +7 -0
  10. data/lib/onlinepayments/sdk/domain/create_certificate_response.rb +37 -0
  11. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_request.rb +30 -0
  12. data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb +46 -0
  13. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +7 -0
  14. data/lib/onlinepayments/sdk/domain/create_payment_request.rb +9 -0
  15. data/lib/onlinepayments/sdk/domain/created_token_response.rb +9 -0
  16. data/lib/onlinepayments/sdk/domain/credit_card_specific_input_hosted_tokenization.rb +3 -3
  17. data/lib/onlinepayments/sdk/domain/credit_card_validation_rules.rb +37 -0
  18. data/lib/onlinepayments/sdk/domain/crm_token.rb +37 -0
  19. data/lib/onlinepayments/sdk/domain/csr_request.rb +30 -0
  20. data/lib/onlinepayments/sdk/domain/detokenization_response.rb +35 -0
  21. data/lib/onlinepayments/sdk/domain/detokenized_token_response.rb +72 -0
  22. data/lib/onlinepayments/sdk/domain/g_pay_three_d_secure.rb +7 -0
  23. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +9 -0
  24. data/lib/onlinepayments/sdk/domain/import_cof_series_request.rb +60 -0
  25. data/lib/onlinepayments/sdk/domain/import_cof_series_response.rb +30 -0
  26. data/lib/onlinepayments/sdk/domain/line_item_detail.rb +37 -0
  27. data/lib/onlinepayments/sdk/domain/market_place.rb +37 -0
  28. data/lib/onlinepayments/sdk/domain/omnichannel_payment_specific_input.rb +30 -0
  29. data/lib/onlinepayments/sdk/domain/omnichannel_payout_specific_input.rb +7 -0
  30. data/lib/onlinepayments/sdk/domain/omnichannel_subsequent_specific_input.rb +30 -0
  31. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +7 -0
  32. data/lib/onlinepayments/sdk/domain/payment_output.rb +9 -0
  33. data/lib/onlinepayments/sdk/domain/payment_product840.rb +30 -0
  34. data/lib/onlinepayments/sdk/domain/payment_product840_specific_output.rb +15 -0
  35. data/lib/onlinepayments/sdk/domain/payment_response.rb +9 -0
  36. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +18 -0
  37. data/lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb +32 -0
  38. data/lib/onlinepayments/sdk/domain/redirect_payment_product3307_specific_input.rb +13 -0
  39. data/lib/onlinepayments/sdk/domain/redirect_payment_product5300_specific_input.rb +7 -0
  40. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_method_specific_input.rb +32 -0
  41. data/lib/onlinepayments/sdk/domain/refund_redirect_payment_product900_specific_input.rb +30 -0
  42. data/lib/onlinepayments/sdk/domain/refund_request.rb +21 -0
  43. data/lib/onlinepayments/sdk/domain/session_data.rb +62 -0
  44. data/lib/onlinepayments/sdk/domain/session_details.rb +37 -0
  45. data/lib/onlinepayments/sdk/domain/shopping_cart_output.rb +35 -0
  46. data/lib/onlinepayments/sdk/domain/show_form_data.rb +9 -0
  47. data/lib/onlinepayments/sdk/domain/split_payment_product_filter.rb +34 -0
  48. data/lib/onlinepayments/sdk/domain/split_payment_product_filters_hosted_checkout.rb +40 -0
  49. data/lib/onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input.rb +9 -0
  50. data/lib/onlinepayments/sdk/domain/subsequent_payment_request.rb +9 -0
  51. data/lib/onlinepayments/sdk/domain/token_response.rb +9 -0
  52. data/lib/onlinepayments/sdk/merchant/cofseries/cof_series_client.rb +55 -0
  53. data/lib/onlinepayments/sdk/merchant/cofseries.rb +4 -0
  54. data/lib/onlinepayments/sdk/merchant/hostedfields/hosted_fields_client.rb +55 -0
  55. data/lib/onlinepayments/sdk/merchant/hostedfields.rb +4 -0
  56. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +26 -2
  57. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +0 -29
  58. data/lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb +19 -19
  59. data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_payments_params.rb +40 -0
  60. data/lib/onlinepayments/sdk/merchant/tokenization/get_card_data_by_tokens_params.rb +40 -0
  61. data/lib/onlinepayments/sdk/merchant/tokenization/tokenization_client.rb +112 -0
  62. data/lib/onlinepayments/sdk/merchant/tokenization.rb +4 -0
  63. data/lib/onlinepayments/sdk/merchant/tokens/tokens_client.rb +24 -24
  64. data/onlinepayments-sdk-ruby.gemspec +1 -1
  65. metadata +35 -2
@@ -2,10 +2,12 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/redirect_payment_product11_specific_input'
5
6
  require 'onlinepayments/sdk/domain/redirect_payment_product3203_specific_input'
6
7
  require 'onlinepayments/sdk/domain/redirect_payment_product3204_specific_input'
7
8
  require 'onlinepayments/sdk/domain/redirect_payment_product3302_specific_input'
8
9
  require 'onlinepayments/sdk/domain/redirect_payment_product3306_specific_input'
10
+ require 'onlinepayments/sdk/domain/redirect_payment_product3307_specific_input'
9
11
  require 'onlinepayments/sdk/domain/redirect_payment_product5001_specific_input'
10
12
  require 'onlinepayments/sdk/domain/redirect_payment_product5300_specific_input'
11
13
  require 'onlinepayments/sdk/domain/redirect_payment_product5402_specific_input'
@@ -22,10 +24,12 @@ module OnlinePayments
22
24
  module SDK
23
25
  module Domain
24
26
  # @attr [String] payment_option
27
+ # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct11SpecificInput] payment_product11_specific_input
25
28
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput] payment_product3203_specific_input
26
29
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3204SpecificInput] payment_product3204_specific_input
27
30
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3302SpecificInput] payment_product3302_specific_input
28
31
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput] payment_product3306_specific_input
32
+ # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3307SpecificInput] payment_product3307_specific_input
29
33
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5001SpecificInput] payment_product5001_specific_input
30
34
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5300SpecificInput] payment_product5300_specific_input
31
35
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct5402SpecificInput] payment_product5402_specific_input
@@ -45,6 +49,8 @@ module OnlinePayments
45
49
 
46
50
  attr_accessor :payment_option
47
51
 
52
+ attr_accessor :payment_product11_specific_input
53
+
48
54
  attr_accessor :payment_product3203_specific_input
49
55
 
50
56
  attr_accessor :payment_product3204_specific_input
@@ -53,6 +59,8 @@ module OnlinePayments
53
59
 
54
60
  attr_accessor :payment_product3306_specific_input
55
61
 
62
+ attr_accessor :payment_product3307_specific_input
63
+
56
64
  attr_accessor :payment_product5001_specific_input
57
65
 
58
66
  attr_accessor :payment_product5300_specific_input
@@ -87,10 +95,12 @@ module OnlinePayments
87
95
  def to_h
88
96
  hash = super
89
97
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
98
+ hash['paymentProduct11SpecificInput'] = @payment_product11_specific_input.to_h unless @payment_product11_specific_input.nil?
90
99
  hash['paymentProduct3203SpecificInput'] = @payment_product3203_specific_input.to_h unless @payment_product3203_specific_input.nil?
91
100
  hash['paymentProduct3204SpecificInput'] = @payment_product3204_specific_input.to_h unless @payment_product3204_specific_input.nil?
92
101
  hash['paymentProduct3302SpecificInput'] = @payment_product3302_specific_input.to_h unless @payment_product3302_specific_input.nil?
93
102
  hash['paymentProduct3306SpecificInput'] = @payment_product3306_specific_input.to_h unless @payment_product3306_specific_input.nil?
103
+ hash['paymentProduct3307SpecificInput'] = @payment_product3307_specific_input.to_h unless @payment_product3307_specific_input.nil?
94
104
  hash['paymentProduct5001SpecificInput'] = @payment_product5001_specific_input.to_h unless @payment_product5001_specific_input.nil?
95
105
  hash['paymentProduct5300SpecificInput'] = @payment_product5300_specific_input.to_h unless @payment_product5300_specific_input.nil?
96
106
  hash['paymentProduct5402SpecificInput'] = @payment_product5402_specific_input.to_h unless @payment_product5402_specific_input.nil?
@@ -114,6 +124,10 @@ module OnlinePayments
114
124
  if hash.has_key? 'paymentOption'
115
125
  @payment_option = hash['paymentOption']
116
126
  end
127
+ if hash.has_key? 'paymentProduct11SpecificInput'
128
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct11SpecificInput']] unless hash['paymentProduct11SpecificInput'].is_a? Hash
129
+ @payment_product11_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct11SpecificInput.new_from_hash(hash['paymentProduct11SpecificInput'])
130
+ end
117
131
  if hash.has_key? 'paymentProduct3203SpecificInput'
118
132
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3203SpecificInput']] unless hash['paymentProduct3203SpecificInput'].is_a? Hash
119
133
  @payment_product3203_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3203SpecificInput.new_from_hash(hash['paymentProduct3203SpecificInput'])
@@ -130,6 +144,10 @@ module OnlinePayments
130
144
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3306SpecificInput']] unless hash['paymentProduct3306SpecificInput'].is_a? Hash
131
145
  @payment_product3306_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput.new_from_hash(hash['paymentProduct3306SpecificInput'])
132
146
  end
147
+ if hash.has_key? 'paymentProduct3307SpecificInput'
148
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3307SpecificInput']] unless hash['paymentProduct3307SpecificInput'].is_a? Hash
149
+ @payment_product3307_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3307SpecificInput.new_from_hash(hash['paymentProduct3307SpecificInput'])
150
+ end
133
151
  if hash.has_key? 'paymentProduct5001SpecificInput'
134
152
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5001SpecificInput']] unless hash['paymentProduct5001SpecificInput'].is_a? Hash
135
153
  @payment_product5001_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct5001SpecificInput.new_from_hash(hash['paymentProduct5001SpecificInput'])
@@ -0,0 +1,32 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'date'
5
+
6
+ require 'onlinepayments/sdk/domain/data_object'
7
+
8
+ module OnlinePayments
9
+ module SDK
10
+ module Domain
11
+ # @attr [Date] first_installment_payment_date
12
+ class RedirectPaymentProduct11SpecificInput < OnlinePayments::SDK::Domain::DataObject
13
+
14
+ attr_accessor :first_installment_payment_date
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['firstInstallmentPaymentDate'] = @first_installment_payment_date.iso8601 unless @first_installment_payment_date.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key? 'firstInstallmentPaymentDate'
26
+ @first_installment_payment_date = Date.parse(hash['firstInstallmentPaymentDate'])
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,13 @@
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
+ class RedirectPaymentProduct3307SpecificInput < OnlinePayments::SDK::Domain::DataObject
10
+ end
11
+ end
12
+ end
13
+ end
@@ -13,6 +13,7 @@ module OnlinePayments
13
13
  # @attr [String] loyalty_card_number
14
14
  # @attr [String] second_installment_payment_date
15
15
  # @attr [Integer] session_duration
16
+ # @attr [String] title
16
17
  class RedirectPaymentProduct5300SpecificInput < OnlinePayments::SDK::Domain::DataObject
17
18
 
18
19
  attr_accessor :birth_city
@@ -29,6 +30,8 @@ module OnlinePayments
29
30
 
30
31
  attr_accessor :session_duration
31
32
 
33
+ attr_accessor :title
34
+
32
35
  # @return (Hash)
33
36
  def to_h
34
37
  hash = super
@@ -39,6 +42,7 @@ module OnlinePayments
39
42
  hash['loyaltyCardNumber'] = @loyalty_card_number unless @loyalty_card_number.nil?
40
43
  hash['secondInstallmentPaymentDate'] = @second_installment_payment_date unless @second_installment_payment_date.nil?
41
44
  hash['sessionDuration'] = @session_duration unless @session_duration.nil?
45
+ hash['title'] = @title unless @title.nil?
42
46
  hash
43
47
  end
44
48
 
@@ -65,6 +69,9 @@ module OnlinePayments
65
69
  if hash.has_key? 'sessionDuration'
66
70
  @session_duration = hash['sessionDuration']
67
71
  end
72
+ if hash.has_key? 'title'
73
+ @title = hash['title']
74
+ end
68
75
  end
69
76
  end
70
77
  end
@@ -0,0 +1,32 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/refund_redirect_payment_product900_specific_input'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [OnlinePayments::SDK::Domain::RefundRedirectPaymentProduct900SpecificInput] refund_redirect_payment_product900_specific_input
11
+ class RefundRedirectPaymentMethodSpecificInput < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :refund_redirect_payment_product900_specific_input
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['refundRedirectPaymentProduct900SpecificInput'] = @refund_redirect_payment_product900_specific_input.to_h unless @refund_redirect_payment_product900_specific_input.nil?
19
+ hash
20
+ end
21
+
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key? 'refundRedirectPaymentProduct900SpecificInput'
25
+ raise TypeError, "value '%s' is not a Hash" % [hash['refundRedirectPaymentProduct900SpecificInput']] unless hash['refundRedirectPaymentProduct900SpecificInput'].is_a? Hash
26
+ @refund_redirect_payment_product900_specific_input = OnlinePayments::SDK::Domain::RefundRedirectPaymentProduct900SpecificInput.new_from_hash(hash['refundRedirectPaymentProduct900SpecificInput'])
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ 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] refund_reason
10
+ class RefundRedirectPaymentProduct900SpecificInput < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :refund_reason
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['refundReason'] = @refund_reason unless @refund_reason.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'refundReason'
24
+ @refund_reason = hash['refundReason']
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -3,25 +3,31 @@
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/omnichannel_refund_specific_input'
7
8
  require 'onlinepayments/sdk/domain/operation_payment_references'
8
9
  require 'onlinepayments/sdk/domain/payment_references'
10
+ require 'onlinepayments/sdk/domain/refund_redirect_payment_method_specific_input'
9
11
 
10
12
  module OnlinePayments
11
13
  module SDK
12
14
  module Domain
13
15
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount_of_money
14
16
  # @attr [String] capture_id
17
+ # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
15
18
  # @attr [OnlinePayments::SDK::Domain::OmnichannelRefundSpecificInput] omnichannel_refund_specific_input
16
19
  # @attr [OnlinePayments::SDK::Domain::OperationPaymentReferences] operation_references
17
20
  # @attr [String] reason
18
21
  # @attr [OnlinePayments::SDK::Domain::PaymentReferences] references
22
+ # @attr [OnlinePayments::SDK::Domain::RefundRedirectPaymentMethodSpecificInput] refund_redirect_payment_method_specific_input
19
23
  class RefundRequest < OnlinePayments::SDK::Domain::DataObject
20
24
 
21
25
  attr_accessor :amount_of_money
22
26
 
23
27
  attr_accessor :capture_id
24
28
 
29
+ attr_accessor :line_item_details
30
+
25
31
  attr_accessor :omnichannel_refund_specific_input
26
32
 
27
33
  attr_accessor :operation_references
@@ -30,15 +36,19 @@ module OnlinePayments
30
36
 
31
37
  attr_accessor :references
32
38
 
39
+ attr_accessor :refund_redirect_payment_method_specific_input
40
+
33
41
  # @return (Hash)
34
42
  def to_h
35
43
  hash = super
36
44
  hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
37
45
  hash['captureId'] = @capture_id unless @capture_id.nil?
46
+ hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
38
47
  hash['omnichannelRefundSpecificInput'] = @omnichannel_refund_specific_input.to_h unless @omnichannel_refund_specific_input.nil?
39
48
  hash['operationReferences'] = @operation_references.to_h unless @operation_references.nil?
40
49
  hash['reason'] = @reason unless @reason.nil?
41
50
  hash['references'] = @references.to_h unless @references.nil?
51
+ hash['refundRedirectPaymentMethodSpecificInput'] = @refund_redirect_payment_method_specific_input.to_h unless @refund_redirect_payment_method_specific_input.nil?
42
52
  hash
43
53
  end
44
54
 
@@ -51,6 +61,13 @@ module OnlinePayments
51
61
  if hash.has_key? 'captureId'
52
62
  @capture_id = hash['captureId']
53
63
  end
64
+ if hash.has_key? 'lineItemDetails'
65
+ raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
66
+ @line_item_details = []
67
+ hash['lineItemDetails'].each do |e|
68
+ @line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
69
+ end
70
+ end
54
71
  if hash.has_key? 'omnichannelRefundSpecificInput'
55
72
  raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelRefundSpecificInput']] unless hash['omnichannelRefundSpecificInput'].is_a? Hash
56
73
  @omnichannel_refund_specific_input = OnlinePayments::SDK::Domain::OmnichannelRefundSpecificInput.new_from_hash(hash['omnichannelRefundSpecificInput'])
@@ -66,6 +83,10 @@ module OnlinePayments
66
83
  raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
67
84
  @references = OnlinePayments::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
68
85
  end
86
+ if hash.has_key? 'refundRedirectPaymentMethodSpecificInput'
87
+ raise TypeError, "value '%s' is not a Hash" % [hash['refundRedirectPaymentMethodSpecificInput']] unless hash['refundRedirectPaymentMethodSpecificInput'].is_a? Hash
88
+ @refund_redirect_payment_method_specific_input = OnlinePayments::SDK::Domain::RefundRedirectPaymentMethodSpecificInput.new_from_hash(hash['refundRedirectPaymentMethodSpecificInput'])
89
+ end
69
90
  end
70
91
  end
71
92
  end
@@ -0,0 +1,62 @@
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] hosted_fields_session_id
10
+ # @attr [String] locale
11
+ # @attr [String] platform_url
12
+ # @attr [String] session_token
13
+ # @attr [Array<String>] tokens
14
+ class SessionData < OnlinePayments::SDK::Domain::DataObject
15
+
16
+ attr_accessor :hosted_fields_session_id
17
+
18
+ attr_accessor :locale
19
+
20
+ attr_accessor :platform_url
21
+
22
+ attr_accessor :session_token
23
+
24
+ attr_accessor :tokens
25
+
26
+ # @return (Hash)
27
+ def to_h
28
+ hash = super
29
+ hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil?
30
+ hash['locale'] = @locale unless @locale.nil?
31
+ hash['platformUrl'] = @platform_url unless @platform_url.nil?
32
+ hash['sessionToken'] = @session_token unless @session_token.nil?
33
+ hash['tokens'] = @tokens unless @tokens.nil?
34
+ hash
35
+ end
36
+
37
+ def from_hash(hash)
38
+ super
39
+ if hash.has_key? 'hostedFieldsSessionId'
40
+ @hosted_fields_session_id = hash['hostedFieldsSessionId']
41
+ end
42
+ if hash.has_key? 'locale'
43
+ @locale = hash['locale']
44
+ end
45
+ if hash.has_key? 'platformUrl'
46
+ @platform_url = hash['platformUrl']
47
+ end
48
+ if hash.has_key? 'sessionToken'
49
+ @session_token = hash['sessionToken']
50
+ end
51
+ if hash.has_key? 'tokens'
52
+ raise TypeError, "value '%s' is not an Array" % [hash['tokens']] unless hash['tokens'].is_a? Array
53
+ @tokens = []
54
+ hash['tokens'].each do |e|
55
+ @tokens << e
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
62
+ 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] id
10
+ # @attr [String] type
11
+ class SessionDetails < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :id
14
+
15
+ attr_accessor :type
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['id'] = @id unless @id.nil?
21
+ hash['type'] = @type unless @type.nil?
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ if hash.has_key? 'id'
28
+ @id = hash['id']
29
+ end
30
+ if hash.has_key? 'type'
31
+ @type = hash['type']
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ 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/line_item_detail'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [Array<OnlinePayments::SDK::Domain::LineItemDetail>] line_item_details
11
+ class ShoppingCartOutput < OnlinePayments::SDK::Domain::DataObject
12
+
13
+ attr_accessor :line_item_details
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['lineItemDetails'] = @line_item_details.collect{|val| val.to_h} unless @line_item_details.nil?
19
+ hash
20
+ end
21
+
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key? 'lineItemDetails'
25
+ raise TypeError, "value '%s' is not an Array" % [hash['lineItemDetails']] unless hash['lineItemDetails'].is_a? Array
26
+ @line_item_details = []
27
+ hash['lineItemDetails'].each do |e|
28
+ @line_item_details << OnlinePayments::SDK::Domain::LineItemDetail.new_from_hash(e)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -7,6 +7,7 @@ require 'onlinepayments/sdk/domain/payment_product350'
7
7
  require 'onlinepayments/sdk/domain/payment_product5001'
8
8
  require 'onlinepayments/sdk/domain/payment_product5404'
9
9
  require 'onlinepayments/sdk/domain/payment_product5407'
10
+ require 'onlinepayments/sdk/domain/payment_product840'
10
11
  require 'onlinepayments/sdk/domain/pending_authentication'
11
12
 
12
13
  module OnlinePayments
@@ -17,6 +18,7 @@ module OnlinePayments
17
18
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5001] payment_product5001
18
19
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5404] payment_product5404
19
20
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5407] payment_product5407
21
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct840] payment_product840
20
22
  # @attr [OnlinePayments::SDK::Domain::PendingAuthentication] pending_authentication
21
23
  class ShowFormData < OnlinePayments::SDK::Domain::DataObject
22
24
 
@@ -30,6 +32,8 @@ module OnlinePayments
30
32
 
31
33
  attr_accessor :payment_product5407
32
34
 
35
+ attr_accessor :payment_product840
36
+
33
37
  attr_accessor :pending_authentication
34
38
 
35
39
  # @return (Hash)
@@ -40,6 +44,7 @@ module OnlinePayments
40
44
  hash['paymentProduct5001'] = @payment_product5001.to_h unless @payment_product5001.nil?
41
45
  hash['paymentProduct5404'] = @payment_product5404.to_h unless @payment_product5404.nil?
42
46
  hash['paymentProduct5407'] = @payment_product5407.to_h unless @payment_product5407.nil?
47
+ hash['paymentProduct840'] = @payment_product840.to_h unless @payment_product840.nil?
43
48
  hash['pendingAuthentication'] = @pending_authentication.to_h unless @pending_authentication.nil?
44
49
  hash
45
50
  end
@@ -66,6 +71,10 @@ module OnlinePayments
66
71
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5407']] unless hash['paymentProduct5407'].is_a? Hash
67
72
  @payment_product5407 = OnlinePayments::SDK::Domain::PaymentProduct5407.new_from_hash(hash['paymentProduct5407'])
68
73
  end
74
+ if hash.has_key? 'paymentProduct840'
75
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct840']] unless hash['paymentProduct840'].is_a? Hash
76
+ @payment_product840 = OnlinePayments::SDK::Domain::PaymentProduct840.new_from_hash(hash['paymentProduct840'])
77
+ end
69
78
  if hash.has_key? 'pendingAuthentication'
70
79
  raise TypeError, "value '%s' is not a Hash" % [hash['pendingAuthentication']] unless hash['pendingAuthentication'].is_a? Hash
71
80
  @pending_authentication = OnlinePayments::SDK::Domain::PendingAuthentication.new_from_hash(hash['pendingAuthentication'])
@@ -0,0 +1,34 @@
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 [Array<Integer>] products
10
+ class SplitPaymentProductFilter < OnlinePayments::SDK::Domain::DataObject
11
+
12
+ attr_accessor :products
13
+
14
+ # @return (Hash)
15
+ def to_h
16
+ hash = super
17
+ hash['products'] = @products unless @products.nil?
18
+ hash
19
+ end
20
+
21
+ def from_hash(hash)
22
+ super
23
+ if hash.has_key? 'products'
24
+ raise TypeError, "value '%s' is not an Array" % [hash['products']] unless hash['products'].is_a? Array
25
+ @products = []
26
+ hash['products'].each do |e|
27
+ @products << e
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,40 @@
1
+ #
2
+ # This file was automatically generated.
3
+ #
4
+ require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/split_payment_product_filter'
6
+
7
+ module OnlinePayments
8
+ module SDK
9
+ module Domain
10
+ # @attr [OnlinePayments::SDK::Domain::SplitPaymentProductFilter] exclude
11
+ # @attr [OnlinePayments::SDK::Domain::SplitPaymentProductFilter] restrict_to
12
+ class SplitPaymentProductFiltersHostedCheckout < OnlinePayments::SDK::Domain::DataObject
13
+
14
+ attr_accessor :exclude
15
+
16
+ attr_accessor :restrict_to
17
+
18
+ # @return (Hash)
19
+ def to_h
20
+ hash = super
21
+ hash['exclude'] = @exclude.to_h unless @exclude.nil?
22
+ hash['restrictTo'] = @restrict_to.to_h unless @restrict_to.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ if hash.has_key? 'exclude'
29
+ raise TypeError, "value '%s' is not a Hash" % [hash['exclude']] unless hash['exclude'].is_a? Hash
30
+ @exclude = OnlinePayments::SDK::Domain::SplitPaymentProductFilter.new_from_hash(hash['exclude'])
31
+ end
32
+ if hash.has_key? 'restrictTo'
33
+ raise TypeError, "value '%s' is not a Hash" % [hash['restrictTo']] unless hash['restrictTo'].is_a? Hash
34
+ @restrict_to = OnlinePayments::SDK::Domain::SplitPaymentProductFilter.new_from_hash(hash['restrictTo'])
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -2,11 +2,13 @@
2
2
  # This file was automatically generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/domain/data_object'
5
+ require 'onlinepayments/sdk/domain/market_place'
5
6
 
6
7
  module OnlinePayments
7
8
  module SDK
8
9
  module Domain
9
10
  # @attr [String] authorization_mode
11
+ # @attr [OnlinePayments::SDK::Domain::MarketPlace] market_place
10
12
  # @attr [Integer] payment_number
11
13
  # @attr [String] scheme_reference_data
12
14
  # @attr [String] subsequent_type
@@ -16,6 +18,8 @@ module OnlinePayments
16
18
 
17
19
  attr_accessor :authorization_mode
18
20
 
21
+ attr_accessor :market_place
22
+
19
23
  attr_accessor :payment_number
20
24
 
21
25
  # @deprecated Deprecated
@@ -32,6 +36,7 @@ module OnlinePayments
32
36
  def to_h
33
37
  hash = super
34
38
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
39
+ hash['marketPlace'] = @market_place.to_h unless @market_place.nil?
35
40
  hash['paymentNumber'] = @payment_number unless @payment_number.nil?
36
41
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
37
42
  hash['subsequentType'] = @subsequent_type unless @subsequent_type.nil?
@@ -45,6 +50,10 @@ module OnlinePayments
45
50
  if hash.has_key? 'authorizationMode'
46
51
  @authorization_mode = hash['authorizationMode']
47
52
  end
53
+ if hash.has_key? 'marketPlace'
54
+ raise TypeError, "value '%s' is not a Hash" % [hash['marketPlace']] unless hash['marketPlace'].is_a? Hash
55
+ @market_place = OnlinePayments::SDK::Domain::MarketPlace.new_from_hash(hash['marketPlace'])
56
+ end
48
57
  if hash.has_key? 'paymentNumber'
49
58
  @payment_number = hash['paymentNumber']
50
59
  end
@@ -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/omnichannel_subsequent_specific_input'
5
6
  require 'onlinepayments/sdk/domain/order'
6
7
  require 'onlinepayments/sdk/domain/subsequent_card_payment_method_specific_input'
7
8
  require 'onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input'
@@ -9,11 +10,14 @@ require 'onlinepayments/sdk/domain/subsequent_payment_product5001_specific_input
9
10
  module OnlinePayments
10
11
  module SDK
11
12
  module Domain
13
+ # @attr [OnlinePayments::SDK::Domain::OmnichannelSubsequentSpecificInput] omnichannel_subsequent_specific_input
12
14
  # @attr [OnlinePayments::SDK::Domain::Order] order
13
15
  # @attr [OnlinePayments::SDK::Domain::SubsequentPaymentProduct5001SpecificInput] subsequent_payment_product5001_specific_input
14
16
  # @attr [OnlinePayments::SDK::Domain::SubsequentCardPaymentMethodSpecificInput] subsequentcard_payment_method_specific_input
15
17
  class SubsequentPaymentRequest < OnlinePayments::SDK::Domain::DataObject
16
18
 
19
+ attr_accessor :omnichannel_subsequent_specific_input
20
+
17
21
  attr_accessor :order
18
22
 
19
23
  attr_accessor :subsequent_payment_product5001_specific_input
@@ -23,6 +27,7 @@ module OnlinePayments
23
27
  # @return (Hash)
24
28
  def to_h
25
29
  hash = super
30
+ hash['omnichannelSubsequentSpecificInput'] = @omnichannel_subsequent_specific_input.to_h unless @omnichannel_subsequent_specific_input.nil?
26
31
  hash['order'] = @order.to_h unless @order.nil?
27
32
  hash['subsequentPaymentProduct5001SpecificInput'] = @subsequent_payment_product5001_specific_input.to_h unless @subsequent_payment_product5001_specific_input.nil?
28
33
  hash['subsequentcardPaymentMethodSpecificInput'] = @subsequentcard_payment_method_specific_input.to_h unless @subsequentcard_payment_method_specific_input.nil?
@@ -31,6 +36,10 @@ module OnlinePayments
31
36
 
32
37
  def from_hash(hash)
33
38
  super
39
+ if hash.has_key? 'omnichannelSubsequentSpecificInput'
40
+ raise TypeError, "value '%s' is not a Hash" % [hash['omnichannelSubsequentSpecificInput']] unless hash['omnichannelSubsequentSpecificInput'].is_a? Hash
41
+ @omnichannel_subsequent_specific_input = OnlinePayments::SDK::Domain::OmnichannelSubsequentSpecificInput.new_from_hash(hash['omnichannelSubsequentSpecificInput'])
42
+ end
34
43
  if hash.has_key? 'order'
35
44
  raise TypeError, "value '%s' is not a Hash" % [hash['order']] unless hash['order'].is_a? Hash
36
45
  @order = OnlinePayments::SDK::Domain::Order.new_from_hash(hash['order'])