onlinepayments-sdk-ruby 4.9.0 → 4.11.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 (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onlinepayments/sdk/domain/card_info.rb +30 -0
  3. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input.rb +24 -0
  4. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_input_base.rb +24 -0
  5. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +24 -0
  6. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +42 -0
  7. data/lib/onlinepayments/sdk/domain/currency_conversion.rb +34 -0
  8. data/lib/onlinepayments/sdk/domain/currency_conversion_input.rb +30 -0
  9. data/lib/onlinepayments/sdk/domain/currency_conversion_request.rb +38 -0
  10. data/lib/onlinepayments/sdk/domain/currency_conversion_response.rb +42 -0
  11. data/lib/onlinepayments/sdk/domain/currency_conversion_result.rb +30 -0
  12. data/lib/onlinepayments/sdk/domain/currency_conversion_specific_input.rb +26 -0
  13. data/lib/onlinepayments/sdk/domain/dcc_proposal.rb +53 -0
  14. data/lib/onlinepayments/sdk/domain/hosted_checkout_specific_input.rb +4 -0
  15. data/lib/onlinepayments/sdk/domain/payment_link_event.rb +34 -0
  16. data/lib/onlinepayments/sdk/domain/payment_link_order.rb +34 -0
  17. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +65 -0
  18. data/lib/onlinepayments/sdk/domain/payment_product3208_specific_input.rb +26 -0
  19. data/lib/onlinepayments/sdk/domain/payment_product3208_specific_output.rb +26 -0
  20. data/lib/onlinepayments/sdk/domain/payment_product3209_specific_input.rb +26 -0
  21. data/lib/onlinepayments/sdk/domain/payment_product3209_specific_output.rb +26 -0
  22. data/lib/onlinepayments/sdk/domain/payment_product5407.rb +30 -0
  23. data/lib/onlinepayments/sdk/domain/rate_details.rb +42 -0
  24. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +8 -0
  25. data/lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb +26 -0
  26. data/lib/onlinepayments/sdk/domain/refund_card_method_specific_output.rb +8 -0
  27. data/lib/onlinepayments/sdk/domain/show_form_data.rb +8 -0
  28. data/lib/onlinepayments/sdk/domain/transaction.rb +34 -0
  29. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +7 -0
  30. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +116 -0
  31. data/lib/onlinepayments/sdk/merchant/services/services_client.rb +31 -0
  32. data/onlinepayments-sdk-ruby.gemspec +1 -1
  33. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 484cd023490a573421f71cf0c9ffa8a69320840a7e272de3a3f3f8d21884e6ea
4
- data.tar.gz: 2762d2aa8c72e59bc3c5d64534abaf84522ca4a9e290cc8334f5a8b5de57f1a1
3
+ metadata.gz: d75fd99e2b72c9db652f12553b25c04f5986a0bea7f2b98775a4c67391f6b99e
4
+ data.tar.gz: da5b78dffbbf2699360f56512db2f9bbdc5545bad10ec6a5c82f82319ed913bf
5
5
  SHA512:
6
- metadata.gz: 53f46cd3a1b4f609d392c98206386082fe85f14214d7addcc1227f3f2abf2bcf4b5235f13ae2a39e7911430c91e05bec0964fbede347418d9e1b5ca2c20a2cbe
7
- data.tar.gz: 91a8fc9abb51c257e24834ba20e87881a8f5fc0d3b3db52b3094922df2cfc89a01a59069ff8c1877f02f627e14ac7545cc24025a421185b556708c6ae2c6f583
6
+ metadata.gz: f8ebd6a4d36320f21b90710669733306c7ad5589522ace320a2c763a0119cf0bc53f780bbc679827e2c7bdfc5493221e50bf8fc51d3bec9013802b24d28feb68
7
+ data.tar.gz: 2d47e684e6786be11dd116a696373088ca83d727234075591fbee8e5784a708f9ae7cd05e07f57bfaf1e155ab07b190d78817de3586dd522d40c4e1f32717b07
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] card_number
10
+ # @attr [Integer] payment_product_id
11
+ class CardInfo < OnlinePayments::SDK::DataObject
12
+ attr_accessor :card_number
13
+ attr_accessor :payment_product_id
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['cardNumber'] = @card_number unless @card_number.nil?
19
+ hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @card_number = hash['cardNumber'] if hash.key? 'cardNumber'
26
+ @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
27
+ end
28
+ end
29
+ end
30
+ end
@@ -4,7 +4,10 @@
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card'
6
6
  require 'onlinepayments/sdk/domain/card_recurrence_details'
