onlinepayments-sdk-ruby 8.6.0 → 9.0.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.
- checksums.yaml +4 -4
- data/lib/onlinepayments/sdk/communication/metadata_provider.rb +1 -1
- data/lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb +7 -0
- data/lib/onlinepayments/sdk/domain/card_token.rb +72 -0
- data/lib/onlinepayments/sdk/domain/create_hosted_fields_session_response.rb +12 -0
- data/lib/onlinepayments/sdk/domain/payment_product11.rb +58 -0
- data/lib/onlinepayments/sdk/domain/redirect_payment_product11_specific_input.rb +5 -7
- data/lib/onlinepayments/sdk/domain/show_form_data.rb +9 -0
- data/onlinepayments-sdk-ruby.gemspec +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53fe3d6ec5d344c88c2fba8fe3dcf53a78d3ef621396df91459b02c74346731f
|
|
4
|
+
data.tar.gz: 54e0895c3b9257c399a13b539a31be68b894604f15af35b212d2fb8441955c51
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5aee06836a452cc521cd976761d4ff64254be6eb09db0a066a69019373e1c055fe81dd975b79bc1211f29d40ef6e5bf133a9874570c0e32ab89eff1a4ffd2a1f
|
|
7
|
+
data.tar.gz: 685244a1286ae8e75a51f57c2f89888a11ed1bbe70522d69d1c36272bf6fcbbb94bbe52c91d5fbe5b8a25bc6ef3bfb1fe601bc892d2e206f0623c9d5165fa180
|
|
@@ -13,7 +13,7 @@ module OnlinePayments
|
|
|
13
13
|
class MetadataProvider
|
|
14
14
|
private
|
|
15
15
|
|
|
16
|
-
SDK_VERSION = '
|
|
16
|
+
SDK_VERSION = '9.0.0'.freeze
|
|
17
17
|
SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'.freeze
|
|
18
18
|
PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key', 'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
|
19
19
|
CHARSET = 'utf-8'.freeze
|
|
@@ -8,6 +8,7 @@ module OnlinePayments
|
|
|
8
8
|
module SDK
|
|
9
9
|
module Domain
|
|
10
10
|
# @attr [OnlinePayments::SDK::Domain::Card] card
|
|
11
|
+
# @attr [String] hosted_fields_session_id
|
|
11
12
|
# @attr [Integer] payment_product_id
|
|
12
13
|
# @attr [String] payout_reason
|
|
13
14
|
# @attr [String] token
|
|
@@ -15,6 +16,8 @@ module OnlinePayments
|
|
|
15
16
|
|
|
16
17
|
attr_accessor :card
|
|
17
18
|
|
|
19
|
+
attr_accessor :hosted_fields_session_id
|
|
20
|
+
|
|
18
21
|
attr_accessor :payment_product_id
|
|
19
22
|
|
|
20
23
|
attr_accessor :payout_reason
|
|
@@ -25,6 +28,7 @@ module OnlinePayments
|
|
|
25
28
|
def to_h
|
|
26
29
|
hash = super
|
|
27
30
|
hash['card'] = @card.to_h unless @card.nil?
|
|
31
|
+
hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil?
|
|
28
32
|
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
|
29
33
|
hash['payoutReason'] = @payout_reason unless @payout_reason.nil?
|
|
30
34
|
hash['token'] = @token unless @token.nil?
|
|
@@ -37,6 +41,9 @@ module OnlinePayments
|
|
|
37
41
|
raise TypeError, "value '%s' is not a Hash" % [hash['card']] unless hash['card'].is_a? Hash
|
|
38
42
|
@card = OnlinePayments::SDK::Domain::Card.new_from_hash(hash['card'])
|
|
39
43
|
end
|
|
44
|
+
if hash.has_key? 'hostedFieldsSessionId'
|
|
45
|
+
@hosted_fields_session_id = hash['hostedFieldsSessionId']
|
|
46
|
+
end
|
|
40
47
|
if hash.has_key? 'paymentProductId'
|
|
41
48
|
@payment_product_id = hash['paymentProductId']
|
|
42
49
|
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
|
|
6
|
+
module OnlinePayments
|
|
7
|
+
module SDK
|
|
8
|
+
module Domain
|
|
9
|
+
# @attr [String] cardholder_name
|
|
10
|
+
# @attr [String] expiry_date
|
|
11
|
+
# @attr [String] logo_url
|
|
12
|
+
# @attr [String] masked_pan
|
|
13
|
+
# @attr [Integer] payment_product_id
|
|
14
|
+
# @attr [String] product_name
|
|
15
|
+
# @attr [String] token
|
|
16
|
+
class CardToken < OnlinePayments::SDK::Domain::DataObject
|
|
17
|
+
|
|
18
|
+
attr_accessor :cardholder_name
|
|
19
|
+
|
|
20
|
+
attr_accessor :expiry_date
|
|
21
|
+
|
|
22
|
+
attr_accessor :logo_url
|
|
23
|
+
|
|
24
|
+
attr_accessor :masked_pan
|
|
25
|
+
|
|
26
|
+
attr_accessor :payment_product_id
|
|
27
|
+
|
|
28
|
+
attr_accessor :product_name
|
|
29
|
+
|
|
30
|
+
attr_accessor :token
|
|
31
|
+
|
|
32
|
+
# @return (Hash)
|
|
33
|
+
def to_h
|
|
34
|
+
hash = super
|
|
35
|
+
hash['cardholderName'] = @cardholder_name unless @cardholder_name.nil?
|
|
36
|
+
hash['expiryDate'] = @expiry_date unless @expiry_date.nil?
|
|
37
|
+
hash['logoUrl'] = @logo_url unless @logo_url.nil?
|
|
38
|
+
hash['maskedPan'] = @masked_pan unless @masked_pan.nil?
|
|
39
|
+
hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
|
|
40
|
+
hash['productName'] = @product_name unless @product_name.nil?
|
|
41
|
+
hash['token'] = @token unless @token.nil?
|
|
42
|
+
hash
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def from_hash(hash)
|
|
46
|
+
super
|
|
47
|
+
if hash.has_key? 'cardholderName'
|
|
48
|
+
@cardholder_name = hash['cardholderName']
|
|
49
|
+
end
|
|
50
|
+
if hash.has_key? 'expiryDate'
|
|
51
|
+
@expiry_date = hash['expiryDate']
|
|
52
|
+
end
|
|
53
|
+
if hash.has_key? 'logoUrl'
|
|
54
|
+
@logo_url = hash['logoUrl']
|
|
55
|
+
end
|
|
56
|
+
if hash.has_key? 'maskedPan'
|
|
57
|
+
@masked_pan = hash['maskedPan']
|
|
58
|
+
end
|
|
59
|
+
if hash.has_key? 'paymentProductId'
|
|
60
|
+
@payment_product_id = hash['paymentProductId']
|
|
61
|
+
end
|
|
62
|
+
if hash.has_key? 'productName'
|
|
63
|
+
@product_name = hash['productName']
|
|
64
|
+
end
|
|
65
|
+
if hash.has_key? 'token'
|
|
66
|
+
@token = hash['token']
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/card_token'
|
|
4
5
|
require 'onlinepayments/sdk/domain/data_object'
|
|
5
6
|
require 'onlinepayments/sdk/domain/session_data'
|
|
6
7
|
|
|
7
8
|
module OnlinePayments
|
|
8
9
|
module SDK
|
|
9
10
|
module Domain
|
|
11
|
+
# @attr [Array<OnlinePayments::SDK::Domain::CardToken>] card_tokens
|
|
10
12
|
# @attr [String] hosted_fields_session_id
|
|
11
13
|
# @attr [Array<String>] invalid_tokens
|
|
12
14
|
# @attr [String] sdk_sri
|
|
@@ -14,6 +16,8 @@ module OnlinePayments
|
|
|
14
16
|
# @attr [OnlinePayments::SDK::Domain::SessionData] session_data
|
|
15
17
|
class CreateHostedFieldsSessionResponse < OnlinePayments::SDK::Domain::DataObject
|
|
16
18
|
|
|
19
|
+
attr_accessor :card_tokens
|
|
20
|
+
|
|
17
21
|
attr_accessor :hosted_fields_session_id
|
|
18
22
|
|
|
19
23
|
attr_accessor :invalid_tokens
|
|
@@ -27,6 +31,7 @@ module OnlinePayments
|
|
|
27
31
|
# @return (Hash)
|
|
28
32
|
def to_h
|
|
29
33
|
hash = super
|
|
34
|
+
hash['cardTokens'] = @card_tokens.collect{|val| val.to_h} unless @card_tokens.nil?
|
|
30
35
|
hash['hostedFieldsSessionId'] = @hosted_fields_session_id unless @hosted_fields_session_id.nil?
|
|
31
36
|
hash['invalidTokens'] = @invalid_tokens unless @invalid_tokens.nil?
|
|
32
37
|
hash['sdkSri'] = @sdk_sri unless @sdk_sri.nil?
|
|
@@ -37,6 +42,13 @@ module OnlinePayments
|
|
|
37
42
|
|
|
38
43
|
def from_hash(hash)
|
|
39
44
|
super
|
|
45
|
+
if hash.has_key? 'cardTokens'
|
|
46
|
+
raise TypeError, "value '%s' is not an Array" % [hash['cardTokens']] unless hash['cardTokens'].is_a? Array
|
|
47
|
+
@card_tokens = []
|
|
48
|
+
hash['cardTokens'].each do |e|
|
|
49
|
+
@card_tokens << OnlinePayments::SDK::Domain::CardToken.new_from_hash(e)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
40
52
|
if hash.has_key? 'hostedFieldsSessionId'
|
|
41
53
|
@hosted_fields_session_id = hash['hostedFieldsSessionId']
|
|
42
54
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file was automatically generated.
|
|
3
|
+
#
|
|
4
|
+
require 'onlinepayments/sdk/domain/data_object'
|
|
5
|
+
|
|
6
|
+
module OnlinePayments
|
|
7
|
+
module SDK
|
|
8
|
+
module Domain
|
|
9
|
+
# @attr [String] payment_bic
|
|
10
|
+
# @attr [String] payment_beneficiary
|
|
11
|
+
# @attr [String] payment_iban
|
|
12
|
+
# @attr [String] payment_reference
|
|
13
|
+
# @attr [String] qr_code
|
|
14
|
+
class PaymentProduct11 < OnlinePayments::SDK::Domain::DataObject
|
|
15
|
+
|
|
16
|
+
attr_accessor :payment_bic
|
|
17
|
+
|
|
18
|
+
attr_accessor :payment_beneficiary
|
|
19
|
+
|
|
20
|
+
attr_accessor :payment_iban
|
|
21
|
+
|
|
22
|
+
attr_accessor :payment_reference
|
|
23
|
+
|
|
24
|
+
attr_accessor :qr_code
|
|
25
|
+
|
|
26
|
+
# @return (Hash)
|
|
27
|
+
def to_h
|
|
28
|
+
hash = super
|
|
29
|
+
hash['paymentBIC'] = @payment_bic unless @payment_bic.nil?
|
|
30
|
+
hash['paymentBeneficiary'] = @payment_beneficiary unless @payment_beneficiary.nil?
|
|
31
|
+
hash['paymentIBAN'] = @payment_iban unless @payment_iban.nil?
|
|
32
|
+
hash['paymentReference'] = @payment_reference unless @payment_reference.nil?
|
|
33
|
+
hash['qrCode'] = @qr_code unless @qr_code.nil?
|
|
34
|
+
hash
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def from_hash(hash)
|
|
38
|
+
super
|
|
39
|
+
if hash.has_key? 'paymentBIC'
|
|
40
|
+
@payment_bic = hash['paymentBIC']
|
|
41
|
+
end
|
|
42
|
+
if hash.has_key? 'paymentBeneficiary'
|
|
43
|
+
@payment_beneficiary = hash['paymentBeneficiary']
|
|
44
|
+
end
|
|
45
|
+
if hash.has_key? 'paymentIBAN'
|
|
46
|
+
@payment_iban = hash['paymentIBAN']
|
|
47
|
+
end
|
|
48
|
+
if hash.has_key? 'paymentReference'
|
|
49
|
+
@payment_reference = hash['paymentReference']
|
|
50
|
+
end
|
|
51
|
+
if hash.has_key? 'qrCode'
|
|
52
|
+
@qr_code = hash['qrCode']
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
#
|
|
2
2
|
# This file was automatically generated.
|
|
3
3
|
#
|
|
4
|
-
require 'date'
|
|
5
|
-
|
|
6
4
|
require 'onlinepayments/sdk/domain/data_object'
|
|
7
5
|
|
|
8
6
|
module OnlinePayments
|
|
9
7
|
module SDK
|
|
10
8
|
module Domain
|
|
11
|
-
# @attr [
|
|
9
|
+
# @attr [true/false] skip_email_validation
|
|
12
10
|
class RedirectPaymentProduct11SpecificInput < OnlinePayments::SDK::Domain::DataObject
|
|
13
11
|
|
|
14
|
-
attr_accessor :
|
|
12
|
+
attr_accessor :skip_email_validation
|
|
15
13
|
|
|
16
14
|
# @return (Hash)
|
|
17
15
|
def to_h
|
|
18
16
|
hash = super
|
|
19
|
-
hash['
|
|
17
|
+
hash['skipEmailValidation'] = @skip_email_validation unless @skip_email_validation.nil?
|
|
20
18
|
hash
|
|
21
19
|
end
|
|
22
20
|
|
|
23
21
|
def from_hash(hash)
|
|
24
22
|
super
|
|
25
|
-
if hash.has_key? '
|
|
26
|
-
@
|
|
23
|
+
if hash.has_key? 'skipEmailValidation'
|
|
24
|
+
@skip_email_validation = hash['skipEmailValidation']
|
|
27
25
|
end
|
|
28
26
|
end
|
|
29
27
|
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/payment_product11'
|
|
5
6
|
require 'onlinepayments/sdk/domain/payment_product3012'
|
|
6
7
|
require 'onlinepayments/sdk/domain/payment_product350'
|
|
7
8
|
require 'onlinepayments/sdk/domain/payment_product5001'
|
|
@@ -14,6 +15,7 @@ require 'onlinepayments/sdk/domain/pending_authentication'
|
|
|
14
15
|
module OnlinePayments
|
|
15
16
|
module SDK
|
|
16
17
|
module Domain
|
|
18
|
+
# @attr [OnlinePayments::SDK::Domain::PaymentProduct11] payment_product11
|
|
17
19
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct3012] payment_product3012
|
|
18
20
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct350] payment_product350
|
|
19
21
|
# @attr [OnlinePayments::SDK::Domain::PaymentProduct5001] payment_product5001
|
|
@@ -24,6 +26,8 @@ module OnlinePayments
|
|
|
24
26
|
# @attr [OnlinePayments::SDK::Domain::PendingAuthentication] pending_authentication
|
|
25
27
|
class ShowFormData < OnlinePayments::SDK::Domain::DataObject
|
|
26
28
|
|
|
29
|
+
attr_accessor :payment_product11
|
|
30
|
+
|
|
27
31
|
attr_accessor :payment_product3012
|
|
28
32
|
|
|
29
33
|
attr_accessor :payment_product350
|
|
@@ -43,6 +47,7 @@ module OnlinePayments
|
|
|
43
47
|
# @return (Hash)
|
|
44
48
|
def to_h
|
|
45
49
|
hash = super
|
|
50
|
+
hash['paymentProduct11'] = @payment_product11.to_h unless @payment_product11.nil?
|
|
46
51
|
hash['paymentProduct3012'] = @payment_product3012.to_h unless @payment_product3012.nil?
|
|
47
52
|
hash['paymentProduct350'] = @payment_product350.to_h unless @payment_product350.nil?
|
|
48
53
|
hash['paymentProduct5001'] = @payment_product5001.to_h unless @payment_product5001.nil?
|
|
@@ -56,6 +61,10 @@ module OnlinePayments
|
|
|
56
61
|
|
|
57
62
|
def from_hash(hash)
|
|
58
63
|
super
|
|
64
|
+
if hash.has_key? 'paymentProduct11'
|
|
65
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct11']] unless hash['paymentProduct11'].is_a? Hash
|
|
66
|
+
@payment_product11 = OnlinePayments::SDK::Domain::PaymentProduct11.new_from_hash(hash['paymentProduct11'])
|
|
67
|
+
end
|
|
59
68
|
if hash.has_key? 'paymentProduct3012'
|
|
60
69
|
raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct3012']] unless hash['paymentProduct3012'].is_a? Hash
|
|
61
70
|
@payment_product3012 = OnlinePayments::SDK::Domain::PaymentProduct3012.new_from_hash(hash['paymentProduct3012'])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = 'onlinepayments-sdk-ruby'
|
|
3
|
-
spec.version = '
|
|
3
|
+
spec.version = '9.0.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,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onlinepayments-sdk-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 9.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Worldline Direct support team
|
|
@@ -226,6 +226,7 @@ files:
|
|
|
226
226
|
- lib/onlinepayments/sdk/domain/card_payout_method_specific_input.rb
|
|
227
227
|
- lib/onlinepayments/sdk/domain/card_recurrence_details.rb
|
|
228
228
|
- lib/onlinepayments/sdk/domain/card_source.rb
|
|
229
|
+
- lib/onlinepayments/sdk/domain/card_token.rb
|
|
229
230
|
- lib/onlinepayments/sdk/domain/card_without_cvv.rb
|
|
230
231
|
- lib/onlinepayments/sdk/domain/click_to_pay.rb
|
|
231
232
|
- lib/onlinepayments/sdk/domain/company_information.rb
|
|
@@ -362,6 +363,7 @@ files:
|
|
|
362
363
|
- lib/onlinepayments/sdk/domain/payment_output.rb
|
|
363
364
|
- lib/onlinepayments/sdk/domain/payment_output_summary.rb
|
|
364
365
|
- lib/onlinepayments/sdk/domain/payment_product.rb
|
|
366
|
+
- lib/onlinepayments/sdk/domain/payment_product11.rb
|
|
365
367
|
- lib/onlinepayments/sdk/domain/payment_product130_specific_input.rb
|
|
366
368
|
- lib/onlinepayments/sdk/domain/payment_product130_specific_three_d_secure.rb
|
|
367
369
|
- lib/onlinepayments/sdk/domain/payment_product3012.rb
|