connect-sdk-ruby 1.9.0 → 1.10.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/connect-sdk-ruby.gemspec +1 -1
- data/examples/merchant/payments/find_payments_example.rb +30 -0
- data/examples/merchant/payouts/find_payouts_example.rb +30 -0
- data/examples/merchant/refunds/find_refunds_example.rb +30 -0
- data/lib/ingenico/connect/sdk/domain/payment/find_payments_response.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/payout/find_payouts_response.rb +59 -0
- data/lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb +59 -0
- data/lib/ingenico/connect/sdk/merchant/payments/find_payments_params.rb +38 -0
- data/lib/ingenico/connect/sdk/merchant/payments/payments_client.rb +30 -0
- data/lib/ingenico/connect/sdk/merchant/payouts/find_payouts_params.rb +38 -0
- data/lib/ingenico/connect/sdk/merchant/payouts/payouts_client.rb +30 -0
- data/lib/ingenico/connect/sdk/merchant/refunds/find_refunds_params.rb +38 -0
- data/lib/ingenico/connect/sdk/merchant/refunds/refunds_client.rb +30 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- metadata +11 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd4c7e7f335ced6b988c240e82d857ccd580ef7
|
4
|
+
data.tar.gz: dac71e5f30e83219248e27e23fcba439b43195ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e5a052629a337d0b7049b601977099a6a49f80b44746d84b58c9ac3100111227327432e0d4ca91a73ac165e621aea6811940b277adce132006f8aece5bc7758
|
7
|
+
data.tar.gz: 987e18b31b9a7585c95df938682d478b5ca41e6f7fd1c9d9ab0562cf29f19be9067d5b881866096e9070a7cafff1b5e70979e9023fae43fbc3ec8f2d488cf0f9
|
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.10.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,30 @@
|
|
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
|
+
require 'ingenico/connect/sdk/merchant/payments/find_payments_params'
|
7
|
+
|
8
|
+
Payments = Ingenico::Connect::SDK::Merchant::Payments
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
query = Payments::FindPaymentsParams.new
|
13
|
+
query.merchant_reference = 'AcmeOrder0001'
|
14
|
+
query.merchant_order_id = 123456
|
15
|
+
query.offset = 0
|
16
|
+
query.limit = 10
|
17
|
+
|
18
|
+
response = client.merchant('merchantId').payments().find(query)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_client
|
23
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
24
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
25
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
26
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
27
|
+
ensure
|
28
|
+
# Free networking resources when done
|
29
|
+
client.close unless client.nil?
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
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
|
+
require 'ingenico/connect/sdk/merchant/payouts/find_payouts_params'
|
7
|
+
|
8
|
+
Payouts = Ingenico::Connect::SDK::Merchant::Payouts
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
query = Payouts::FindPayoutsParams.new
|
13
|
+
query.merchant_reference = 'AcmeOrder0001'
|
14
|
+
query.merchant_order_id = 123456
|
15
|
+
query.offset = 0
|
16
|
+
query.limit = 10
|
17
|
+
|
18
|
+
response = client.merchant('merchantId').payouts().find(query)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_client
|
23
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
24
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
25
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
26
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
27
|
+
ensure
|
28
|
+
# Free networking resources when done
|
29
|
+
client.close unless client.nil?
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
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
|
+
require 'ingenico/connect/sdk/merchant/refunds/find_refunds_params'
|
7
|
+
|
8
|
+
Refunds = Ingenico::Connect::SDK::Merchant::Refunds
|
9
|
+
|
10
|
+
def example
|
11
|
+
get_client do |client|
|
12
|
+
query = Refunds::FindRefundsParams.new
|
13
|
+
query.merchant_reference = 'AcmeOrder0001'
|
14
|
+
query.merchant_order_id = 123456
|
15
|
+
query.offset = 0
|
16
|
+
query.limit = 10
|
17
|
+
|
18
|
+
response = client.merchant('merchantId').refunds().find(query)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def get_client
|
23
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
24
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
25
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
26
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
27
|
+
ensure
|
28
|
+
# Free networking resources when done
|
29
|
+
client.close unless client.nil?
|
30
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/payment/payment'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payment
|
11
|
+
|
12
|
+
class FindPaymentsResponse < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# Integer
|
15
|
+
attr_accessor :limit
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :offset
|
19
|
+
|
20
|
+
# Array of {Ingenico::Connect::SDK::Domain::Payment::Payment}
|
21
|
+
attr_accessor :payments
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :total_count
|
25
|
+
|
26
|
+
def to_h
|
27
|
+
hash = super
|
28
|
+
add_to_hash(hash, 'limit', @limit)
|
29
|
+
add_to_hash(hash, 'offset', @offset)
|
30
|
+
add_to_hash(hash, 'payments', @payments)
|
31
|
+
add_to_hash(hash, 'totalCount', @total_count)
|
32
|
+
hash
|
33
|
+
end
|
34
|
+
|
35
|
+
def from_hash(hash)
|
36
|
+
super
|
37
|
+
if hash.has_key?('limit')
|
38
|
+
@limit = hash['limit']
|
39
|
+
end
|
40
|
+
if hash.has_key?('offset')
|
41
|
+
@offset = hash['offset']
|
42
|
+
end
|
43
|
+
if hash.has_key?('payments')
|
44
|
+
if !(hash['payments'].is_a? Array)
|
45
|
+
raise TypeError, "value '%s' is not an Array" % [hash['payments']]
|
46
|
+
end
|
47
|
+
@payments = []
|
48
|
+
hash['payments'].each do |e|
|
49
|
+
@payments << Ingenico::Connect::SDK::Domain::Payment::Payment.new_from_hash(e)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
if hash.has_key?('totalCount')
|
53
|
+
@total_count = hash['totalCount']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/payout/payout_result'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Payout
|
11
|
+
|
12
|
+
class FindPayoutsResponse < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# Integer
|
15
|
+
attr_accessor :limit
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :offset
|
19
|
+
|
20
|
+
# Array of {Ingenico::Connect::SDK::Domain::Payout::PayoutResult}
|
21
|
+
attr_accessor :payouts
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :total_count
|
25
|
+
|
26
|
+
def to_h
|
27
|
+
hash = super
|
28
|
+
add_to_hash(hash, 'limit', @limit)
|
29
|
+
add_to_hash(hash, 'offset', @offset)
|
30
|
+
add_to_hash(hash, 'payouts', @payouts)
|
31
|
+
add_to_hash(hash, 'totalCount', @total_count)
|
32
|
+
hash
|
33
|
+
end
|
34
|
+
|
35
|
+
def from_hash(hash)
|
36
|
+
super
|
37
|
+
if hash.has_key?('limit')
|
38
|
+
@limit = hash['limit']
|
39
|
+
end
|
40
|
+
if hash.has_key?('offset')
|
41
|
+
@offset = hash['offset']
|
42
|
+
end
|
43
|
+
if hash.has_key?('payouts')
|
44
|
+
if !(hash['payouts'].is_a? Array)
|
45
|
+
raise TypeError, "value '%s' is not an Array" % [hash['payouts']]
|
46
|
+
end
|
47
|
+
@payouts = []
|
48
|
+
hash['payouts'].each do |e|
|
49
|
+
@payouts << Ingenico::Connect::SDK::Domain::Payout::PayoutResult.new_from_hash(e)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
if hash.has_key?('totalCount')
|
53
|
+
@total_count = hash['totalCount']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,59 @@
|
|
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/data_object'
|
6
|
+
require 'ingenico/connect/sdk/domain/refund/refund_result'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Refund
|
11
|
+
|
12
|
+
class FindRefundsResponse < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# Integer
|
15
|
+
attr_accessor :limit
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :offset
|
19
|
+
|
20
|
+
# Array of {Ingenico::Connect::SDK::Domain::Refund::RefundResult}
|
21
|
+
attr_accessor :refunds
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :total_count
|
25
|
+
|
26
|
+
def to_h
|
27
|
+
hash = super
|
28
|
+
add_to_hash(hash, 'limit', @limit)
|
29
|
+
add_to_hash(hash, 'offset', @offset)
|
30
|
+
add_to_hash(hash, 'refunds', @refunds)
|
31
|
+
add_to_hash(hash, 'totalCount', @total_count)
|
32
|
+
hash
|
33
|
+
end
|
34
|
+
|
35
|
+
def from_hash(hash)
|
36
|
+
super
|
37
|
+
if hash.has_key?('limit')
|
38
|
+
@limit = hash['limit']
|
39
|
+
end
|
40
|
+
if hash.has_key?('offset')
|
41
|
+
@offset = hash['offset']
|
42
|
+
end
|
43
|
+
if hash.has_key?('refunds')
|
44
|
+
if !(hash['refunds'].is_a? Array)
|
45
|
+
raise TypeError, "value '%s' is not an Array" % [hash['refunds']]
|
46
|
+
end
|
47
|
+
@refunds = []
|
48
|
+
hash['refunds'].each do |e|
|
49
|
+
@refunds << Ingenico::Connect::SDK::Domain::Refund::RefundResult.new_from_hash(e)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
if hash.has_key?('totalCount')
|
53
|
+
@total_count = hash['totalCount']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,38 @@
|
|
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/param_request'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Merchant
|
9
|
+
module Payments
|
10
|
+
|
11
|
+
# Query parameters for {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/find.html Find payments}
|
12
|
+
class FindPaymentsParams < Ingenico::Connect::SDK::ParamRequest
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :merchant_reference
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :merchant_order_id
|
19
|
+
|
20
|
+
# Integer
|
21
|
+
attr_accessor :offset
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :limit
|
25
|
+
|
26
|
+
# Returns an Array of {Ingenico::Connect::SDK::RequestParam} objects representing the attributes of this class
|
27
|
+
def to_request_parameters
|
28
|
+
result = []
|
29
|
+
add_parameter(result, 'merchantReference', @merchant_reference)
|
30
|
+
add_parameter(result, 'merchantOrderId', @merchant_order_id)
|
31
|
+
add_parameter(result, 'offset', @offset)
|
32
|
+
add_parameter(result, 'limit', @limit)
|
33
|
+
result
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -11,6 +11,7 @@ require 'ingenico/connect/sdk/domain/payment/cancel_approval_payment_response'
|
|
11
11
|
require 'ingenico/connect/sdk/domain/payment/cancel_payment_response'
|
12
12
|
require 'ingenico/connect/sdk/domain/payment/complete_payment_response'
|
13
13
|
require 'ingenico/connect/sdk/domain/payment/create_payment_response'
|
14
|
+
require 'ingenico/connect/sdk/domain/payment/find_payments_response'
|
14
15
|
require 'ingenico/connect/sdk/domain/payment/payment_approval_response'
|
15
16
|
require 'ingenico/connect/sdk/domain/payment/payment_error_response'
|
16
17
|
require 'ingenico/connect/sdk/domain/payment/payment_response'
|
@@ -32,6 +33,35 @@ module Ingenico::Connect::SDK
|
|
32
33
|
super(parent, path_context)
|
33
34
|
end
|
34
35
|
|
36
|
+
# Resource /{{merchantId}}/payments
|
37
|
+
#
|
38
|
+
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/find.html Find payments}
|
39
|
+
# query:: {Ingenico::Connect::SDK::Merchant::Payments::FindPaymentsParams}
|
40
|
+
# context:: {Ingenico::Connect::SDK::CallContext}
|
41
|
+
# Returns:: {Ingenico::Connect::SDK::Domain::Payment::FindPaymentsResponse}
|
42
|
+
# Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
|
43
|
+
# Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
|
44
|
+
# Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
|
45
|
+
# Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
|
46
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
47
|
+
# Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the Ingenico ePayments platform,
|
48
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
49
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
50
|
+
# Raises:: {Ingenico::Connect::SDK::ApiException} if the Ingenico ePayments platform returned any other error
|
51
|
+
def find(query, context=nil)
|
52
|
+
uri = instantiate_uri('/{apiVersion}/{merchantId}/payments', nil)
|
53
|
+
return @communicator.get(
|
54
|
+
uri,
|
55
|
+
client_headers,
|
56
|
+
query,
|
57
|
+
Ingenico::Connect::SDK::Domain::Payment::FindPaymentsResponse,
|
58
|
+
context)
|
59
|
+
rescue ResponseException => e
|
60
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
61
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
62
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
63
|
+
end
|
64
|
+
|
35
65
|
# Resource /{{merchantId}}/payments
|
36
66
|
#
|
37
67
|
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/create.html Create payment}
|
@@ -0,0 +1,38 @@
|
|
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/param_request'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Merchant
|
9
|
+
module Payouts
|
10
|
+
|
11
|
+
# Query parameters for {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payouts/find.html Find payouts}
|
12
|
+
class FindPayoutsParams < Ingenico::Connect::SDK::ParamRequest
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :merchant_reference
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :merchant_order_id
|
19
|
+
|
20
|
+
# Integer
|
21
|
+
attr_accessor :offset
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :limit
|
25
|
+
|
26
|
+
# Returns an Array of {Ingenico::Connect::SDK::RequestParam} objects representing the attributes of this class
|
27
|
+
def to_request_parameters
|
28
|
+
result = []
|
29
|
+
add_parameter(result, 'merchantReference', @merchant_reference)
|
30
|
+
add_parameter(result, 'merchantOrderId', @merchant_order_id)
|
31
|
+
add_parameter(result, 'offset', @offset)
|
32
|
+
add_parameter(result, 'limit', @limit)
|
33
|
+
result
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'ingenico/connect/sdk/api_resource'
|
6
6
|
require 'ingenico/connect/sdk/response_exception'
|
7
7
|
require 'ingenico/connect/sdk/domain/errors/error_response'
|
8
|
+
require 'ingenico/connect/sdk/domain/payout/find_payouts_response'
|
8
9
|
require 'ingenico/connect/sdk/domain/payout/payout_error_response'
|
9
10
|
require 'ingenico/connect/sdk/domain/payout/payout_response'
|
10
11
|
|
@@ -21,6 +22,35 @@ module Ingenico::Connect::SDK
|
|
21
22
|
super(parent, path_context)
|
22
23
|
end
|
23
24
|
|
25
|
+
# Resource /{{merchantId}}/payouts
|
26
|
+
#
|
27
|
+
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payouts/find.html Find payouts}
|
28
|
+
# query:: {Ingenico::Connect::SDK::Merchant::Payouts::FindPayoutsParams}
|
29
|
+
# context:: {Ingenico::Connect::SDK::CallContext}
|
30
|
+
# Returns:: {Ingenico::Connect::SDK::Domain::Payout::FindPayoutsResponse}
|
31
|
+
# Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
|
32
|
+
# Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
|
33
|
+
# Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
|
34
|
+
# Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
|
35
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
36
|
+
# Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the Ingenico ePayments platform,
|
37
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
38
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
39
|
+
# Raises:: {Ingenico::Connect::SDK::ApiException} if the Ingenico ePayments platform returned any other error
|
40
|
+
def find(query, context=nil)
|
41
|
+
uri = instantiate_uri('/{apiVersion}/{merchantId}/payouts', nil)
|
42
|
+
return @communicator.get(
|
43
|
+
uri,
|
44
|
+
client_headers,
|
45
|
+
query,
|
46
|
+
Ingenico::Connect::SDK::Domain::Payout::FindPayoutsResponse,
|
47
|
+
context)
|
48
|
+
rescue ResponseException => e
|
49
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
50
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
51
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
52
|
+
end
|
53
|
+
|
24
54
|
# Resource /{{merchantId}}/payouts
|
25
55
|
#
|
26
56
|
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payouts/create.html Create payout}
|
@@ -0,0 +1,38 @@
|
|
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/param_request'
|
6
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Merchant
|
9
|
+
module Refunds
|
10
|
+
|
11
|
+
# Query parameters for {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/refunds/find.html Find refunds}
|
12
|
+
class FindRefundsParams < Ingenico::Connect::SDK::ParamRequest
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :merchant_reference
|
16
|
+
|
17
|
+
# Integer
|
18
|
+
attr_accessor :merchant_order_id
|
19
|
+
|
20
|
+
# Integer
|
21
|
+
attr_accessor :offset
|
22
|
+
|
23
|
+
# Integer
|
24
|
+
attr_accessor :limit
|
25
|
+
|
26
|
+
# Returns an Array of {Ingenico::Connect::SDK::RequestParam} objects representing the attributes of this class
|
27
|
+
def to_request_parameters
|
28
|
+
result = []
|
29
|
+
add_parameter(result, 'merchantReference', @merchant_reference)
|
30
|
+
add_parameter(result, 'merchantOrderId', @merchant_order_id)
|
31
|
+
add_parameter(result, 'offset', @offset)
|
32
|
+
add_parameter(result, 'limit', @limit)
|
33
|
+
result
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'ingenico/connect/sdk/api_resource'
|
6
6
|
require 'ingenico/connect/sdk/response_exception'
|
7
7
|
require 'ingenico/connect/sdk/domain/errors/error_response'
|
8
|
+
require 'ingenico/connect/sdk/domain/refund/find_refunds_response'
|
8
9
|
require 'ingenico/connect/sdk/domain/refund/refund_response'
|
9
10
|
|
10
11
|
module Ingenico::Connect::SDK
|
@@ -20,6 +21,35 @@ module Ingenico::Connect::SDK
|
|
20
21
|
super(parent, path_context)
|
21
22
|
end
|
22
23
|
|
24
|
+
# Resource /{{merchantId}}/refunds
|
25
|
+
#
|
26
|
+
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/refunds/find.html Find refunds}
|
27
|
+
# query:: {Ingenico::Connect::SDK::Merchant::Refunds::FindRefundsParams}
|
28
|
+
# context:: {Ingenico::Connect::SDK::CallContext}
|
29
|
+
# Returns:: {Ingenico::Connect::SDK::Domain::Refund::FindRefundsResponse}
|
30
|
+
# Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
|
31
|
+
# Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
|
32
|
+
# Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
|
33
|
+
# Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
|
34
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
35
|
+
# Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the Ingenico ePayments platform,
|
36
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
37
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
38
|
+
# Raises:: {Ingenico::Connect::SDK::ApiException} if the Ingenico ePayments platform returned any other error
|
39
|
+
def find(query, context=nil)
|
40
|
+
uri = instantiate_uri('/{apiVersion}/{merchantId}/refunds', nil)
|
41
|
+
return @communicator.get(
|
42
|
+
uri,
|
43
|
+
client_headers,
|
44
|
+
query,
|
45
|
+
Ingenico::Connect::SDK::Domain::Refund::FindRefundsResponse,
|
46
|
+
context)
|
47
|
+
rescue ResponseException => e
|
48
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
49
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
50
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
51
|
+
end
|
52
|
+
|
23
53
|
# Resource /{{merchantId}}/refunds/{{refundId}}
|
24
54
|
#
|
25
55
|
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/refunds/get.html Get refund}
|
@@ -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.10.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.10.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: 2017-09-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -131,6 +131,7 @@ files:
|
|
131
131
|
- examples/merchant/payments/capture_payment_example.rb
|
132
132
|
- examples/merchant/payments/complete_payment_example.rb
|
133
133
|
- examples/merchant/payments/create_payment_example.rb
|
134
|
+
- examples/merchant/payments/find_payments_example.rb
|
134
135
|
- examples/merchant/payments/get_payment_captures_example.rb
|
135
136
|
- examples/merchant/payments/get_payment_example.rb
|
136
137
|
- examples/merchant/payments/get_third_party_status_example.rb
|
@@ -141,6 +142,7 @@ files:
|
|
141
142
|
- examples/merchant/payouts/cancel_approval_payout_example.rb
|
142
143
|
- examples/merchant/payouts/cancel_payout_example.rb
|
143
144
|
- examples/merchant/payouts/create_payout_example.rb
|
145
|
+
- examples/merchant/payouts/find_payouts_example.rb
|
144
146
|
- examples/merchant/payouts/get_payout_example.rb
|
145
147
|
- examples/merchant/productgroups/get_payment_product_group_example.rb
|
146
148
|
- examples/merchant/productgroups/get_payment_product_groups_example.rb
|
@@ -152,6 +154,7 @@ files:
|
|
152
154
|
- examples/merchant/refunds/approve_refund_example.rb
|
153
155
|
- examples/merchant/refunds/cancel_approval_refund_example.rb
|
154
156
|
- examples/merchant/refunds/cancel_refund_example.rb
|
157
|
+
- examples/merchant/refunds/find_refunds_example.rb
|
155
158
|
- examples/merchant/refunds/get_refund_example.rb
|
156
159
|
- examples/merchant/riskassessments/risk_assessment_bank_account_example.rb
|
157
160
|
- examples/merchant/riskassessments/risk_assessment_cards_example.rb
|
@@ -267,6 +270,7 @@ files:
|
|
267
270
|
- lib/ingenico/connect/sdk/domain/payment/customer.rb
|
268
271
|
- lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb
|
269
272
|
- lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb
|
273
|
+
- lib/ingenico/connect/sdk/domain/payment/find_payments_response.rb
|
270
274
|
- lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_input.rb
|
271
275
|
- lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_output.rb
|
272
276
|
- lib/ingenico/connect/sdk/domain/payment/level3_summary_data.rb
|
@@ -331,6 +335,7 @@ files:
|
|
331
335
|
- lib/ingenico/connect/sdk/domain/payout/bank_transfer_payout_method_specific_input.rb
|
332
336
|
- lib/ingenico/connect/sdk/domain/payout/card_payout_method_specific_input.rb
|
333
337
|
- lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb
|
338
|
+
- lib/ingenico/connect/sdk/domain/payout/find_payouts_response.rb
|
334
339
|
- lib/ingenico/connect/sdk/domain/payout/payout_customer.rb
|
335
340
|
- lib/ingenico/connect/sdk/domain/payout/payout_error_response.rb
|
336
341
|
- lib/ingenico/connect/sdk/domain/payout/payout_references.rb
|
@@ -369,6 +374,7 @@ files:
|
|
369
374
|
- lib/ingenico/connect/sdk/domain/refund/approve_refund_request.rb
|
370
375
|
- lib/ingenico/connect/sdk/domain/refund/bank_account_bban_refund.rb
|
371
376
|
- lib/ingenico/connect/sdk/domain/refund/bank_refund_method_specific_input.rb
|
377
|
+
- lib/ingenico/connect/sdk/domain/refund/find_refunds_response.rb
|
372
378
|
- lib/ingenico/connect/sdk/domain/refund/refund_customer.rb
|
373
379
|
- lib/ingenico/connect/sdk/domain/refund/refund_error_response.rb
|
374
380
|
- lib/ingenico/connect/sdk/domain/refund/refund_references.rb
|
@@ -442,7 +448,9 @@ files:
|
|
442
448
|
- lib/ingenico/connect/sdk/merchant/captures/captures_client.rb
|
443
449
|
- lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb
|
444
450
|
- lib/ingenico/connect/sdk/merchant/merchant_client.rb
|
451
|
+
- lib/ingenico/connect/sdk/merchant/payments/find_payments_params.rb
|
445
452
|
- lib/ingenico/connect/sdk/merchant/payments/payments_client.rb
|
453
|
+
- lib/ingenico/connect/sdk/merchant/payouts/find_payouts_params.rb
|
446
454
|
- lib/ingenico/connect/sdk/merchant/payouts/payouts_client.rb
|
447
455
|
- lib/ingenico/connect/sdk/merchant/productgroups/find_productgroups_params.rb
|
448
456
|
- lib/ingenico/connect/sdk/merchant/productgroups/get_productgroup_params.rb
|
@@ -452,6 +460,7 @@ files:
|
|
452
460
|
- lib/ingenico/connect/sdk/merchant/products/get_product_params.rb
|
453
461
|
- lib/ingenico/connect/sdk/merchant/products/networks_params.rb
|
454
462
|
- lib/ingenico/connect/sdk/merchant/products/products_client.rb
|
463
|
+
- lib/ingenico/connect/sdk/merchant/refunds/find_refunds_params.rb
|
455
464
|
- lib/ingenico/connect/sdk/merchant/refunds/refunds_client.rb
|
456
465
|
- lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb
|
457
466
|
- lib/ingenico/connect/sdk/merchant/services/convert_amount_params.rb
|