onlinepayments-sdk-ruby 4.10.0 → 4.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (23) hide show
  1. checksums.yaml +4 -4
  2. data/lib/onlinepayments/sdk/domain/acquirer_information.rb +26 -0
  3. data/lib/onlinepayments/sdk/domain/card_payment_method_specific_output.rb +8 -0
  4. data/lib/onlinepayments/sdk/domain/create_hosted_tokenization_request.rb +8 -0
  5. data/lib/onlinepayments/sdk/domain/create_payment_link_request.rb +42 -0
  6. data/lib/onlinepayments/sdk/domain/get_iin_details_response.rb +4 -0
  7. data/lib/onlinepayments/sdk/domain/iin_detail.rb +4 -0
  8. data/lib/onlinepayments/sdk/domain/payment_link_event.rb +34 -0
  9. data/lib/onlinepayments/sdk/domain/payment_link_order.rb +34 -0
  10. data/lib/onlinepayments/sdk/domain/payment_link_response.rb +65 -0
  11. data/lib/onlinepayments/sdk/domain/payment_product5407.rb +30 -0
  12. data/lib/onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization.rb +32 -0
  13. data/lib/onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization.rb +37 -0
  14. data/lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb +8 -0
  15. data/lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb +26 -0
  16. data/lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb +4 -0
  17. data/lib/onlinepayments/sdk/domain/show_form_data.rb +8 -0
  18. data/lib/onlinepayments/sdk/domain/surcharge_specific_output.rb +8 -0
  19. data/lib/onlinepayments/sdk/domain/transaction.rb +0 -4
  20. data/lib/onlinepayments/sdk/merchant/merchant_client.rb +7 -0
  21. data/lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb +116 -0
  22. data/onlinepayments-sdk-ruby.gemspec +1 -1
  23. metadata +12 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80e9ec9bc45a1394783686111554a405bc1a440fdae5314d04c6ef703ee124ab
4
- data.tar.gz: 84eef010aa3ec8234ae53a0548b73efe536af4a6d578d2b8e71a1360e3a66768
3
+ metadata.gz: 1eecf54f4030d6bbfbc0200135068e9081ef1a1cdde854a46ccd3d3934275b95
4
+ data.tar.gz: c6fe4897a39a18dadb4322f05ffda389390688e67f58e99a65796a44e7ac5485
5
5
  SHA512:
6
- metadata.gz: d42961e727b8786d36944eb31649b491975fb6ed02292621245f8c43fcd67a9203d34cb7406e9fa4aeb49a30335d38cea849b47e53b1b88938f82e6dfe8a1482
7
- data.tar.gz: 291c78f423181cb85c88e9c6de9abd085e730ff65369796fd9d6ce4953c35520400fc7b7f1265a5496f248129612cbedb475f68d530144c7f5b16b5a44d9cf76
6
+ metadata.gz: 4bcd42f254e5082999a487d0cb5bc71d29e6b0fdc67935d06919a7df614e0d04c48d7e925c3466dc2ff34b83b4fafb1239ddb73b750465b3faa57d138ca81dce
7
+ data.tar.gz: 1c28ecec5b513f6b6a9a90ad4294af91dd2fe9265b8df31510cac6cf0080dbde280a95f59fb97e52ef3d0a8b718a555e51e65dee8b9df307b1c5a17804909ef0
@@ -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 [String] name
10
+ class AcquirerInformation < OnlinePayments::SDK::DataObject
11
+ attr_accessor :name
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['name'] = @name unless @name.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @name = hash['name'] if hash.key? 'name'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -2,6 +2,7 @@
2
2
  # This class was auto-generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/acquirer_information'
5
6
  require 'onlinepayments/sdk/domain/card_essentials'
6
7
  require 'onlinepayments/sdk/domain/card_fraud_results'
7
8
  require 'onlinepayments/sdk/domain/currency_conversion'
@@ -13,6 +14,7 @@ require 'onlinepayments/sdk/domain/three_d_secure_results'
13
14
  module OnlinePayments::SDK
14
15
  module Domain
15
16
 
17
+ # @attr [OnlinePayments::SDK::Domain::AcquirerInformation] acquirer_information
16
18
  # @attr [Long] authenticated_amount
17
19
  # @attr [String] authorisation_code
18
20
  # @attr [OnlinePayments::SDK::Domain::CardEssentials] card
@@ -28,6 +30,7 @@ module OnlinePayments::SDK
28
30
  # @attr [OnlinePayments::SDK::Domain::ThreeDSecureResults] three_d_secure_results
29
31
  # @attr [String] token
30
32
  class CardPaymentMethodSpecificOutput < OnlinePayments::SDK::DataObject
33
+ attr_accessor :acquirer_information
31
34
  attr_accessor :authenticated_amount
32
35
  attr_accessor :authorisation_code
33
36
  attr_accessor :card
