connect-sdk-ruby 1.21.0 → 1.22.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/hostedcheckouts/create_hosted_checkout_example.rb +1 -0
- data/examples/merchant/hostedmandatemanagements/create_hosted_mandate_management_example.rb +40 -0
- data/examples/merchant/hostedmandatemanagements/get_hosted_mandate_management_example.rb +22 -0
- data/examples/merchant/payments/create_payment_example.rb +1 -1
- data/lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_request.rb +46 -0
- data/lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_response.rb +45 -0
- data/lib/ingenico/connect/sdk/domain/hostedmandatemanagement/get_hosted_mandate_management_response.rb +42 -0
- data/lib/ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_info.rb +70 -0
- data/lib/ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_management_specific_input.rb +52 -0
- data/lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb +88 -0
- data/lib/ingenico/connect/sdk/merchant/merchant_client.rb +9 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/lib/ingenico/connect/sdk/modules.rb +10 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842ad98aeb38bf84bf8d98cb729ef376dc348c550d87ac6761665ff4a8dc112b
|
4
|
+
data.tar.gz: 9cdcb0612d726f67703a89af0531849b2244e9629d5d86f58b317cfdf0a894ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c506fa4b3a7b861b5cb058f1b1cd1a826624bad69048e238871af54023619fec4d3cc5c26bcc085b38bf7cdf89cb195dad9f5b43c6ab1860004e37bf1a0371
|
7
|
+
data.tar.gz: 5732708f4833696a1272421991f6afc27a64dd4860fac899dfed6946fd5af9b4f06f6f239efa529d85ae8f87fb1f2cfd4f9f995d7c56bccc55067b37903a02f2
|
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.22.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,40 @@
|
|
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/domain/hostedmandatemanagement/create_hosted_mandate_management_request'
|
7
|
+
require 'ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_info'
|
8
|
+
require 'ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_management_specific_input'
|
9
|
+
|
10
|
+
Hostedmandatemanagement = Ingenico::Connect::SDK::Domain::Hostedmandatemanagement
|
11
|
+
|
12
|
+
def example
|
13
|
+
get_client do |client|
|
14
|
+
create_mandate_info = Hostedmandatemanagement::HostedMandateInfo.new
|
15
|
+
create_mandate_info.customer_reference = 'idonthaveareference'
|
16
|
+
create_mandate_info.recurrence_type = 'RECURRING'
|
17
|
+
create_mandate_info.signature_type = 'UNSIGNED'
|
18
|
+
|
19
|
+
hosted_mandate_management_specific_input = Hostedmandatemanagement::HostedMandateManagementSpecificInput.new
|
20
|
+
hosted_mandate_management_specific_input.locale = 'fr_FR'
|
21
|
+
hosted_mandate_management_specific_input.return_url = 'http://www.example.com'
|
22
|
+
hosted_mandate_management_specific_input.variant = '101'
|
23
|
+
|
24
|
+
body = Hostedmandatemanagement::CreateHostedMandateManagementRequest.new
|
25
|
+
body.create_mandate_info = create_mandate_info
|
26
|
+
body.hosted_mandate_management_specific_input = hosted_mandate_management_specific_input
|
27
|
+
|
28
|
+
response = client.merchant('merchantId').hostedmandatemanagements().create(body)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def get_client
|
33
|
+
api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
|
34
|
+
secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
|
35
|
+
configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
|
36
|
+
yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
|
37
|
+
ensure
|
38
|
+
# Free networking resources when done
|
39
|
+
client.close unless client.nil?
|
40
|
+
end
|
@@ -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').hostedmandatemanagements().get('hostedMandateManagementId')
|
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
|
@@ -69,7 +69,7 @@ def example
|
|
69
69
|
|
70
70
|
personal_information = Payment::PersonalInformation.new
|
71
71
|
personal_information.date_of_birth = '19490917'
|
72
|
-
personal_information.gender = '
|
72
|
+
personal_information.gender = 'male'
|
73
73
|
personal_information.name = name
|
74
74
|
|
75
75
|
shipping_name = Payment::PersonalName.new
|
@@ -0,0 +1,46 @@
|
|
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/hostedmandatemanagement/hosted_mandate_info'
|
7
|
+
require 'ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_management_specific_input'
|
8
|
+
|
9
|
+
module Ingenico::Connect::SDK
|
10
|
+
module Domain
|
11
|
+
module Hostedmandatemanagement
|
12
|
+
|
13
|
+
class CreateHostedMandateManagementRequest < Ingenico::Connect::SDK::DataObject
|
14
|
+
|
15
|
+
# {Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::HostedMandateInfo}
|
16
|
+
attr_accessor :create_mandate_info
|
17
|
+
|
18
|
+
# {Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::HostedMandateManagementSpecificInput}
|
19
|
+
attr_accessor :hosted_mandate_management_specific_input
|
20
|
+
|
21
|
+
def to_h
|
22
|
+
hash = super
|
23
|
+
add_to_hash(hash, 'createMandateInfo', @create_mandate_info)
|
24
|
+
add_to_hash(hash, 'hostedMandateManagementSpecificInput', @hosted_mandate_management_specific_input)
|
25
|
+
hash
|
26
|
+
end
|
27
|
+
|
28
|
+
def from_hash(hash)
|
29
|
+
super
|
30
|
+
if hash.has_key?('createMandateInfo')
|
31
|
+
if !(hash['createMandateInfo'].is_a? Hash)
|
32
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['createMandateInfo']]
|
33
|
+
end
|
34
|
+
@create_mandate_info = Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::HostedMandateInfo.new_from_hash(hash['createMandateInfo'])
|
35
|
+
end
|
36
|
+
if hash.has_key?('hostedMandateManagementSpecificInput')
|
37
|
+
if !(hash['hostedMandateManagementSpecificInput'].is_a? Hash)
|
38
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['hostedMandateManagementSpecificInput']]
|
39
|
+
end
|
40
|
+
@hosted_mandate_management_specific_input = Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::HostedMandateManagementSpecificInput.new_from_hash(hash['hostedMandateManagementSpecificInput'])
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,45 @@
|
|
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
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Hostedmandatemanagement
|
10
|
+
|
11
|
+
class CreateHostedMandateManagementResponse < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :returnmac
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :hosted_mandate_management_id
|
18
|
+
|
19
|
+
# String
|
20
|
+
attr_accessor :partial_redirect_url
|
21
|
+
|
22
|
+
def to_h
|
23
|
+
hash = super
|
24
|
+
add_to_hash(hash, 'RETURNMAC', @returnmac)
|
25
|
+
add_to_hash(hash, 'hostedMandateManagementId', @hosted_mandate_management_id)
|
26
|
+
add_to_hash(hash, 'partialRedirectUrl', @partial_redirect_url)
|
27
|
+
hash
|
28
|
+
end
|
29
|
+
|
30
|
+
def from_hash(hash)
|
31
|
+
super
|
32
|
+
if hash.has_key?('RETURNMAC')
|
33
|
+
@returnmac = hash['RETURNMAC']
|
34
|
+
end
|
35
|
+
if hash.has_key?('hostedMandateManagementId')
|
36
|
+
@hosted_mandate_management_id = hash['hostedMandateManagementId']
|
37
|
+
end
|
38
|
+
if hash.has_key?('partialRedirectUrl')
|
39
|
+
@partial_redirect_url = hash['partialRedirectUrl']
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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/mandates/mandate_response'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Hostedmandatemanagement
|
11
|
+
|
12
|
+
class GetHostedMandateManagementResponse < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# {Ingenico::Connect::SDK::Domain::Mandates::MandateResponse}
|
15
|
+
attr_accessor :mandate
|
16
|
+
|
17
|
+
# String
|
18
|
+
attr_accessor :status
|
19
|
+
|
20
|
+
def to_h
|
21
|
+
hash = super
|
22
|
+
add_to_hash(hash, 'mandate', @mandate)
|
23
|
+
add_to_hash(hash, 'status', @status)
|
24
|
+
hash
|
25
|
+
end
|
26
|
+
|
27
|
+
def from_hash(hash)
|
28
|
+
super
|
29
|
+
if hash.has_key?('mandate')
|
30
|
+
if !(hash['mandate'].is_a? Hash)
|
31
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['mandate']]
|
32
|
+
end
|
33
|
+
@mandate = Ingenico::Connect::SDK::Domain::Mandates::MandateResponse.new_from_hash(hash['mandate'])
|
34
|
+
end
|
35
|
+
if hash.has_key?('status')
|
36
|
+
@status = hash['status']
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,70 @@
|
|
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/mandates/mandate_customer'
|
7
|
+
|
8
|
+
module Ingenico::Connect::SDK
|
9
|
+
module Domain
|
10
|
+
module Hostedmandatemanagement
|
11
|
+
|
12
|
+
class HostedMandateInfo < Ingenico::Connect::SDK::DataObject
|
13
|
+
|
14
|
+
# String
|
15
|
+
attr_accessor :alias
|
16
|
+
|
17
|
+
# {Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer}
|
18
|
+
attr_accessor :customer
|
19
|
+
|
20
|
+
# String
|
21
|
+
attr_accessor :customer_reference
|
22
|
+
|
23
|
+
# String
|
24
|
+
attr_accessor :recurrence_type
|
25
|
+
|
26
|
+
# String
|
27
|
+
attr_accessor :signature_type
|
28
|
+
|
29
|
+
# String
|
30
|
+
attr_accessor :unique_mandate_reference
|
31
|
+
|
32
|
+
def to_h
|
33
|
+
hash = super
|
34
|
+
add_to_hash(hash, 'alias', @alias)
|
35
|
+
add_to_hash(hash, 'customer', @customer)
|
36
|
+
add_to_hash(hash, 'customerReference', @customer_reference)
|
37
|
+
add_to_hash(hash, 'recurrenceType', @recurrence_type)
|
38
|
+
add_to_hash(hash, 'signatureType', @signature_type)
|
39
|
+
add_to_hash(hash, 'uniqueMandateReference', @unique_mandate_reference)
|
40
|
+
hash
|
41
|
+
end
|
42
|
+
|
43
|
+
def from_hash(hash)
|
44
|
+
super
|
45
|
+
if hash.has_key?('alias')
|
46
|
+
@alias = hash['alias']
|
47
|
+
end
|
48
|
+
if hash.has_key?('customer')
|
49
|
+
if !(hash['customer'].is_a? Hash)
|
50
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['customer']]
|
51
|
+
end
|
52
|
+
@customer = Ingenico::Connect::SDK::Domain::Mandates::MandateCustomer.new_from_hash(hash['customer'])
|
53
|
+
end
|
54
|
+
if hash.has_key?('customerReference')
|
55
|
+
@customer_reference = hash['customerReference']
|
56
|
+
end
|
57
|
+
if hash.has_key?('recurrenceType')
|
58
|
+
@recurrence_type = hash['recurrenceType']
|
59
|
+
end
|
60
|
+
if hash.has_key?('signatureType')
|
61
|
+
@signature_type = hash['signatureType']
|
62
|
+
end
|
63
|
+
if hash.has_key?('uniqueMandateReference')
|
64
|
+
@unique_mandate_reference = hash['uniqueMandateReference']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,52 @@
|
|
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
|
+
|
7
|
+
module Ingenico::Connect::SDK
|
8
|
+
module Domain
|
9
|
+
module Hostedmandatemanagement
|
10
|
+
|
11
|
+
class HostedMandateManagementSpecificInput < Ingenico::Connect::SDK::DataObject
|
12
|
+
|
13
|
+
# String
|
14
|
+
attr_accessor :locale
|
15
|
+
|
16
|
+
# String
|
17
|
+
attr_accessor :return_url
|
18
|
+
|
19
|
+
# true/false
|
20
|
+
attr_accessor :show_result_page
|
21
|
+
|
22
|
+
# String
|
23
|
+
attr_accessor :variant
|
24
|
+
|
25
|
+
def to_h
|
26
|
+
hash = super
|
27
|
+
add_to_hash(hash, 'locale', @locale)
|
28
|
+
add_to_hash(hash, 'returnUrl', @return_url)
|
29
|
+
add_to_hash(hash, 'showResultPage', @show_result_page)
|
30
|
+
add_to_hash(hash, 'variant', @variant)
|
31
|
+
hash
|
32
|
+
end
|
33
|
+
|
34
|
+
def from_hash(hash)
|
35
|
+
super
|
36
|
+
if hash.has_key?('locale')
|
37
|
+
@locale = hash['locale']
|
38
|
+
end
|
39
|
+
if hash.has_key?('returnUrl')
|
40
|
+
@return_url = hash['returnUrl']
|
41
|
+
end
|
42
|
+
if hash.has_key?('showResultPage')
|
43
|
+
@show_result_page = hash['showResultPage']
|
44
|
+
end
|
45
|
+
if hash.has_key?('variant')
|
46
|
+
@variant = hash['variant']
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb
ADDED
@@ -0,0 +1,88 @@
|
|
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/api_resource'
|
6
|
+
require 'ingenico/connect/sdk/response_exception'
|
7
|
+
require 'ingenico/connect/sdk/domain/errors/error_response'
|
8
|
+
require 'ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_response'
|
9
|
+
require 'ingenico/connect/sdk/domain/hostedmandatemanagement/get_hosted_mandate_management_response'
|
10
|
+
|
11
|
+
module Ingenico::Connect::SDK
|
12
|
+
module Merchant
|
13
|
+
module Hostedmandatemanagements
|
14
|
+
|
15
|
+
# Hostedmandatemanagements client. Thread-safe.
|
16
|
+
class HostedmandatemanagementsClient < Ingenico::Connect::SDK::ApiResource
|
17
|
+
|
18
|
+
# parent:: {Ingenico::Connect::SDK::ApiResource}
|
19
|
+
# path_context:: Hash of String to String
|
20
|
+
def initialize(parent, path_context)
|
21
|
+
super(parent, path_context)
|
22
|
+
end
|
23
|
+
|
24
|
+
# Resource /{{merchantId}}/hostedmandatemanagements
|
25
|
+
#
|
26
|
+
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/hostedmandatemanagements/create.html Create hosted mandate management}
|
27
|
+
# body:: {Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::CreateHostedMandateManagementRequest}
|
28
|
+
# context:: {Ingenico::Connect::SDK::CallContext}
|
29
|
+
# Returns:: {Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::CreateHostedMandateManagementResponse}
|
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 create(body, context=nil)
|
40
|
+
uri = instantiate_uri('/{apiVersion}/{merchantId}/hostedmandatemanagements', nil)
|
41
|
+
return @communicator.post(
|
42
|
+
uri,
|
43
|
+
client_headers,
|
44
|
+
nil,
|
45
|
+
body,
|
46
|
+
Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::CreateHostedMandateManagementResponse,
|
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
|
+
|
54
|
+
# Resource /{{merchantId}}/hostedmandatemanagements/{{hostedMandateManagementId}}
|
55
|
+
#
|
56
|
+
# {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/hostedmandatemanagements/get.html Get hosted mandate management status}
|
57
|
+
# hosted_mandate_management_id:: String
|
58
|
+
# context:: {Ingenico::Connect::SDK::CallContext}
|
59
|
+
# Returns:: {Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::GetHostedMandateManagementResponse}
|
60
|
+
# Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
|
61
|
+
# Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
|
62
|
+
# Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
|
63
|
+
# Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
|
64
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
65
|
+
# Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the Ingenico ePayments platform,
|
66
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
67
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
68
|
+
# Raises:: {Ingenico::Connect::SDK::ApiException} if the Ingenico ePayments platform returned any other error
|
69
|
+
def get(hosted_mandate_management_id, context=nil)
|
70
|
+
path_context = {
|
71
|
+
'hostedMandateManagementId' => hosted_mandate_management_id,
|
72
|
+
}
|
73
|
+
uri = instantiate_uri('/{apiVersion}/{merchantId}/hostedmandatemanagements/{hostedMandateManagementId}', path_context)
|
74
|
+
return @communicator.get(
|
75
|
+
uri,
|
76
|
+
client_headers,
|
77
|
+
nil,
|
78
|
+
Ingenico::Connect::SDK::Domain::Hostedmandatemanagement::GetHostedMandateManagementResponse,
|
79
|
+
context)
|
80
|
+
rescue ResponseException => e
|
81
|
+
error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
|
82
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
83
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'ingenico/connect/sdk/api_resource'
|
6
6
|
require 'ingenico/connect/sdk/merchant/captures/captures_client'
|
7
7
|
require 'ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client'
|
8
|
+
require 'ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client'
|
8
9
|
require 'ingenico/connect/sdk/merchant/mandates/mandates_client'
|
9
10
|
require 'ingenico/connect/sdk/merchant/payments/payments_client'
|
10
11
|
require 'ingenico/connect/sdk/merchant/payouts/payouts_client'
|
@@ -36,6 +37,14 @@ module Ingenico::Connect::SDK
|
|
36
37
|
Ingenico::Connect::SDK::Merchant::Hostedcheckouts::HostedcheckoutsClient.new(self, nil)
|
37
38
|
end
|
38
39
|
|
40
|
+
# Resource /{{merchantId}}/hostedmandatemanagements
|
41
|
+
#
|
42
|
+
# Create new hosted mandate management
|
43
|
+
# Returns:: {Ingenico::Connect::SDK::Merchant::Hostedmandatemanagements::HostedmandatemanagementsClient}
|
44
|
+
def hostedmandatemanagements
|
45
|
+
Ingenico::Connect::SDK::Merchant::Hostedmandatemanagements::HostedmandatemanagementsClient.new(self, nil)
|
46
|
+
end
|
47
|
+
|
39
48
|
# Resource /{{merchantId}}/payments
|
40
49
|
#
|
41
50
|
# Create, cancel and approve payments
|
@@ -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.22.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
|
@@ -31,6 +31,16 @@ end
|
|
31
31
|
module Ingenico::Connect::SDK::Domain::Hostedcheckout
|
32
32
|
end
|
33
33
|
|
34
|
+
# Contains the client used to access the HostedMandateManagements service.
|
35
|
+
# @see https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/hostedmandatemanagements/
|
36
|
+
module Ingenico::Connect::SDK::Merchant::Hostedmandatemanagements
|
37
|
+
end
|
38
|
+
|
39
|
+
# Contains data classes that are used in the HostedMandateManagements service.
|
40
|
+
# @see https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/hostedmandatemanagements/
|
41
|
+
module Ingenico::Connect::SDK::Domain::Hostedmandatemanagement
|
42
|
+
end
|
43
|
+
|
34
44
|
# Contains the client used to access the payment service.
|
35
45
|
# @see https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/payments/
|
36
46
|
module Ingenico::Connect::SDK::Merchant::Payments
|
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.22.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: 2018-
|
11
|
+
date: 2018-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -125,6 +125,8 @@ files:
|
|
125
125
|
- examples/merchant/example_configuration.yml
|
126
126
|
- examples/merchant/hostedcheckouts/create_hosted_checkout_example.rb
|
127
127
|
- examples/merchant/hostedcheckouts/get_hosted_checkout_example.rb
|
128
|
+
- examples/merchant/hostedmandatemanagements/create_hosted_mandate_management_example.rb
|
129
|
+
- examples/merchant/hostedmandatemanagements/get_hosted_mandate_management_example.rb
|
128
130
|
- examples/merchant/mandates/block_mandate_example.rb
|
129
131
|
- examples/merchant/mandates/create_mandate_example.rb
|
130
132
|
- examples/merchant/mandates/create_mandate_with_reference_example.rb
|
@@ -242,6 +244,11 @@ files:
|
|
242
244
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/get_hosted_checkout_response.rb
|
243
245
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/hosted_checkout_specific_input.rb
|
244
246
|
- lib/ingenico/connect/sdk/domain/hostedcheckout/payment_product_filters_hosted_checkout.rb
|
247
|
+
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_request.rb
|
248
|
+
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/create_hosted_mandate_management_response.rb
|
249
|
+
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/get_hosted_mandate_management_response.rb
|
250
|
+
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_info.rb
|
251
|
+
- lib/ingenico/connect/sdk/domain/hostedmandatemanagement/hosted_mandate_management_specific_input.rb
|
245
252
|
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_base.rb
|
246
253
|
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_request.rb
|
247
254
|
- lib/ingenico/connect/sdk/domain/mandates/create_mandate_response.rb
|
@@ -492,6 +499,7 @@ files:
|
|
492
499
|
- lib/ingenico/connect/sdk/marshaller_syntax_exception.rb
|
493
500
|
- lib/ingenico/connect/sdk/merchant/captures/captures_client.rb
|
494
501
|
- lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb
|
502
|
+
- lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb
|
495
503
|
- lib/ingenico/connect/sdk/merchant/mandates/mandates_client.rb
|
496
504
|
- lib/ingenico/connect/sdk/merchant/merchant_client.rb
|
497
505
|
- lib/ingenico/connect/sdk/merchant/payments/find_payments_params.rb
|