connect-sdk-ruby 1.31.0 → 1.32.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8df5897a79a44422bf030b39a746fd2829af0d36cc98607e1a9f417b49a6396f
|
4
|
+
data.tar.gz: 5e8454e1e8785f9079bc589b99e23ef184e4e2feb8e8957bd88121823db2ffd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ea3bde82f8e40e1935ccbd0436103a406efa65222a9ae18081c74daa6e9e66734f7406add81466b8574a7c8762864d0b6e26d853991b0e5d9ec32da3436498f
|
7
|
+
data.tar.gz: 6a8c1b9fac228f2037cb1d798fed4af64d40f7d4d365d15e03462cea1297a2dacf0504454d757a95abed209950d7f87b57f3289619db83ad4bf1af25b64ff2e4
|
data/connect-sdk-ruby.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'connect-sdk-ruby'
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.32.0'
|
4
4
|
spec.authors = ['Ingenico ePayments']
|
5
5
|
spec.email = ['github@epay.ingenico.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
|
4
|
+
#
|
5
|
+
require 'ingenico/connect/sdk/factory'
|
6
|
+
|
7
|
+
|
8
|
+
def example
|
9
|
+
get_client do |client|
|
10
|
+
response = client.merchant('merchantId').disputes().cancel('disputeId')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_client
|
15
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
16
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
17
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
18
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
19
|
+
ensure
|
20
|
+
# Free networking resources when done
|
21
|
+
client.close unless client.nil?
|
22
|
+
end
|
@@ -80,6 +80,37 @@ module Ingenico::Connect::SDK
|
|
80
80
|
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
81
81
|
raise create_exception(e.status_code, e.body, error_object, context)
|
82
82
|
end
|
83
|
+
|
84
|
+
# Resource /{{merchantId}}/disputes/{{disputeId}}/cancel - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/disputes/cancel.html Cancel dispute}
|
85
|
+
# dispute_id:: String
|
86
|
+
# context:: {Ingenico::Connect::SDK::CallContext}
|
87
|
+
# Returns:: {Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse}
|
88
|
+
# Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
|
89
|
+
# Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
|
90
|
+
# Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
|
91
|
+
# Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
|
92
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
93
|
+
# Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the Ingenico ePayments platform,
|
94
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
95
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
96
|
+
# Raises:: {Ingenico::Connect::SDK::ApiException} if the Ingenico ePayments platform returned any other error
|
97
|
+
def cancel(dispute_id, context=nil)
|
98
|
+
path_context = {
|
99
|
+
'disputeId' => dispute_id,
|
100
|
+
}
|
101
|
+
uri = instantiate_uri('/{apiVersion}/{merchantId}/disputes/{disputeId}/cancel', path_context)
|
102
|
+
return @communicator.post(
|
103
|
+
uri,
|
104
|
+
client_headers,
|
105
|
+
nil,
|
106
|
+
nil,
|
107
|
+
Ingenico::Connect::SDK::Domain::Dispute::DisputeResponse,
|
108
|
+
context)
|
109
|
+
rescue ResponseException => e
|
110
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
111
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
112
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
113
|
+
end
|
83
114
|
end
|
84
115
|
end
|
85
116
|
end
|
@@ -5,7 +5,7 @@ module Ingenico::Connect::SDK
|
|
5
5
|
|
6
6
|
# Manages metadata about the server using the SDK
|
7
7
|
class MetaDataProvider
|
8
|
-
@@SDK_VERSION = '1.
|
8
|
+
@@SDK_VERSION = '1.32.0'
|
9
9
|
@@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
|
10
10
|
@@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
|
11
11
|
'Date', 'Content-Type', 'Authorization'].sort!.freeze
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: connect-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingenico ePayments
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- Rakefile
|
123
123
|
- connect-sdk-ruby.gemspec
|
124
124
|
- examples/merchant/captures/get_capture_example.rb
|
125
|
+
- examples/merchant/disputes/cancel_dispute_example.rb
|
125
126
|
- examples/merchant/disputes/get_dispute_example.rb
|
126
127
|
- examples/merchant/disputes/submit_dispute_example.rb
|
127
128
|
- examples/merchant/example_configuration.yml
|