@@ -46,6 +49,7 @@ module OnlinePayments::SDK
46
49
  # @return (Hash)
47
50
  def to_h
48
51
  hash = super
52
+ hash['acquirerInformation'] = @acquirer_information.to_h if @acquirer_information
49
53
  hash['authenticatedAmount'] = @authenticated_amount unless @authenticated_amount.nil?
50
54
  hash['authorisationCode'] = @authorisation_code unless @authorisation_code.nil?
51
55
  hash['card'] = @card.to_h if @card
@@ -65,6 +69,10 @@ module OnlinePayments::SDK
65
69
 
66
70
  def from_hash(hash)
67
71
  super
72
+ if hash.key? 'acquirerInformation'
73
+ raise TypeError, "value '%s' is not a Hash" % [hash['acquirerInformation']] unless hash['acquirerInformation'].is_a? Hash
74
+ @acquirer_information = OnlinePayments::SDK::Domain::AcquirerInformation.new_from_hash(hash['acquirerInformation'])
75
+ end
68
76
  @authenticated_amount = hash['authenticatedAmount'] if hash.key? 'authenticatedAmount'
69
77
  @authorisation_code = hash['authorisationCode'] if hash.key? 'authorisationCode'
70
78
  if hash.key? 'card'
@@ -2,17 +2,20 @@
2
2
  # This class was auto-generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization'
5
6
 
6
7
  module OnlinePayments::SDK
7
8
  module Domain
8
9
 
9
10
  # @attr [true/false] ask_consumer_consent
10
11
  # @attr [String] locale
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization] payment_product_filters
11
13
  # @attr [String] tokens
12
14
  # @attr [String] variant
13
15
  class CreateHostedTokenizationRequest < OnlinePayments::SDK::DataObject
14
16
  attr_accessor :ask_consumer_consent
15
17
  attr_accessor :locale
18
+ attr_accessor :payment_product_filters
16
19
  attr_accessor :tokens
17
20
  attr_accessor :variant
18
21
 
@@ -21,6 +24,7 @@ module OnlinePayments::SDK
21
24
  hash = super
22
25
  hash['askConsumerConsent'] = @ask_consumer_consent unless @ask_consumer_consent.nil?
23
26
  hash['locale'] = @locale unless @locale.nil?
27
+ hash['paymentProductFilters'] = @payment_product_filters.to_h if @payment_product_filters
24
28
  hash['tokens'] = @tokens unless @tokens.nil?
25
29
  hash['variant'] = @variant unless @variant.nil?
26
30
  hash
@@ -30,6 +34,10 @@ module OnlinePayments::SDK
30
34
  super
31
35
  @ask_consumer_consent = hash['askConsumerConsent'] if hash.key? 'askConsumerConsent'
32
36
  @locale = hash['locale'] if hash.key? 'locale'
37
+ if hash.key? 'paymentProductFilters'
38
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProductFilters']] unless hash['paymentProductFilters'].is_a? Hash
39
+ @payment_product_filters = OnlinePayments::SDK::Domain::PaymentProductFiltersHostedTokenization.new_from_hash(hash['paymentProductFilters'])
40
+ end
33
41
  @tokens = hash['tokens'] if hash.key? 'tokens'
34
42
  @variant = hash['variant'] if hash.key? 'variant'
35
43
  end
@@ -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
@@ -7,11 +7,13 @@ require 'onlinepayments/sdk/domain/iin_detail'
7
7
  module OnlinePayments::SDK
8
8
  module Domain
9
9
 
10
+ # @attr [String] card_type
10
11
  # @attr [Array<OnlinePayments::SDK::Domain::IINDetail>] co_brands
11
12
  # @attr [String] country_code
12
13
  # @attr [true/false] is_allowed_in_context
13
14
  # @attr [Integer] payment_product_id
14
15
  class GetIINDetailsResponse < OnlinePayments::SDK::DataObject
16
+ attr_accessor :card_type
15
17
  attr_accessor :co_brands
16
18
  attr_accessor :country_code
17
19
  attr_accessor :is_allowed_in_context
@@ -20,6 +22,7 @@ module OnlinePayments::SDK
20
22
  # @return (Hash)
21
23
  def to_h
22
24
  hash = super
25
+ hash['cardType'] = @card_type unless @card_type.nil?
23
26
  hash['coBrands'] = @co_brands.collect(&:to_h) if @co_brands
24
27
  hash['countryCode'] = @country_code unless @country_code.nil?
25
28
  hash['isAllowedInContext'] = @is_allowed_in_context unless @is_allowed_in_context.nil?
@@ -29,6 +32,7 @@ module OnlinePayments::SDK
29
32
 
30
33
  def from_hash(hash)
31
34
  super
35
+ @card_type = hash['cardType'] if hash.key? 'cardType'
32
36
  if hash.key? 'coBrands'
33
37
  raise TypeError, "value '%s' is not an Array" % [hash['coBrands']] unless hash['coBrands'].is_a? Array
