acquiring-sdk-ruby 1.0.0 → 1.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.
- checksums.yaml +4 -4
- data/acquiring-sdk-ruby.gemspec +1 -1
- data/lib/worldline/acquiring/sdk/authentication/oauth2_authenticator.rb +1 -1
- data/lib/worldline/acquiring/sdk/communication/metadata_provider.rb +1 -1
- data/lib/worldline/acquiring/sdk/v1/acquirer/merchant/refunds/refunds_client.rb +1 -1
- data/lib/worldline/acquiring/sdk/v1/domain/api_refund_request.rb +9 -0
- data/lib/worldline/acquiring/sdk/v1/domain/api_refund_reversal_request.rb +52 -0
- data/lib/worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund.rb +9 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36681ad9c630f5e667db37fcda5058541f78838eb6a6c794b5a1b4dd19e4c8cf
|
4
|
+
data.tar.gz: 773d18aae4376f8c782f689c124936f65cced602cf3fc81d2605361efcd33df6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d10ebce4a8a1f3b079c4b0ddd75aa11504fedf1d26cf5d746a7b4e8a722800110192bd5fff42cdc9f91f356c50293f1d0df4db2243e4ce3b0b9bbdfabb5b3aa
|
7
|
+
data.tar.gz: e9701ccaf887c4343a131781e45c81ab60ec800687f6ae7bbbda991a9fedc0cdeb8fcfa7b43670998d2c81c36c7574e734a6fefa40a2e827e9b6576365c137de
|
data/acquiring-sdk-ruby.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'acquiring-sdk-ruby'
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.1.0'
|
4
4
|
spec.authors = ['Worldline Acquiring']
|
5
5
|
spec.email = ['github.acquiring@worldline.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Worldline Acquiring platform using the Worldline Acquiring API}
|
@@ -41,7 +41,7 @@ module Worldline
|
|
41
41
|
TOKEN_TYPES = [
|
42
42
|
TokenType.new('', [
|
43
43
|
'processing_payment', 'processing_refund', 'processing_credittransfer', 'processing_accountverification',
|
44
|
-
'processing_operation_reverse', 'processing_dcc_rate', 'services_ping'
|
44
|
+
'processing_balanceinquiry', 'processing_operation_reverse', 'processing_dcc_rate', 'services_ping'
|
45
45
|
]),
|
46
46
|
]
|
47
47
|
|
@@ -14,7 +14,7 @@ module Worldline
|
|
14
14
|
class MetadataProvider
|
15
15
|
private
|
16
16
|
|
17
|
-
SDK_VERSION = '1.
|
17
|
+
SDK_VERSION = '1.1.0'.freeze
|
18
18
|
SERVER_META_INFO_HEADER = 'X-WL-ServerMetaInfo'.freeze
|
19
19
|
PROHIBITED_HEADERS = [SERVER_META_INFO_HEADER, 'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
20
20
|
CHARSET = 'utf-8'.freeze
|
@@ -119,7 +119,7 @@ module Worldline
|
|
119
119
|
# Resource /processing/v1/!{acquirerId}/!{merchantId}/refunds/!{refundId}/authorization-reversals - {https://docs.acquiring.worldline-solutions.com/api-reference#tag/Refunds/operation/reverseRefundAuthorization Reverse refund authorization}
|
120
120
|
#
|
121
121
|
# @param refund_id [String]
|
122
|
-
# @param body [Worldline::Acquiring::SDK::V1::Domain::
|
122
|
+
# @param body [Worldline::Acquiring::SDK::V1::Domain::ApiRefundReversalRequest]
|
123
123
|
# @param context [Worldline::Acquiring::SDK::CallContext, nil]
|
124
124
|
# @return [Worldline::Acquiring::SDK::V1::Domain::ApiActionResponseForRefund]
|
125
125
|
# @raise [Worldline::Acquiring::SDK::V1::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
@@ -9,6 +9,7 @@ require 'worldline/acquiring/sdk/v1/domain/card_payment_data_for_refund'
|
|
9
9
|
require 'worldline/acquiring/sdk/v1/domain/dcc_data'
|
10
10
|
require 'worldline/acquiring/sdk/v1/domain/merchant_data'
|
11
11
|
require 'worldline/acquiring/sdk/v1/domain/payment_references'
|
12
|
+
require 'worldline/acquiring/sdk/v1/domain/terminal_data'
|
12
13
|
|
13
14
|
module Worldline
|
14
15
|
module Acquiring
|
@@ -21,6 +22,7 @@ module Worldline
|
|
21
22
|
# @attr [Worldline::Acquiring::SDK::V1::Domain::MerchantData] merchant
|
22
23
|
# @attr [String] operation_id
|
23
24
|
# @attr [Worldline::Acquiring::SDK::V1::Domain::PaymentReferences] references
|
25
|
+
# @attr [Worldline::Acquiring::SDK::V1::Domain::TerminalData] terminal_data
|
24
26
|
# @attr [DateTime] transaction_timestamp
|
25
27
|
class ApiRefundRequest < Worldline::Acquiring::SDK::Domain::DataObject
|
26
28
|
|
@@ -36,6 +38,8 @@ module Worldline
|
|
36
38
|
|
37
39
|
attr_accessor :references
|
38
40
|
|
41
|
+
attr_accessor :terminal_data
|
42
|
+
|
39
43
|
attr_accessor :transaction_timestamp
|
40
44
|
|
41
45
|
# @return (Hash)
|
@@ -47,6 +51,7 @@ module Worldline
|
|
47
51
|
hash['merchant'] = @merchant.to_h unless @merchant.nil?
|
48
52
|
hash['operationId'] = @operation_id unless @operation_id.nil?
|
49
53
|
hash['references'] = @references.to_h unless @references.nil?
|
54
|
+
hash['terminalData'] = @terminal_data.to_h unless @terminal_data.nil?
|
50
55
|
hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil?
|
51
56
|
hash
|
52
57
|
end
|
@@ -76,6 +81,10 @@ module Worldline
|
|
76
81
|
raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
|
77
82
|
@references = Worldline::Acquiring::SDK::V1::Domain::PaymentReferences.new_from_hash(hash['references'])
|
78
83
|
end
|
84
|
+
if hash.has_key? 'terminalData'
|
85
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['terminalData']] unless hash['terminalData'].is_a? Hash
|
86
|
+
@terminal_data = Worldline::Acquiring::SDK::V1::Domain::TerminalData.new_from_hash(hash['terminalData'])
|
87
|
+
end
|
79
88
|
if hash.has_key? 'transactionTimestamp'
|
80
89
|
@transaction_timestamp = DateTime.parse(hash['transactionTimestamp'])
|
81
90
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
#
|
2
|
+
# This file was automatically generated.
|
3
|
+
#
|
4
|
+
require 'date'
|
5
|
+
|
6
|
+
require 'worldline/acquiring/sdk/domain/data_object'
|
7
|
+
require 'worldline/acquiring/sdk/v1/domain/terminal_data'
|
8
|
+
|
9
|
+
module Worldline
|
10
|
+
module Acquiring
|
11
|
+
module SDK
|
12
|
+
module V1
|
13
|
+
module Domain
|
14
|
+
# @attr [String] operation_id
|
15
|
+
# @attr [Worldline::Acquiring::SDK::V1::Domain::TerminalData] terminal_data
|
16
|
+
# @attr [DateTime] transaction_timestamp
|
17
|
+
class ApiRefundReversalRequest < Worldline::Acquiring::SDK::Domain::DataObject
|
18
|
+
|
19
|
+
attr_accessor :operation_id
|
20
|
+
|
21
|
+
attr_accessor :terminal_data
|
22
|
+
|
23
|
+
attr_accessor :transaction_timestamp
|
24
|
+
|
25
|
+
# @return (Hash)
|
26
|
+
def to_h
|
27
|
+
hash = super
|
28
|
+
hash['operationId'] = @operation_id unless @operation_id.nil?
|
29
|
+
hash['terminalData'] = @terminal_data.to_h unless @terminal_data.nil?
|
30
|
+
hash['transactionTimestamp'] = @transaction_timestamp.iso8601(3) unless @transaction_timestamp.nil?
|
31
|
+
hash
|
32
|
+
end
|
33
|
+
|
34
|
+
def from_hash(hash)
|
35
|
+
super
|
36
|
+
if hash.has_key? 'operationId'
|
37
|
+
@operation_id = hash['operationId']
|
38
|
+
end
|
39
|
+
if hash.has_key? 'terminalData'
|
40
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['terminalData']] unless hash['terminalData'].is_a? Hash
|
41
|
+
@terminal_data = Worldline::Acquiring::SDK::V1::Domain::TerminalData.new_from_hash(hash['terminalData'])
|
42
|
+
end
|
43
|
+
if hash.has_key? 'transactionTimestamp'
|
44
|
+
@transaction_timestamp = DateTime.parse(hash['transactionTimestamp'])
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
require 'worldline/acquiring/sdk/domain/data_object'
|
5
5
|
require 'worldline/acquiring/sdk/v1/domain/network_token_data'
|
6
6
|
require 'worldline/acquiring/sdk/v1/domain/plain_card_data'
|
7
|
+
require 'worldline/acquiring/sdk/v1/domain/point_of_sale_data'
|
7
8
|
|
8
9
|
module Worldline
|
9
10
|
module Acquiring
|
@@ -17,6 +18,7 @@ module Worldline
|
|
17
18
|
# @attr [String] card_entry_mode
|
18
19
|
# @attr [String] cardholder_verification_method
|
19
20
|
# @attr [Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData] network_token_data
|
21
|
+
# @attr [Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData] point_of_sale_data
|
20
22
|
# @attr [String] wallet_id
|
21
23
|
class CardPaymentDataForRefund < Worldline::Acquiring::SDK::Domain::DataObject
|
22
24
|
|
@@ -34,6 +36,8 @@ module Worldline
|
|
34
36
|
|
35
37
|
attr_accessor :network_token_data
|
36
38
|
|
39
|
+
attr_accessor :point_of_sale_data
|
40
|
+
|
37
41
|
attr_accessor :wallet_id
|
38
42
|
|
39
43
|
# @return (Hash)
|
@@ -46,6 +50,7 @@ module Worldline
|
|
46
50
|
hash['cardEntryMode'] = @card_entry_mode unless @card_entry_mode.nil?
|
47
51
|
hash['cardholderVerificationMethod'] = @cardholder_verification_method unless @cardholder_verification_method.nil?
|
48
52
|
hash['networkTokenData'] = @network_token_data.to_h unless @network_token_data.nil?
|
53
|
+
hash['pointOfSaleData'] = @point_of_sale_data.to_h unless @point_of_sale_data.nil?
|
49
54
|
hash['walletId'] = @wallet_id unless @wallet_id.nil?
|
50
55
|
hash
|
51
56
|
end
|
@@ -75,6 +80,10 @@ module Worldline
|
|
75
80
|
raise TypeError, "value '%s' is not a Hash" % [hash['networkTokenData']] unless hash['networkTokenData'].is_a? Hash
|
76
81
|
@network_token_data = Worldline::Acquiring::SDK::V1::Domain::NetworkTokenData.new_from_hash(hash['networkTokenData'])
|
77
82
|
end
|
83
|
+
if hash.has_key? 'pointOfSaleData'
|
84
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['pointOfSaleData']] unless hash['pointOfSaleData'].is_a? Hash
|
85
|
+
@point_of_sale_data = Worldline::Acquiring::SDK::V1::Domain::PointOfSaleData.new_from_hash(hash['pointOfSaleData'])
|
86
|
+
end
|
78
87
|
if hash.has_key? 'walletId'
|
79
88
|
@wallet_id = hash['walletId']
|
80
89
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acquiring-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Worldline Acquiring
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -234,6 +234,7 @@ files:
|
|
234
234
|
- lib/worldline/acquiring/sdk/v1/domain/api_refund_request.rb
|
235
235
|
- lib/worldline/acquiring/sdk/v1/domain/api_refund_resource.rb
|
236
236
|
- lib/worldline/acquiring/sdk/v1/domain/api_refund_response.rb
|
237
|
+
- lib/worldline/acquiring/sdk/v1/domain/api_refund_reversal_request.rb
|
237
238
|
- lib/worldline/acquiring/sdk/v1/domain/api_refund_summary_for_response.rb
|
238
239
|
- lib/worldline/acquiring/sdk/v1/domain/api_reversal_response.rb
|
239
240
|
- lib/worldline/acquiring/sdk/v1/domain/api_technical_reversal_request.rb
|
@@ -320,7 +321,7 @@ homepage: https://github.com/Worldline-Acquiring/acquiring-sdk-ruby
|
|
320
321
|
licenses:
|
321
322
|
- MIT
|
322
323
|
metadata: {}
|
323
|
-
post_install_message:
|
324
|
+
post_install_message:
|
324
325
|
rdoc_options: []
|
325
326
|
require_paths:
|
326
327
|
- lib
|
@@ -336,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
336
337
|
version: '0'
|
337
338
|
requirements: []
|
338
339
|
rubygems_version: 3.4.22
|
339
|
-
signing_key:
|
340
|
+
signing_key:
|
340
341
|
specification_version: 4
|
341
342
|
summary: SDK to communicate with the Worldline Acquiring platform using the Worldline
|
342
343
|
Acquiring API
|