7
+ require 'onlinepayments/sdk/domain/currency_conversion_input'
7
8
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
9
+ require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
10
+ require 'onlinepayments/sdk/domain/payment_product3209_specific_input'
8
11
  require 'onlinepayments/sdk/domain/three_d_secure'
9
12
 
10
13
  module OnlinePayments::SDK
@@ -15,9 +18,12 @@ module OnlinePayments::SDK
15
18
  # @attr [OnlinePayments::SDK::Domain::Card] card
16
19
  # @attr [String] card_on_file_recurring_expiration
17
20
  # @attr [String] card_on_file_recurring_frequency
21
+ # @attr [OnlinePayments::SDK::Domain::CurrencyConversionInput] currency_conversion
18
22
  # @attr [String] initial_scheme_transaction_id
19
23
  # @attr [true/false] is_recurring
20
24
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
25
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
26
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput] payment_product3209_specific_input
21
27
  # @attr [Integer] payment_product_id
22
28
  # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
23
29
  # @attr [String] return_url
@@ -35,9 +41,12 @@ module OnlinePayments::SDK
35
41
  attr_accessor :card
36
42
  attr_accessor :card_on_file_recurring_expiration
37
43
  attr_accessor :card_on_file_recurring_frequency
44
+ attr_accessor :currency_conversion
38
45
  attr_accessor :initial_scheme_transaction_id
39
46
  attr_accessor :is_recurring
40
47
  attr_accessor :payment_product130_specific_input
48
+ attr_accessor :payment_product3208_specific_input
49
+ attr_accessor :payment_product3209_specific_input
41
50
  attr_accessor :payment_product_id
42
51
  attr_accessor :recurring
43
52
  attr_accessor :return_url
@@ -58,9 +67,12 @@ module OnlinePayments::SDK
58
67
  hash['card'] = @card.to_h if @card
59
68
  hash['cardOnFileRecurringExpiration'] = @card_on_file_recurring_expiration unless @card_on_file_recurring_expiration.nil?
60
69
  hash['cardOnFileRecurringFrequency'] = @card_on_file_recurring_frequency unless @card_on_file_recurring_frequency.nil?
70
+ hash['currencyConversion'] = @currency_conversion.to_h if @currency_conversion
61
71
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
62
72
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
63
73
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
74
+ hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h if @payment_product3208_specific_input
75
+ hash['paymentProduct3209SpecificInput'] = @payment_product3209_specific_input.to_h if @payment_product3209_specific_input
64
76
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
65
77
  hash['recurring'] = @recurring.to_h if @recurring
66
78
  hash['returnUrl'] = @return_url unless @return_url.nil?
@@ -85,12 +97,24 @@ module OnlinePayments::SDK
85
97
  end
86
98
  @card_on_file_recurring_expiration = hash['cardOnFileRecurringExpiration'] if hash.key? 'cardOnFileRecurringExpiration'
87
99
  @card_on_file_recurring_frequency = hash['cardOnFileRecurringFrequency'] if hash.key? 'cardOnFileRecurringFrequency'
100
+ if hash.key? 'currencyConversion'
101
+ raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
102
+ @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversionInput.new_from_hash(hash['currencyConversion'])
103
+ end
88
104
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
89
105
  @is_recurring = hash['isRecurring'] if hash.key? 'isRecurring'