34
38
  @co_brands = []
@@ -6,15 +6,18 @@ require 'onlinepayments/sdk/data_object'
6
6
  module OnlinePayments::SDK
7
7
  module Domain
8
8
 
9
+ # @attr [String] card_type
9
10
  # @attr [true/false] is_allowed_in_context
10
11
  # @attr [Integer] payment_product_id
11
12
  class IINDetail < OnlinePayments::SDK::DataObject
13
+ attr_accessor :card_type
12
14
  attr_accessor :is_allowed_in_context
13
15
  attr_accessor :payment_product_id
14
16
 
15
17
  # @return (Hash)
16
18
  def to_h
17
19
  hash = super
20
+ hash['cardType'] = @card_type unless @card_type.nil?
18
21
  hash['isAllowedInContext'] = @is_allowed_in_context unless @is_allowed_in_context.nil?
19
22
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
20
23
  hash
@@ -22,6 +25,7 @@ module OnlinePayments::SDK
22
25
 
23
26
  def from_hash(hash)
24
27
  super
28
+ @card_type = hash['cardType'] if hash.key? 'cardType'
25
29
  @is_allowed_in_context = hash['isAllowedInContext'] if hash.key? 'isAllowedInContext'
26
30
  @payment_product_id = hash['paymentProductId'] if hash.key? 'paymentProductId'
27
31
  end
@@ -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
@@ -0,0 +1,34 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/amount_of_money'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount
11
+ # @attr [String] merchant_reference
12
+ class PaymentLinkOrder < OnlinePayments::SDK::DataObject
13
+ attr_accessor :amount
14
+ attr_accessor :merchant_reference
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['amount'] = @amount.to_h if @amount
20
+ hash['merchantReference'] = @merchant_reference unless @merchant_reference.nil?
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.key? 'amount'
27
+ raise TypeError, "value '%s' is not a Hash" % [hash['amount']] unless hash['amount'].is_a? Hash
28
+ @amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amount'])
29
+ end
30
+ @merchant_reference = hash['merchantReference'] if hash.key? 'merchantReference'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,65 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_link_event'
6
+ require 'onlinepayments/sdk/domain/payment_link_order'
7
+
8
+ module OnlinePayments::SDK
9
+ module Domain
10
+
11
+ # @attr [String] expiration_date
12
+ # @attr [String] payment_id
13
+ # @attr [Array<OnlinePayments::SDK::Domain::PaymentLinkEvent>] payment_link_events
14
+ # @attr [String] payment_link_id
15
+ # @attr [OnlinePayments::SDK::Domain::PaymentLinkOrder] payment_link_order
16
+ # @attr [String] recipient_name
17
+ # @attr [String] redirection_url
18
+ # @attr [String] status
19
+ class PaymentLinkResponse < OnlinePayments::SDK::DataObject
20
+ attr_accessor :expiration_date
21
+ attr_accessor :payment_id
22
+ attr_accessor :payment_link_events
23
+ attr_accessor :payment_link_id
24
+ attr_accessor :payment_link_order
25
+ attr_accessor :recipient_name
26
+ attr_accessor :redirection_url
27
+ attr_accessor :status
28
+
29
+ # @return (Hash)
30
+ def to_h
31
+ hash = super
32
+ hash['expirationDate'] = @expiration_date unless @expiration_date.nil?
33
+ hash['paymentId'] = @payment_id unless @payment_id.nil?
34
+ hash['paymentLinkEvents'] = @payment_link_events.collect(&:to_h) if @payment_link_events
35
+ hash['paymentLinkId'] = @payment_link_id unless @payment_link_id.nil?
36
+ hash['paymentLinkOrder'] = @payment_link_order.to_h if @payment_link_order
37
+ hash['recipientName'] = @recipient_name unless @recipient_name.nil?
38
+ hash['redirectionUrl'] = @redirection_url unless @redirection_url.nil?
39
+ hash['status'] = @status unless @status.nil?
40
+ hash
41
+ end
42
+
43
+ def from_hash(hash)
44
+ super
45
+ @expiration_date = hash['expirationDate'] if hash.key? 'expirationDate'
46
+ @payment_id = hash['paymentId'] if hash.key? 'paymentId'
47
+ if hash.key? 'paymentLinkEvents'
48
+ raise TypeError, "value '%s' is not an Array" % [hash['paymentLinkEvents']] unless hash['paymentLinkEvents'].is_a? Array
49
+ @payment_link_events = []
50
+ hash['paymentLinkEvents'].each do |e|
51
+ @payment_link_events << OnlinePayments::SDK::Domain::PaymentLinkEvent.new_from_hash(e)
52
+ end
53
+ end
54
+ @payment_link_id = hash['paymentLinkId'] if hash.key? 'paymentLinkId'
55
+ if hash.key? 'paymentLinkOrder'
56
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentLinkOrder']] unless hash['paymentLinkOrder'].is_a? Hash
57
+ @payment_link_order = OnlinePayments::SDK::Domain::PaymentLinkOrder.new_from_hash(hash['paymentLinkOrder'])
58
+ end
59
+ @recipient_name = hash['recipientName'] if hash.key? 'recipientName'
60
+ @redirection_url = hash['redirectionUrl'] if hash.key? 'redirectionUrl'
61
+ @status = hash['status'] if hash.key? 'status'
62
+ end
63
+ end
64
+ end
65
+ 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] pairing_token
10
+ # @attr [String] qr_code
11
+ class PaymentProduct5407 < OnlinePayments::SDK::DataObject
12
+ attr_accessor :pairing_token
13
+ attr_accessor :qr_code
14
+
15
+ # @return (Hash)
16
+ def to_h
17
+ hash = super
18
+ hash['pairingToken'] = @pairing_token unless @pairing_token.nil?
19
+ hash['qrCode'] = @qr_code unless @qr_code.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ @pairing_token = hash['pairingToken'] if hash.key? 'pairingToken'
26
+ @qr_code = hash['qrCode'] if hash.key? 'qrCode'
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,32 @@
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 [Array<Integer>] products
10
+ class PaymentProductFilterHostedTokenization < OnlinePayments::SDK::DataObject
11
+ attr_accessor :products
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['products'] = @products unless @products.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ if hash.key? 'products'
23
+ raise TypeError, "value '%s' is not an Array" % [hash['products']] unless hash['products'].is_a? Array
24
+ @products = []
25
+ hash['products'].each do |e|
26
+ @products << e
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization'
6
+
7
+ module OnlinePayments::SDK
8
+ module Domain
9
+
10
+ # @attr [OnlinePayments::SDK::Domain::PaymentProductFilterHostedTokenization] exclude
11
+ # @attr [OnlinePayments::SDK::Domain::PaymentProductFilterHostedTokenization] restrict_to
12
+ class PaymentProductFiltersHostedTokenization < OnlinePayments::SDK::DataObject
13
+ attr_accessor :exclude
14
+ attr_accessor :restrict_to
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['exclude'] = @exclude.to_h if @exclude
20
+ hash['restrictTo'] = @restrict_to.to_h if @restrict_to
21
+ hash
22
+ end
23
+
24
+ def from_hash(hash)
25
+ super
26
+ if hash.key? 'exclude'
27
+ raise TypeError, "value '%s' is not a Hash" % [hash['exclude']] unless hash['exclude'].is_a? Hash
28
+ @exclude = OnlinePayments::SDK::Domain::PaymentProductFilterHostedTokenization.new_from_hash(hash['exclude'])
29
+ end
30
+ if hash.key? 'restrictTo'
31
+ raise TypeError, "value '%s' is not a Hash" % [hash['restrictTo']] unless hash['restrictTo'].is_a? Hash
32
+ @restrict_to = OnlinePayments::SDK::Domain::PaymentProductFilterHostedTokenization.new_from_hash(hash['restrictTo'])
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -2,6 +2,7 @@
2
2
  # This class was auto-generated.
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
+ require 'onlinepayments/sdk/domain/redirect_payment_product3306_specific_input'
5
6
  require 'onlinepayments/sdk/domain/redirect_payment_product809_specific_input'