90
106
  if hash.key? 'paymentProduct130SpecificInput'
91
107
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
92
108
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
93
109
  end
110
+ if hash.key? 'paymentProduct3208SpecificInput'
111
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificInput']] unless hash['paymentProduct3208SpecificInput'].is_a? Hash
112
+ @payment_product3208_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput.new_from_hash(hash['paymentProduct3208SpecificInput'])
113
+ end
114
+ if hash.key? 'paymentProduct3209SpecificInput'
115
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificInput']] unless hash['paymentProduct3209SpecificInput'].is_a? Hash
116
+ @payment_product3209_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput.new_from_hash(hash['paymentProduct3209SpecificInput'])
117
+ end
94
118
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
95
119
  if hash.key? 'recurring'
96
120
  raise TypeError, "value '%s' is not a Hash" % [hash['recurring']] unless hash['recurring'].is_a? Hash
@@ -3,7 +3,10 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card_recurrence_details'
6
+ require 'onlinepayments/sdk/domain/currency_conversion_specific_input'
6
7
  require 'onlinepayments/sdk/domain/payment_product130_specific_input'
8
+ require 'onlinepayments/sdk/domain/payment_product3208_specific_input'
9
+ require 'onlinepayments/sdk/domain/payment_product3209_specific_input'
7
10
  require 'onlinepayments/sdk/domain/payment_product5100_specific_input'
8
11
  require 'onlinepayments/sdk/domain/three_d_secure_base'
9
12
 
@@ -12,8 +15,11 @@ module OnlinePayments::SDK
12
15
 
13
16
  # @attr [true/false] allow_dynamic_linking
14
17
  # @attr [String] authorization_mode
18
+ # @attr [OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput] currency_conversion_specific_input
15
19
  # @attr [String] initial_scheme_transaction_id
16
20
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput] payment_product130_specific_input
21
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput] payment_product3208_specific_input
22
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput] payment_product3209_specific_input
17
23
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput] payment_product5100_specific_input
18
24
  # @attr [Integer] payment_product_id
19
25
  # @attr [OnlinePayments::SDK::Domain::CardRecurrenceDetails] recurring
@@ -26,8 +32,11 @@ module OnlinePayments::SDK
26
32
  class CardPaymentMethodSpecificInputBase < OnlinePayments::SDK::DataObject
27
33
  attr_accessor :allow_dynamic_linking
28
34
  attr_accessor :authorization_mode
35
+ attr_accessor :currency_conversion_specific_input
29
36
  attr_accessor :initial_scheme_transaction_id
30
37
  attr_accessor :payment_product130_specific_input
38
+ attr_accessor :payment_product3208_specific_input
39
+ attr_accessor :payment_product3209_specific_input
31
40
  attr_accessor :payment_product5100_specific_input
32
41
  attr_accessor :payment_product_id
33
42
  attr_accessor :recurring
@@ -43,8 +52,11 @@ module OnlinePayments::SDK
43
52
  hash = super
44
53
  hash['allowDynamicLinking'] = @allow_dynamic_linking unless @allow_dynamic_linking.nil?
45
54
  hash['authorizationMode'] = @authorization_mode unless @authorization_mode.nil?
55
+ hash['currencyConversionSpecificInput'] = @currency_conversion_specific_input.to_h if @currency_conversion_specific_input
46
56
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
47
57
  hash['paymentProduct130SpecificInput'] = @payment_product130_specific_input.to_h if @payment_product130_specific_input
58
+ hash['paymentProduct3208SpecificInput'] = @payment_product3208_specific_input.to_h if @payment_product3208_specific_input
59
+ hash['paymentProduct3209SpecificInput'] = @payment_product3209_specific_input.to_h if @payment_product3209_specific_input
48
60
  hash['paymentProduct5100SpecificInput'] = @payment_product5100_specific_input.to_h if @payment_product5100_specific_input