6
7
  require 'onlinepayments/sdk/domain/redirect_payment_product840_specific_input'
7
8
  require 'onlinepayments/sdk/domain/redirection_data'
@@ -10,6 +11,7 @@ module OnlinePayments::SDK
10
11
  module Domain
11
12
 
12
13
  # @attr [String] payment_option
14
+ # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput] payment_product3306_specific_input
13
15
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput] payment_product809_specific_input
14
16
  # @attr [OnlinePayments::SDK::Domain::RedirectPaymentProduct840SpecificInput] payment_product840_specific_input
15
17
  # @attr [Integer] payment_product_id
@@ -19,6 +21,7 @@ module OnlinePayments::SDK
19
21
  # @attr [true/false] tokenize
20
22
  class RedirectPaymentMethodSpecificInput < OnlinePayments::SDK::DataObject
21
23
  attr_accessor :payment_option
24
+ attr_accessor :payment_product3306_specific_input
22
25
  attr_accessor :payment_product809_specific_input
23
26
  attr_accessor :payment_product840_specific_input
24
27
  attr_accessor :payment_product_id
@@ -31,6 +34,7 @@ module OnlinePayments::SDK
31
34
  def to_h
32
35
  hash = super
33
36
  hash['paymentOption'] = @payment_option unless @payment_option.nil?
37
+ hash['paymentProduct3306SpecificInput'] = @payment_product3306_specific_input.to_h if @payment_product3306_specific_input
34
38
  hash['paymentProduct809SpecificInput'] = @payment_product809_specific_input.to_h if @payment_product809_specific_input
35
39
  hash['paymentProduct840SpecificInput'] = @payment_product840_specific_input.to_h if @payment_product840_specific_input
36
40
  hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
@@ -44,6 +48,10 @@ module OnlinePayments::SDK
44
48
  def from_hash(hash)
45
49
  super
46
50
  @payment_option = hash['paymentOption'] if hash.key? 'paymentOption'
51
+ if hash.key? 'paymentProduct3306SpecificInput'
52
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3306SpecificInput']] unless hash['paymentProduct3306SpecificInput'].is_a? Hash
53
+ @payment_product3306_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct3306SpecificInput.new_from_hash(hash['paymentProduct3306SpecificInput'])
54
+ end
47
55
  if hash.key? 'paymentProduct809SpecificInput'
48
56
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct809SpecificInput']] unless hash['paymentProduct809SpecificInput'].is_a? Hash
49
57
  @payment_product809_specific_input = OnlinePayments::SDK::Domain::RedirectPaymentProduct809SpecificInput.new_from_hash(hash['paymentProduct809SpecificInput'])
@@ -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 [String] extra_merchant_data
10
+ class RedirectPaymentProduct3306SpecificInput < OnlinePayments::SDK::DataObject
11
+ attr_accessor :extra_merchant_data
12
+
13
+ # @return (Hash)
14
+ def to_h
15
+ hash = super
16
+ hash['extraMerchantData'] = @extra_merchant_data unless @extra_merchant_data.nil?
17
+ hash
18
+ end
19
+
20
+ def from_hash(hash)
21
+ super
22
+ @extra_merchant_data = hash['extraMerchantData'] if hash.key? 'extraMerchantData'
23
+ end
24
+ end
25
+ end
26
+ end
@@ -7,19 +7,23 @@ module OnlinePayments::SDK
7
7
  module Domain
8
8
 
9
9
  # @attr [true/false] address_selection_at_pay_pal
10
+ # @attr [String] custom
10
11
  class RedirectPaymentProduct840SpecificInput < OnlinePayments::SDK::DataObject
11
12
  attr_accessor :address_selection_at_pay_pal
13
+ attr_accessor :custom
12
14
 
13
15
  # @return (Hash)
14
16
  def to_h
15
17
  hash = super
16
18
  hash['addressSelectionAtPayPal'] = @address_selection_at_pay_pal unless @address_selection_at_pay_pal.nil?
19
+ hash['custom'] = @custom unless @custom.nil?
17
20
  hash
18
21
  end
19
22
 
20
23
  def from_hash(hash)
21
24
  super
22
25
  @address_selection_at_pay_pal = hash['addressSelectionAtPayPal'] if hash.key? 'addressSelectionAtPayPal'
26
+ @custom = hash['custom'] if hash.key? 'custom'
23
27
  end
24
28
  end
25
29
  end
@@ -3,18 +3,22 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/payment_product5404'
6
+ require 'onlinepayments/sdk/domain/payment_product5407'
6
7
 
7
8
  module OnlinePayments::SDK
8
9
  module Domain
9
10
 
10
11
  # @attr [OnlinePayments::SDK::Domain::PaymentProduct5404] payment_product5404
12
+ # @attr [OnlinePayments::SDK::Domain::PaymentProduct5407] payment_product5407
11
13
  class ShowFormData < OnlinePayments::SDK::DataObject
12
14
  attr_accessor :payment_product5404
15
+ attr_accessor :payment_product5407
13
16
 
14
17
  # @return (Hash)
15
18
  def to_h
16
19
  hash = super
17
20
  hash['paymentProduct5404'] = @payment_product5404.to_h if @payment_product5404
21
+ hash['paymentProduct5407'] = @payment_product5407.to_h if @payment_product5407
18
22
  hash
19
23
  end
20
24
 
@@ -24,6 +28,10 @@ module OnlinePayments::SDK
24
28
  raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5404']] unless hash['paymentProduct5404'].is_a? Hash
25
29
  @payment_product5404 = OnlinePayments::SDK::Domain::PaymentProduct5404.new_from_hash(hash['paymentProduct5404'])
26
30
  end
31
+ if hash.key? 'paymentProduct5407'
32
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct5407']] unless hash['paymentProduct5407'].is_a? Hash
33
+ @payment_product5407 = OnlinePayments::SDK::Domain::PaymentProduct5407.new_from_hash(hash['paymentProduct5407'])
34
+ end
27
35
  end
28
36
  end
29
37
  end
@@ -3,21 +3,25 @@
3
3
  #
4
4
  require 'onlinepayments/sdk/data_object'
5
5
  require 'onlinepayments/sdk/domain/amount_of_money'
6
+ require 'onlinepayments/sdk/domain/surcharge_rate'
6
7
 
7
8
  module OnlinePayments::SDK
8
9
  module Domain
9
10
 
10
11
  # @attr [String] mode