49
61
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
50
62
  hash['recurring'] = @recurring.to_h if @recurring
@@ -61,11 +73,23 @@ module OnlinePayments::SDK
61
73
  super
62
74
  @allow_dynamic_linking = hash['allowDynamicLinking'] if hash.key? 'allowDynamicLinking'
63
75
  @authorization_mode = hash['authorizationMode'] if hash.key? 'authorizationMode'
76
+ if hash.key? 'currencyConversionSpecificInput'
77
+ raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversionSpecificInput']] unless hash['currencyConversionSpecificInput'].is_a? Hash
78
+ @currency_conversion_specific_input = OnlinePayments::SDK::Domain::CurrencyConversionSpecificInput.new_from_hash(hash['currencyConversionSpecificInput'])
79
+ end
64
80
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
65
81
  if hash.key? 'paymentProduct130SpecificInput'
66
82
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct130SpecificInput']] unless hash['paymentProduct130SpecificInput'].is_a? Hash
67
83
  @payment_product130_specific_input = OnlinePayments::SDK::Domain::PaymentProduct130SpecificInput.new_from_hash(hash['paymentProduct130SpecificInput'])
68
84
  end
85
+ if hash.key? 'paymentProduct3208SpecificInput'
86
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificInput']] unless hash['paymentProduct3208SpecificInput'].is_a? Hash
87
+ @payment_product3208_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificInput.new_from_hash(hash['paymentProduct3208SpecificInput'])
88
+ end
89
+ if hash.key? 'paymentProduct3209SpecificInput'
90
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificInput']] unless hash['paymentProduct3209SpecificInput'].is_a? Hash
91
+ @payment_product3209_specific_input = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificInput.new_from_hash(hash['paymentProduct3209SpecificInput'])
92
+ end
69
93
  if hash.key? 'paymentProduct5100SpecificInput'
70
94
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5100SpecificInput']] unless hash['paymentProduct5100SpecificInput'].is_a? Hash
71
95
  @payment_product5100_specific_input = OnlinePayments::SDK::Domain::PaymentProduct5100SpecificInput.new_from_hash(hash['paymentProduct5100SpecificInput'])
@@ -4,7 +4,10 @@
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/card_essentials'
6
6
  require 'onlinepayments/sdk/domain/card_fraud_results'
7
+ require 'onlinepayments/sdk/domain/currency_conversion'
7
8
  require 'onlinepayments/sdk/domain/external_token_linked'
9
+ require 'onlinepayments/sdk/domain/payment_product3208_specific_output'
10
+ require 'onlinepayments/sdk/domain/payment_product3209_specific_output'
8
11
  require 'onlinepayments/sdk/domain/three_d_secure_results'
9
12
 
10
13
  module OnlinePayments::SDK
@@ -13,10 +16,13 @@ module OnlinePayments::SDK
13
16
  # @attr [Long] authenticated_amount
14
17
  # @attr [String] authorisation_code
15
18
  # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
19
+ # @attr [OnlinePayments::SDK::Domain::CurrencyConversion] currency_conversion
16
20
  # @attr [OnlinePayments::SDK::Domain::ExternalTokenLinked] external_token_linked
17
21
  # @attr [OnlinePayments::SDK::Domain::CardFraudResults] fraud_results
18
22
  # @attr [String] initial_scheme_transaction_id
19
23
  # @attr [String] payment_option
24
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput] payment_product3208_specific_output
25
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput] payment_product3209_specific_output
20
26
  # @attr [Integer] payment_product_id
21
27
  # @attr [String] scheme_reference_data
22
28
  # @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
@@ -25,10 +31,13 @@ module OnlinePayments::SDK
25
31
  attr_accessor :authenticated_amount
26
32
  attr_accessor :authorisation_code
27
33
  attr_accessor :card
34
+ attr_accessor :currency_conversion
28
35
  attr_accessor :external_token_linked