11
12
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] surcharge_amount
13
+ # @attr [OnlinePayments::SDK::Domain::SurchargeRate] surcharge_rate
12
14
  class SurchargeSpecificOutput < OnlinePayments::SDK::DataObject
13
15
  attr_accessor :mode
14
16
  attr_accessor :surcharge_amount
17
+ attr_accessor :surcharge_rate
15
18
 
16
19
  # @return (Hash)
17
20
  def to_h
18
21
  hash = super
19
22
  hash['mode'] = @mode unless @mode.nil?
20
23
  hash['surchargeAmount'] = @surcharge_amount.to_h if @surcharge_amount
24
+ hash['surchargeRate'] = @surcharge_rate.to_h if @surcharge_rate
21
25
  hash
22
26
  end
23
27
 
@@ -28,6 +32,10 @@ module OnlinePayments::SDK
28
32
  raise TypeError, "value '%s' is not a Hash" % [hash['surchargeAmount']] unless hash['surchargeAmount'].is_a? Hash
29
33
  @surcharge_amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['surchargeAmount'])
30
34
  end
35
+ if hash.key? 'surchargeRate'
36
+ raise TypeError, "value '%s' is not a Hash" % [hash['surchargeRate']] unless hash['surchargeRate'].is_a? Hash
37
+ @surcharge_rate = OnlinePayments::SDK::Domain::SurchargeRate.new_from_hash(hash['surchargeRate'])
38
+ end
31
39
  end
32
40
  end
33
41
  end
@@ -8,16 +8,13 @@ module OnlinePayments::SDK
8
8
  module Domain
9
9
 
10
10
  # @attr [OnlinePayments::SDK::Domain::AmountOfMoney] amount
11
- # @attr [String] local_date_time
12
11
  class Transaction < OnlinePayments::SDK::DataObject
13
12
  attr_accessor :amount
14
- attr_accessor :local_date_time
15
13
 
16
14
  # @return (Hash)
17
15
  def to_h
18
16
  hash = super
19
17
  hash['amount'] = @amount.to_h if @amount
20
- hash['localDateTime'] = @local_date_time unless @local_date_time.nil?
21
18
  hash
22
19
  end
23
20
 
@@ -27,7 +24,6 @@ module OnlinePayments::SDK
27
24
  raise TypeError, "value '%s' is not a Hash" % [hash['amount']] unless hash['amount'].is_a? Hash
28
25
  @amount = OnlinePayments::SDK::Domain::AmountOfMoney.new_from_hash(hash['amount'])
29
26
  end
30
- @local_date_time = hash['localDateTime'] if hash.key? 'localDateTime'
31
27
  end
32
28
  end
33
29
  end
@@ -5,6 +5,7 @@ require 'onlinepayments/sdk/api_resource'
5
5
  require 'onlinepayments/sdk/merchant/hostedcheckout/hosted_checkout_client'
6
6
  require 'onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client'
7
7
  require 'onlinepayments/sdk/merchant/mandates/mandates_client'
8
+ require 'onlinepayments/sdk/merchant/paymentlinks/payment_links_client'
8
9
  require 'onlinepayments/sdk/merchant/payments/payments_client'
9
10
  require 'onlinepayments/sdk/merchant/payouts/payouts_client'
10
11
  require 'onlinepayments/sdk/merchant/productgroups/product_groups_client'
@@ -43,6 +44,12 @@ module OnlinePayments::SDK
43
44
  OnlinePayments::SDK::Merchant::Mandates::MandatesClient.new(self, nil)
44
45
  end
45
46
 
47
+ # Resource /v2/!{merchantId}/paymentlinks
48
+ # @return [OnlinePayments::SDK::Merchant::PaymentLinks::PaymentLinksClient]
49
+ def payment_links
50
+ OnlinePayments::SDK::Merchant::PaymentLinks::PaymentLinksClient.new(self, nil)
51
+ end
52
+
46
53
  # Resource /v2/!{merchantId}/payments
47
54
  # @return [OnlinePayments::SDK::Merchant::Payments::PaymentsClient]
48
55
  def payments