29
36
  attr_accessor :fraud_results
30
37
  attr_accessor :initial_scheme_transaction_id
31
38
  attr_accessor :payment_option
39
+ attr_accessor :payment_product3208_specific_output
40
+ attr_accessor :payment_product3209_specific_output
32
41
  attr_accessor :payment_product_id
33
42
  attr_accessor :scheme_reference_data
34
43
  attr_accessor :three_d_secure_results
@@ -40,10 +49,13 @@ module OnlinePayments::SDK
40
49
  hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
41
50
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
42
51
  hash['card'] = @card.to_h if @card
52
+ hash['currencyConversion'] = @currency_conversion.to_h if @currency_conversion
43
53
  hash['externalTokenLinked'] = @external_token_linked.to_h if @external_token_linked
44
54
  hash['fraudResults'] = @fraud_results.to_h if @fraud_results
45
55
  hash['initialSchemeTransactionId'] = @initial_scheme_transaction_id unless @initial_scheme_transaction_id.nil?
46
56
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
57
+ hash['paymentProduct3208SpecificOutput'] = @payment_product3208_specific_output.to_h if @payment_product3208_specific_output
58
+ hash['paymentProduct3209SpecificOutput'] = @payment_product3209_specific_output.to_h if @payment_product3209_specific_output
47
59
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
48
60
  hash['schemeReferenceData'] = @scheme_reference_data unless @scheme_reference_data.nil?
49
61
  hash['threeDSecureResults'] = @three_d_secure_results.to_h if @three_d_secure_results
@@ -59,6 +71,10 @@ module OnlinePayments::SDK
59
71
  raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
60
72
  @card = OnlinePayments::SDK::Domain::CardEssentials.new_from_hash(hash['card'])
61
73
  end
74
+ if hash.key? 'currencyConversion'
75
+ raise TypeError, "value '%s' is not a Hash" % [hash['currencyConversion']] unless hash['currencyConversion'].is_a? Hash
76
+ @currency_conversion = OnlinePayments::SDK::Domain::CurrencyConversion.new_from_hash(hash['currencyConversion'])
77
+ end
62
78
  if hash.key? 'externalTokenLinked'
63
79
  raise TypeError, "value '%s' is not a Hash" % [hash['externalTokenLinked']] unless hash['externalTokenLinked'].is_a? Hash
64
80
  @external_token_linked = OnlinePayments::SDK::Domain::ExternalTokenLinked.new_from_hash(hash['externalTokenLinked'])
@@ -69,6 +85,14 @@ module OnlinePayments::SDK
69
85
  end
70
86
  @initial_scheme_transaction_id = hash['initialSchemeTransactionId'] if hash.key? 'initialSchemeTransactionId'
71
87
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
88
+ if hash.key? 'paymentProduct3208SpecificOutput'
89
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3208SpecificOutput']] unless hash['paymentProduct3208SpecificOutput'].is_a? Hash
90
+ @payment_product3208_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3208SpecificOutput.new_from_hash(hash['paymentProduct3208SpecificOutput'])
91
+ end
92
+ if hash.key? 'paymentProduct3209SpecificOutput'
93
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3209SpecificOutput']] unless hash['paymentProduct3209SpecificOutput'].is_a? Hash
94
+ @payment_product3209_specific_output = OnlinePayments::SDK::Domain::PaymentProduct3209SpecificOutput.new_from_hash(hash['paymentProduct3209SpecificOutput'])
95
+ end
72
96
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
73
97
  @scheme_reference_data = hash['schemeReferenceData'] if hash.key? 'schemeReferenceData'
74
98
  if hash.key? 'threeDSecureResults'