@@ -0,0 +1,116 @@
1
+ #
2
+ # This class was auto-generated.
3
+ #
4
+ require 'onlinepayments/sdk/api_resource'
5
+ require 'onlinepayments/sdk/response_exception'
6
+ require 'onlinepayments/sdk/domain/create_payment_link_request'
7
+ require 'onlinepayments/sdk/domain/error_response'
8
+ require 'onlinepayments/sdk/domain/payment_link_response'
9
+
10
+ module OnlinePayments::SDK
11
+ module Merchant
12
+ module PaymentLinks
13
+
14
+ # PaymentLinks client. Thread-safe.
15
+ class PaymentLinksClient < OnlinePayments::SDK::ApiResource
16
+
17
+ # @param parent [OnlinePayments::SDK::ApiResource]
18
+ # @param path_context [Hash, nil]
19
+ def initialize(parent, path_context = nil)
20
+ super(parent, path_context)
21
+ end
22
+
23
+ # Resource /v2/!{merchantId}/paymentlinks
24
+ # @param body [OnlinePayments::SDK::Domain::CreatePaymentLinkRequest]
25
+ # @param context [OnlinePayments::SDK::CallContext]
26
+ # @return [OnlinePayments::SDK::Domain::PaymentLinkResponse]
27
+ # @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
28
+ # @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
29
+ # @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
30
+ # @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
31
+ # or there was a conflict (HTTP status code 404, 409 or 410)
32
+ # @raise [OnlinePayments::SDK::PaymentPlatformException] if something went wrong at the payment platform,
33
+ # the payment platform was unable to process a message from a downstream partner/acquirer,
34
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
35
+ # @raise [OnlinePayments::SDK::ApiException]if the payment platform returned any other error
36
+ def create_payment_link(body, context = nil)
37
+ uri = instantiate_uri('/v2/{merchantId}/paymentlinks')
38
+ @communicator.post(
39
+ uri,
40
+ client_headers,
41
+ nil,
42
+ body,
43
+ OnlinePayments::SDK::Domain::PaymentLinkResponse,
44
+ context
45
+ )
46
+ rescue ResponseException => e
47
+ error_type = OnlinePayments::SDK::Domain::ErrorResponse
48
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
49
+ raise create_exception(e.status_code, e.body, error_object, context)
50
+ end
51
+
52
+ # Resource /v2/!{merchantId}/paymentlinks/!{paymentLinkId}
53
+ # @param payment_link_id [String]
54
+ # @param context [OnlinePayments::SDK::CallContext]
55
+ # @return [OnlinePayments::SDK::Domain::PaymentLinkResponse]
56
+ # @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
57
+ # @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
58
+ # @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
59
+ # @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
60
+ # or there was a conflict (HTTP status code 404, 409 or 410)
61
+ # @raise [OnlinePayments::SDK::PaymentPlatformException] if something went wrong at the payment platform,
62
+ # the payment platform was unable to process a message from a downstream partner/acquirer,
63
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
64
+ # @raise [OnlinePayments::SDK::ApiException]if the payment platform returned any other error
65
+ def get_payment_link_by_id(payment_link_id, context = nil)
66
+ path_context = {
67
+ 'paymentLinkId'.freeze => payment_link_id,
68
+ }
69
+ uri = instantiate_uri('/v2/{merchantId}/paymentlinks/{paymentLinkId}', path_context)
70
+ @communicator.get(
71
+ uri,
72
+ client_headers,
73
+ nil,
74
+ OnlinePayments::SDK::Domain::PaymentLinkResponse,
75
+ context
76
+ )
77
+ rescue ResponseException => e
78
+ error_type = OnlinePayments::SDK::Domain::ErrorResponse
79
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
80
+ raise create_exception(e.status_code, e.body, error_object, context)
81
+ end
82
+
83
+ # Resource /v2/!{merchantId}/paymentlinks/!{paymentLinkId}/cancel
84
+ # @param payment_link_id [String]
85
+ # @param context [OnlinePayments::SDK::CallContext]
86
+ # @raise [OnlinePayments::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
87
+ # @raise [OnlinePayments::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
88
+ # @raise [OnlinePayments::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
89
+ # @raise [OnlinePayments::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
90
+ # or there was a conflict (HTTP status code 404, 409 or 410)
91
+ # @raise [OnlinePayments::SDK::PaymentPlatformException] if something went wrong at the payment platform,
92
+ # the payment platform was unable to process a message from a downstream partner/acquirer,
93
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
94
+ # @raise [OnlinePayments::SDK::ApiException]if the payment platform returned any other error
95
+ def cancel_payment_link_by_id(payment_link_id, context = nil)
96
+ path_context = {
97
+ 'paymentLinkId'.freeze => payment_link_id,
98
+ }
99
+ uri = instantiate_uri('/v2/{merchantId}/paymentlinks/{paymentLinkId}/cancel', path_context)
100
+ @communicator.post(
101
+ uri,
102
+ client_headers,
103
+ nil,
104
+ nil,
105
+ nil,
106
+ context
107
+ )
108
+ rescue ResponseException => e
109
+ error_type = OnlinePayments::SDK::Domain::ErrorResponse
110
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
111
+ raise create_exception(e.status_code, e.body, error_object, context)
112
+ end
113
+ end
114
+ end
115
+ end
116
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'onlinepayments-sdk-ruby'
3
- spec.version = '4.10.0'
3
+ spec.version = '4.12.0'
4
4
  spec.authors = ['Worldline Direct support team']
5
5
  spec.email = ['82139942+worldline-direct-support-team@users.noreply.github.com']
6
6
  spec.summary = %q{SDK to communicate with the Online Payments platform using the Online Payments Server API}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onlinepayments-sdk-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.10.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Worldline Direct support team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-30 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -150,6 +150,7 @@ files:
150
150
  - lib/onlinepayments/sdk/domain/account_on_file.rb
151
151
  - lib/onlinepayments/sdk/domain/account_on_file_attribute.rb
152
152
  - lib/onlinepayments/sdk/domain/account_on_file_display_hints.rb
153
+ - lib/onlinepayments/sdk/domain/acquirer_information.rb
153
154
  - lib/onlinepayments/sdk/domain/additional_order_input.rb
154
155
  - lib/onlinepayments/sdk/domain/address.rb
155
156
  - lib/onlinepayments/sdk/domain/address_personal.rb
@@ -195,6 +196,7 @@ files:
195
196
  - lib/onlinepayments/sdk/domain/create_mandate_request.rb
196
197
  - lib/onlinepayments/sdk/domain/create_mandate_response.rb
197
198
  - lib/onlinepayments/sdk/domain/create_mandate_with_return_url.rb
199
+ - lib/onlinepayments/sdk/domain/create_payment_link_request.rb
198
200
  - lib/onlinepayments/sdk/domain/create_payment_request.rb
199
201
  - lib/onlinepayments/sdk/domain/create_payment_response.rb
200
202
  - lib/onlinepayments/sdk/domain/create_payout_request.rb
@@ -269,6 +271,9 @@ files:
269
271
  - lib/onlinepayments/sdk/domain/payment_creation_output.rb
270
272
  - lib/onlinepayments/sdk/domain/payment_details_response.rb
271
273
  - lib/onlinepayments/sdk/domain/payment_error_response.rb
274
+ - lib/onlinepayments/sdk/domain/payment_link_event.rb
275
+ - lib/onlinepayments/sdk/domain/payment_link_order.rb
276
+ - lib/onlinepayments/sdk/domain/payment_link_response.rb
272
277
  - lib/onlinepayments/sdk/domain/payment_output.rb
273
278
  - lib/onlinepayments/sdk/domain/payment_product.rb
274
279
  - lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb
@@ -283,6 +288,7 @@ files:
283
288
  - lib/onlinepayments/sdk/domain/payment_product5100_specific_input.rb
284
289
  - lib/onlinepayments/sdk/domain/payment_product5402_specific_output.rb
285
290
  - lib/onlinepayments/sdk/domain/payment_product5404.rb
291
+ - lib/onlinepayments/sdk/domain/payment_product5407.rb
286
292
  - lib/onlinepayments/sdk/domain/payment_product5500_specific_output.rb
287
293
  - lib/onlinepayments/sdk/domain/payment_product771_specific_output.rb
288
294
  - lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb
@@ -296,7 +302,9 @@ files:
296
302
  - lib/onlinepayments/sdk/domain/payment_product_field_tooltip.rb
297
303
  - lib/onlinepayments/sdk/domain/payment_product_field_validators.rb
298
304
  - lib/onlinepayments/sdk/domain/payment_product_filter.rb
305
+ - lib/onlinepayments/sdk/domain/payment_product_filter_hosted_tokenization.rb
299
306
  - lib/onlinepayments/sdk/domain/payment_product_filters_hosted_checkout.rb
307
+ - lib/onlinepayments/sdk/domain/payment_product_filters_hosted_tokenization.rb
300
308
  - lib/onlinepayments/sdk/domain/payment_product_group.rb
301
309
  - lib/onlinepayments/sdk/domain/payment_product_networks_response.rb
302
310
  - lib/onlinepayments/sdk/domain/payment_references.rb
@@ -318,6 +326,7 @@ files:
318
326
  - lib/onlinepayments/sdk/domain/redirect_data.rb
319
327
  - lib/onlinepayments/sdk/domain/redirect_payment_method_specific_input.rb
320
328
  - lib/onlinepayments/sdk/domain/redirect_payment_method_specific_output.rb
329
+ - lib/onlinepayments/sdk/domain/redirect_payment_product3306_specific_input.rb
321
330
  - lib/onlinepayments/sdk/domain/redirect_payment_product809_specific_input.rb
322
331
  - lib/onlinepayments/sdk/domain/redirect_payment_product840_specific_input.rb
323
332
  - lib/onlinepayments/sdk/domain/redirection_data.rb
@@ -385,6 +394,7 @@ files:
385
394
  - lib/onlinepayments/sdk/merchant/hostedtokenization/hosted_tokenization_client.rb
386
395
  - lib/onlinepayments/sdk/merchant/mandates/mandates_client.rb
387
396
  - lib/onlinepayments/sdk/merchant/merchant_client.rb
397
+ - lib/onlinepayments/sdk/merchant/paymentlinks/payment_links_client.rb
388
398
  - lib/onlinepayments/sdk/merchant/payments/payments_client.rb
389
399
  - lib/onlinepayments/sdk/merchant/payouts/payouts_client.rb
390
400
  - lib/onlinepayments/sdk/merchant/productgroups/get_product_group_params.rb