@@ -0,0 +1,42 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_link_order'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [String] description
11
+ # @attr [String] expiration_date
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentLinkOrder] payment_link_order
13
+ # @attr [String] recipient_name
14
+ class CreatePaymentLinkRequest < OnlinePayments::SDK::DataObject
15
+ attr_accessor :description
16
+ attr_accessor :expiration_date
17
+ attr_accessor :payment_link_order
18
+ attr_accessor :recipient_name
19
+
20
+ # @return (Hash)
21
+ def to_h
22
+ hash = super
23
+ hash['description'] = @description unless @description.nil?
24
+ hash['expirationDate'] = @expiration_date unless @expiration_date.nil?
25
+ hash['paymentLinkOrder'] = @payment_link_order.to_h if @payment_link_order
26
+ hash['recipientName'] = @recipient_name unless @recipient_name.nil?
27
+ hash
28
+ end
29
+
30
+ def from_hash(hash)
31
+ super
32
+ @description = hash['description'] if hash.key? 'description'
33
+ @expiration_date = hash['expirationDate'] if hash.key? 'expirationDate'
34
+ if hash.key? 'paymentLinkOrder'
35
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkOrder']] unless hash['paymentLinkOrder'].is_a? Hash
36
+ @payment_link_order = OnlinePayments::SDK::Domain::PaymentLinkOrder.new_from_hash(hash['paymentLinkOrder'])
37
+ end
38
+ @recipient_name = hash['recipientName'] if hash.key? 'recipientName'
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/dcc_proposal'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [true/false] accepted_by_user
11
+ # @attr [OnlinePayments::SDK::Domain::DccProposal] proposal
12
+ class CurrencyConversion < OnlinePayments::SDK::DataObject
13
+ attr_accessor :accepted_by_user
14
+ attr_accessor :proposal
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['acceptedByUser'] = @accepted_by_user unless @accepted_by_user.nil?
20
+ hash['proposal'] = @proposal.to_h if @proposal
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ @accepted_by_user = hash['acceptedByUser'] if hash.key? 'acceptedByUser'
27
+ if hash.key? 'proposal'
28
+ raise TypeError, "value '%s' is not a Hash" % [hash['proposal']] unless hash['proposal'].is_a? Hash
29
+ @proposal = OnlinePayments::SDK::Domain::DccProposal.new_from_hash(hash['proposal'])
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [true/false] accepted_by_user
10
+ # @attr [String] dcc_session_id
11
+ class CurrencyConversionInput < OnlinePayments::SDK::DataObject
12
+ attr_accessor :accepted_by_user
13
+ attr_accessor :dcc_session_id
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['acceptedByUser'] = @accepted_by_user unless @accepted_by_user.nil?
19
+ hash['dccSessionId'] = @dcc_session_id unless @dcc_session_id.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @accepted_by_user = hash['acceptedByUser'] if hash.key? 'acceptedByUser'
26
+ @dcc_session_id = hash['dccSessionId'] if hash.key? 'dccSessionId'
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/card_info'
6
+ require 'onlinepayments/sdk/domain/transaction'
7
+
8
+ module OnlinePayments::SDK
9
+ module Domain
10
+
11
+ # @attr [OnlinePayments::SDK::Domain::CardInfo] card
12
+ # @attr [OnlinePayments::SDK::Domain::Transaction] transaction
13
+ class CurrencyConversionRequest < OnlinePayments::SDK::DataObject
14
+ attr_accessor :card
15
+ attr_accessor :transaction
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['card'] = @card.to_h if @card
21
+ hash['transaction'] = @transaction.to_h if @transaction
22
+ hash
23
+ end
24
+
25
+ def from_hash(hash)
26
+ super
27
+ if hash.key? 'card'
28
+ raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
29
+ @card = OnlinePayments::SDK::Domain::CardInfo.new_from_hash(hash['card'])
30
+ end
31
+ if hash.key? 'transaction'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['transaction']] unless hash['transaction'].is_a? Hash
33
+ @transaction = OnlinePayments::SDK::Domain::Transaction.new_from_hash(hash['transaction'])
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,42 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/currency_conversion_result'
6
+ require 'onlinepayments/sdk/domain/dcc_proposal'
7
+
8
+ module OnlinePayments::SDK
9
+ module Domain
10
+
11
+ # @attr [String] dcc_session_id
12
+ # @attr [OnlinePayments::SDK::Domain::DccProposal] proposal
13
+ # @attr [OnlinePayments::SDK::Domain::CurrencyConversionResult] result
14
+ class CurrencyConversionResponse < OnlinePayments::SDK::DataObject
15
+ attr_accessor :dcc_session_id
16
+ attr_accessor :proposal
17
+ attr_accessor :result
18
+
19
+ # @return (Hash)
20
+ def to_h
21
+ hash = super
22
+ hash['dccSessionId'] = @dcc_session_id unless @dcc_session_id.nil?
23
+ hash['proposal'] = @proposal.to_h if @proposal
24
+ hash['result'] = @result.to_h if @result
25
+ hash
26
+ end
27
+
28
+ def from_hash(hash)
29
+ super
30
+ @dcc_session_id = hash['dccSessionId'] if hash.key? 'dccSessionId'
31
+ if hash.key? 'proposal'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['proposal']] unless hash['proposal'].is_a? Hash
33
+ @proposal = OnlinePayments::SDK::Domain::DccProposal.new_from_hash(hash['proposal'])
34
+ end
35
+ if hash.key? 'result'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['result']] unless hash['result'].is_a? Hash
37
+ @result = OnlinePayments::SDK::Domain::CurrencyConversionResult.new_from_hash(hash['result'])
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] result
10
+ # @attr [String] result_reason
11
+ class CurrencyConversionResult < OnlinePayments::SDK::DataObject
12
+ attr_accessor :result
13
+ attr_accessor :result_reason
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['result'] = @result unless @result.nil?
19
+ hash['resultReason'] = @result_reason unless @result_reason.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @result = hash['result'] if hash.key? 'result'
26
+ @result_reason = hash['resultReason'] if hash.key? 'resultReason'
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,26 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [true/false] dcc_enabled
10
+ class CurrencyConversionSpecificInput < OnlinePayments::SDK::DataObject
11
+ attr_accessor :dcc_enabled
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['dccEnabled'] = @dcc_enabled unless @dcc_enabled.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @dcc_enabled = hash['dccEnabled'] if hash.key? 'dccEnabled'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,53 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/amount_of_money'
6
+ require 'onlinepayments/sdk/domain/rate_details'
7
+
8
+ module OnlinePayments::SDK
9
+ module Domain
10
+
11
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] base_amount
12
+ # @attr [String] disclaimer_display
13
+ # @attr [String] disclaimer_receipt
14
+ # @attr [OnlinePayments::SDK::Domain::RateDetails] rate
15
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] target_amount
16
+ class DccProposal < OnlinePayments::SDK::DataObject
17
+ attr_accessor :base_amount
18
+ attr_accessor :disclaimer_display
19
+ attr_accessor :disclaimer_receipt
20
+ attr_accessor :rate
21
+ attr_accessor :target_amount
22
+
23
+ # @return (Hash)
24
+ def to_h
25
+ hash = super
26
+ hash['baseAmount'] = @base_amount.to_h if @base_amount
27
+ hash['disclaimerDisplay'] = @disclaimer_display unless @disclaimer_display.nil?
28
+ hash['disclaimerReceipt'] = @disclaimer_receipt unless @disclaimer_receipt.nil?
29
+ hash['rate'] = @rate.to_h if @rate
30
+ hash['targetAmount'] = @target_amount.to_h if @target_amount
31
+ hash
32
+ end
33
+
34
+ def from_hash(hash)
35
+ super
36
+ if hash.key? 'baseAmount'
37
+ raise TypeError, "value '%s' is not a Hash" % [hash['baseAmount']] unless hash['baseAmount'].is_a? Hash
38
+ @base_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['baseAmount'])
39
+ end
40
+ @disclaimer_display = hash['disclaimerDisplay'] if hash.key? 'disclaimerDisplay'
41
+ @disclaimer_receipt = hash['disclaimerReceipt'] if hash.key? 'disclaimerReceipt'
42
+ if hash.key? 'rate'
43
+ raise TypeError, "value '%s' is not a Hash" % [hash['rate']] unless hash['rate'].is_a? Hash
44
+ @rate = OnlinePayments::SDK::Domain::RateDetails.new_from_hash(hash['rate'])
45
+ end
46
+ if hash.key? 'targetAmount'
47
+ raise TypeError, "value '%s' is not a Hash" % [hash['targetAmount']] unless hash['targetAmount'].is_a? Hash
48
+ @target_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['targetAmount'])
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
@@ -8,6 +8,7 @@ require 'onlinepayments/sdk/domain/payment_product_filters_hosted_checkout'
8
8
  module OnlinePayments::SDK
9
9
  module Domain
10
10
 
11
+ # @attr [Integer] allowed_number_of_payment_attempts
11
12
  # @attr [OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout] card_payment_method_specific_input
12
13
  # @attr [true/false] is_recurring
13
14
  # @attr [String] locale
@@ -18,6 +19,7 @@ module OnlinePayments::SDK
18
19
  # @attr [String] tokens
19
20
  # @attr [String] variant
20
21
  class HostedCheckoutSpecificInput < OnlinePayments::SDK::DataObject
22
+ attr_accessor :allowed_number_of_payment_attempts
21
23
  attr_accessor :card_payment_method_specific_input
22
24
  attr_accessor :is_recurring
23
25
  attr_accessor :locale
@@ -31,6 +33,7 @@ module OnlinePayments::SDK
31
33
  # @return (Hash)
32
34
  def to_h
33
35
  hash = super
36
+ hash['allowedNumberOfPaymentAttempts'] = @allowed_number_of_payment_attempts unless @allowed_number_of_payment_attempts.nil?
34
37
  hash['cardPaymentMethodSpecificInput'] = @card_payment_method_specific_input.to_h if @card_payment_method_specific_input
35
38
  hash['isRecurring'] = @is_recurring unless @is_recurring.nil?
36
39
  hash['locale'] = @locale unless @locale.nil?
@@ -45,6 +48,7 @@ module OnlinePayments::SDK
45
48
 
46
49
  def from_hash(hash)
47
50
  super
51
+ @allowed_number_of_payment_attempts = hash['allowedNumberOfPaymentAttempts'] if hash.key? 'allowedNumberOfPaymentAttempts'
48
52
  if hash.key? 'cardPaymentMethodSpecificInput'
49
53
  raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificInput']] unless hash['cardPaymentMethodSpecificInput'].is_a? Hash
50
54
  @card_payment_method_specific_input = OnlinePayments::SDK::Domain::CardPaymentMethodSpecificInputForHostedCheckout.new_from_hash(hash['cardPaymentMethodSpecificInput'])
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+
6
+ module OnlinePayments::SDK
7
+ module Domain
8
+
9
+ # @attr [String] date_time
10
+ # @attr [String] details
11
+ # @attr [String] type
12
+ class PaymentLinkEvent < OnlinePayments::SDK::DataObject
13
+ attr_accessor :date_time
14
+ attr_accessor :details
15
+ attr_accessor :type
16
+
17
+ # @return (Hash)
18
+ def to_h
19
+ hash = super
20
+ hash['dateTime'] = @date_time unless @date_time.nil?
21
+ hash['details'] = @details unless @details.nil?
22
+ hash['type'] = @type unless @type.nil?
23
+ hash
24
+ end
25
+
26
+ def from_hash(hash)
27
+ super
28
+ @date_time = hash['dateTime'] if hash.key? 'dateTime'
29
+ @details = hash['details'] if hash.key? 'details'
30
+ @type = hash['type'] if hash.key? 'type'
31
+ end
32
+ end
33
+ end
34
+ end