direct-sdk-ruby 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/direct-sdk-ruby.gemspec +1 -1
- data/lib/ingenico/direct/sdk/domain/additional_order_input.rb +8 -0
- data/lib/ingenico/direct/sdk/domain/capture_payment_request.rb +8 -0
- data/lib/ingenico/direct/sdk/domain/lodging_data.rb +27 -0
- data/lib/ingenico/direct/sdk/domain/operation_output.rb +59 -0
- data/lib/ingenico/direct/sdk/domain/payment_details_response.rb +66 -0
- data/lib/ingenico/direct/sdk/domain/payment_product.rb +10 -0
- data/lib/ingenico/direct/sdk/domain/payment_product_group.rb +10 -0
- data/lib/ingenico/direct/sdk/domain/refund_request.rb +8 -0
- data/lib/ingenico/direct/sdk/merchant/payments/payments_client.rb +32 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 594e388fe35c2f7bce9555afebbdcfb98592d38cdc1e8e222c67f6e317b93a39
|
4
|
+
data.tar.gz: 9f8c21041bc2d15544d78ea1b1854800ef2e41844d279aecc64eebb98ab66cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23d335ce41710fd0f5a9fefb482a13267faf1a032e637ad4208b9240cb6af79bb2c59db91712c416aa51717088a0086c753c48d52eb8aba992ee3b727cb5fa21
|
7
|
+
data.tar.gz: ed450311f7a896048342b4dd705e9537162ab46541bc7435db27d369362fdb9e429693299ee4aa3de66247cbee6af0d6bd9b1bdbf3a435613a693268587c1685
|
data/direct-sdk-ruby.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'direct-sdk-ruby'
|
3
|
-
spec.version = '1.
|
3
|
+
spec.version = '1.5.0'
|
4
4
|
spec.authors = ['Ingenico ePayments']
|
5
5
|
spec.email = ['60233882+ingenico-dev-team@users.noreply.github.com']
|
6
6
|
spec.summary = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Direct Server API}
|
@@ -5,6 +5,7 @@
|
|
5
5
|
require 'ingenico/direct/sdk/data_object'
|
6
6
|
require 'ingenico/direct/sdk/domain/airline_data'
|
7
7
|
require 'ingenico/direct/sdk/domain/loan_recipient'
|
8
|
+
require 'ingenico/direct/sdk/domain/lodging_data'
|
8
9
|
require 'ingenico/direct/sdk/domain/order_type_information'
|
9
10
|
|
10
11
|
module Ingenico::Direct::SDK
|
@@ -12,10 +13,12 @@ module Ingenico::Direct::SDK
|
|
12
13
|
|
13
14
|
# @attr [Ingenico::Direct::SDK::Domain::AirlineData] airline_data
|
14
15
|
# @attr [Ingenico::Direct::SDK::Domain::LoanRecipient] loan_recipient
|
16
|
+
# @attr [Ingenico::Direct::SDK::Domain::LodgingData] lodging_data
|
15
17
|
# @attr [Ingenico::Direct::SDK::Domain::OrderTypeInformation] type_information
|
16
18
|
class AdditionalOrderInput < Ingenico::Direct::SDK::DataObject
|
17
19
|
attr_accessor :airline_data
|
18
20
|
attr_accessor :loan_recipient
|
21
|
+
attr_accessor :lodging_data
|
19
22
|
attr_accessor :type_information
|
20
23
|
|
21
24
|
# @return (Hash)
|
@@ -23,6 +26,7 @@ module Ingenico::Direct::SDK
|
|
23
26
|
hash = super
|
24
27
|
hash['airlineData'] = @airline_data.to_h if @airline_data
|
25
28
|
hash['loanRecipient'] = @loan_recipient.to_h if @loan_recipient
|
29
|
+
hash['lodgingData'] = @lodging_data.to_h if @lodging_data
|
26
30
|
hash['typeInformation'] = @type_information.to_h if @type_information
|
27
31
|
hash
|
28
32
|
end
|
@@ -37,6 +41,10 @@ module Ingenico::Direct::SDK
|
|
37
41
|
raise TypeError, "value '%s' is not a Hash" % [hash['loanRecipient']] unless hash['loanRecipient'].is_a? Hash
|
38
42
|
@loan_recipient = Ingenico::Direct::SDK::Domain::LoanRecipient.new_from_hash(hash['loanRecipient'])
|
39
43
|
end
|
44
|
+
if hash.key? 'lodgingData'
|
45
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['lodgingData']] unless hash['lodgingData'].is_a? Hash
|
46
|
+
@lodging_data = Ingenico::Direct::SDK::Domain::LodgingData.new_from_hash(hash['lodgingData'])
|
47
|
+
end
|
40
48
|
if hash.key? 'typeInformation'
|
41
49
|
raise TypeError, "value '%s' is not a Hash" % [hash['typeInformation']] unless hash['typeInformation'].is_a? Hash
|
42
50
|
@type_information = Ingenico::Direct::SDK::Domain::OrderTypeInformation.new_from_hash(hash['typeInformation'])
|
@@ -3,21 +3,25 @@
|
|
3
3
|
# https://support.direct.ingenico.com/documentation/api/reference/
|
4
4
|
#
|
5
5
|
require 'ingenico/direct/sdk/data_object'
|
6
|
+
require 'ingenico/direct/sdk/domain/payment_references'
|
6
7
|
|
7
8
|
module Ingenico::Direct::SDK
|
8
9
|
module Domain
|
9
10
|
|
10
11
|
# @attr [Long] amount
|
11
12
|
# @attr [true/false] is_final
|
13
|
+
# @attr [Ingenico::Direct::SDK::Domain::PaymentReferences] references
|
12
14
|
class CapturePaymentRequest < Ingenico::Direct::SDK::DataObject
|
13
15
|
attr_accessor :amount
|
14
16
|
attr_accessor :is_final
|
17
|
+
attr_accessor :references
|
15
18
|
|
16
19
|
# @return (Hash)
|
17
20
|
def to_h
|
18
21
|
hash = super
|
19
22
|
hash['amount'] = @amount unless @amount.nil?
|
20
23
|
hash['isFinal'] = @is_final unless @is_final.nil?
|
24
|
+
hash['references'] = @references.to_h if @references
|
21
25
|
hash
|
22
26
|
end
|
23
27
|
|
@@ -25,6 +29,10 @@ module Ingenico::Direct::SDK
|
|
25
29
|
super
|
26
30
|
@amount = hash['amount'] if hash.key? 'amount'
|
27
31
|
@is_final = hash['isFinal'] if hash.key? 'isFinal'
|
32
|
+
if hash.key? 'references'
|
33
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
|
34
|
+
@references = Ingenico::Direct::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
|
35
|
+
end
|
28
36
|
end
|
29
37
|
end
|
30
38
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
4
|
+
#
|
5
|
+
require 'ingenico/direct/sdk/data_object'
|
6
|
+
|
7
|
+
module Ingenico::Direct::SDK
|
8
|
+
module Domain
|
9
|
+
|
10
|
+
# @attr [String] check_in_date
|
11
|
+
class LodgingData < Ingenico::Direct::SDK::DataObject
|
12
|
+
attr_accessor :check_in_date
|
13
|
+
|
14
|
+
# @return (Hash)
|
15
|
+
def to_h
|
16
|
+
hash = super
|
17
|
+
hash['checkInDate'] = @check_in_date unless @check_in_date.nil?
|
18
|
+
hash
|
19
|
+
end
|
20
|
+
|
21
|
+
def from_hash(hash)
|
22
|
+
super
|
23
|
+
@check_in_date = hash['checkInDate'] if hash.key? 'checkInDate'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
4
|
+
#
|
5
|
+
require 'ingenico/direct/sdk/data_object'
|
6
|
+
require 'ingenico/direct/sdk/domain/amount_of_money'
|
7
|
+
require 'ingenico/direct/sdk/domain/payment_references'
|
8
|
+
require 'ingenico/direct/sdk/domain/payment_status_output'
|
9
|
+
|
10
|
+
module Ingenico::Direct::SDK
|
11
|
+
module Domain
|
12
|
+
|
13
|
+
# @attr [Ingenico::Direct::SDK::Domain::AmountOfMoney] amount_of_money
|
14
|
+
# @attr [String] id
|
15
|
+
# @attr [String] payment_method
|
16
|
+
# @attr [Ingenico::Direct::SDK::Domain::PaymentReferences] references
|
17
|
+
# @attr [String] status
|
18
|
+
# @attr [Ingenico::Direct::SDK::Domain::PaymentStatusOutput] status_output
|
19
|
+
class OperationOutput < Ingenico::Direct::SDK::DataObject
|
20
|
+
attr_accessor :amount_of_money
|
21
|
+
attr_accessor :id
|
22
|
+
attr_accessor :payment_method
|
23
|
+
attr_accessor :references
|
24
|
+
attr_accessor :status
|
25
|
+
attr_accessor :status_output
|
26
|
+
|
27
|
+
# @return (Hash)
|
28
|
+
def to_h
|
29
|
+
hash = super
|
30
|
+
hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
|
31
|
+
hash['id'] = @id unless @id.nil?
|
32
|
+
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
33
|
+
hash['references'] = @references.to_h if @references
|
34
|
+
hash['status'] = @status unless @status.nil?
|
35
|
+
hash['statusOutput'] = @status_output.to_h if @status_output
|
36
|
+
hash
|
37
|
+
end
|
38
|
+
|
39
|
+
def from_hash(hash)
|
40
|
+
super
|
41
|
+
if hash.key? 'amountOfMoney'
|
42
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
|
43
|
+
@amount_of_money = Ingenico::Direct::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
|
44
|
+
end
|
45
|
+
@id = hash['id'] if hash.key? 'id'
|
46
|
+
@payment_method = hash['paymentMethod'] if hash.key? 'paymentMethod'
|
47
|
+
if hash.key? 'references'
|
48
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
|
49
|
+
@references = Ingenico::Direct::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
|
50
|
+
end
|
51
|
+
@status = hash['status'] if hash.key? 'status'
|
52
|
+
if hash.key? 'statusOutput'
|
53
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
|
54
|
+
@status_output = Ingenico::Direct::SDK::Domain::PaymentStatusOutput.new_from_hash(hash['statusOutput'])
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#
|
2
|
+
# This class was auto-generated from the API references found at
|
3
|
+
# https://support.direct.ingenico.com/documentation/api/reference/
|
4
|
+
#
|
5
|
+
require 'ingenico/direct/sdk/data_object'
|
6
|
+
require 'ingenico/direct/sdk/domain/hosted_checkout_specific_output'
|
7
|
+
require 'ingenico/direct/sdk/domain/operation_output'
|
8
|
+
require 'ingenico/direct/sdk/domain/payment_output'
|
9
|
+
require 'ingenico/direct/sdk/domain/payment_status_output'
|
10
|
+
|
11
|
+
module Ingenico::Direct::SDK
|
12
|
+
module Domain
|
13
|
+
|
14
|
+
# @attr [Array<Ingenico::Direct::SDK::Domain::OperationOutput>] operations
|
15
|
+
# @attr [Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificOutput] hosted_checkout_specific_output
|
16
|
+
# @attr [String] id
|
17
|
+
# @attr [Ingenico::Direct::SDK::Domain::PaymentOutput] payment_output
|
18
|
+
# @attr [String] status
|
19
|
+
# @attr [Ingenico::Direct::SDK::Domain::PaymentStatusOutput] status_output
|
20
|
+
class PaymentDetailsResponse < Ingenico::Direct::SDK::DataObject
|
21
|
+
attr_accessor :operations
|
22
|
+
attr_accessor :hosted_checkout_specific_output
|
23
|
+
attr_accessor :id
|
24
|
+
attr_accessor :payment_output
|
25
|
+
attr_accessor :status
|
26
|
+
attr_accessor :status_output
|
27
|
+
|
28
|
+
# @return (Hash)
|
29
|
+
def to_h
|
30
|
+
hash = super
|
31
|
+
hash['Operations'] = @operations.collect(&:to_h) if @operations
|
32
|
+
hash['hostedCheckoutSpecificOutput'] = @hosted_checkout_specific_output.to_h if @hosted_checkout_specific_output
|
33
|
+
hash['id'] = @id unless @id.nil?
|
34
|
+
hash['paymentOutput'] = @payment_output.to_h if @payment_output
|
35
|
+
hash['status'] = @status unless @status.nil?
|
36
|
+
hash['statusOutput'] = @status_output.to_h if @status_output
|
37
|
+
hash
|
38
|
+
end
|
39
|
+
|
40
|
+
def from_hash(hash)
|
41
|
+
super
|
42
|
+
if hash.key? 'Operations'
|
43
|
+
raise TypeError, "value '%s' is not an Array" % [hash['Operations']] unless hash['Operations'].is_a? Array
|
44
|
+
@operations = []
|
45
|
+
hash['Operations'].each do |e|
|
46
|
+
@operations << Ingenico::Direct::SDK::Domain::OperationOutput.new_from_hash(e)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
if hash.key? 'hostedCheckoutSpecificOutput'
|
50
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['hostedCheckoutSpecificOutput']] unless hash['hostedCheckoutSpecificOutput'].is_a? Hash
|
51
|
+
@hosted_checkout_specific_output = Ingenico::Direct::SDK::Domain::HostedCheckoutSpecificOutput.new_from_hash(hash['hostedCheckoutSpecificOutput'])
|
52
|
+
end
|
53
|
+
@id = hash['id'] if hash.key? 'id'
|
54
|
+
if hash.key? 'paymentOutput'
|
55
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['paymentOutput']] unless hash['paymentOutput'].is_a? Hash
|
56
|
+
@payment_output = Ingenico::Direct::SDK::Domain::PaymentOutput.new_from_hash(hash['paymentOutput'])
|
57
|
+
end
|
58
|
+
@status = hash['status'] if hash.key? 'status'
|
59
|
+
if hash.key? 'statusOutput'
|
60
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']] unless hash['statusOutput'].is_a? Hash
|
61
|
+
@status_output = Ingenico::Direct::SDK::Domain::PaymentStatusOutput.new_from_hash(hash['statusOutput'])
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -16,6 +16,7 @@ module Ingenico::Direct::SDK
|
|
16
16
|
# @attr [true/false] allows_recurring
|
17
17
|
# @attr [true/false] allows_tokenization
|
18
18
|
# @attr [Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints] display_hints
|
19
|
+
# @attr [Array<Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints>] display_hints_list
|
19
20
|
# @attr [Array<Ingenico::Direct::SDK::Domain::PaymentProductField>] fields
|
20
21
|
# @attr [Integer] id
|
21
22
|
# @attr [String] payment_method
|
@@ -28,6 +29,7 @@ module Ingenico::Direct::SDK
|
|
28
29
|
attr_accessor :allows_recurring
|
29
30
|
attr_accessor :allows_tokenization
|
30
31
|
attr_accessor :display_hints
|
32
|
+
attr_accessor :display_hints_list
|
31
33
|
attr_accessor :fields
|
32
34
|
attr_accessor :id
|
33
35
|
attr_accessor :payment_method
|
@@ -43,6 +45,7 @@ module Ingenico::Direct::SDK
|
|
43
45
|
hash['allowsRecurring'] = @allows_recurring unless @allows_recurring.nil?
|
44
46
|
hash['allowsTokenization'] = @allows_tokenization unless @allows_tokenization.nil?
|
45
47
|
hash['displayHints'] = @display_hints.to_h if @display_hints
|
48
|
+
hash['displayHintsList'] = @display_hints_list.collect(&:to_h) if @display_hints_list
|
46
49
|
hash['fields'] = @fields.collect(&:to_h) if @fields
|
47
50
|
hash['id'] = @id unless @id.nil?
|
48
51
|
hash['paymentMethod'] = @payment_method unless @payment_method.nil?
|
@@ -68,6 +71,13 @@ module Ingenico::Direct::SDK
|
|
68
71
|
raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
|
69
72
|
@display_hints = Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints.new_from_hash(hash['displayHints'])
|
70
73
|
end
|
74
|
+
if hash.key? 'displayHintsList'
|
75
|
+
raise TypeError, "value '%s' is not an Array" % [hash['displayHintsList']] unless hash['displayHintsList'].is_a? Array
|
76
|
+
@display_hints_list = []
|
77
|
+
hash['displayHintsList'].each do |e|
|
78
|
+
@display_hints_list << Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints.new_from_hash(e)
|
79
|
+
end
|
80
|
+
end
|
71
81
|
if hash.key? 'fields'
|
72
82
|
raise TypeError, "value '%s' is not an Array" % [hash['fields']] unless hash['fields'].is_a? Array
|
73
83
|
@fields = []
|
@@ -11,10 +11,12 @@ module Ingenico::Direct::SDK
|
|
11
11
|
|
12
12
|
# @attr [Ingenico::Direct::SDK::Domain::AccountOnFile] account_on_file
|
13
13
|
# @attr [Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints] display_hints
|
14
|
+
# @attr [Array<Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints>] display_hints_list
|
14
15
|
# @attr [String] id
|
15
16
|
class PaymentProductGroup < Ingenico::Direct::SDK::DataObject
|
16
17
|
attr_accessor :account_on_file
|
17
18
|
attr_accessor :display_hints
|
19
|
+
attr_accessor :display_hints_list
|
18
20
|
attr_accessor :id
|
19
21
|
|
20
22
|
# @return (Hash)
|
@@ -22,6 +24,7 @@ module Ingenico::Direct::SDK
|
|
22
24
|
hash = super
|
23
25
|
hash['accountOnFile'] = @account_on_file.to_h if @account_on_file
|
24
26
|
hash['displayHints'] = @display_hints.to_h if @display_hints
|
27
|
+
hash['displayHintsList'] = @display_hints_list.collect(&:to_h) if @display_hints_list
|
25
28
|
hash['id'] = @id unless @id.nil?
|
26
29
|
hash
|
27
30
|
end
|
@@ -36,6 +39,13 @@ module Ingenico::Direct::SDK
|
|
36
39
|
raise TypeError, "value '%s' is not a Hash" % [hash['displayHints']] unless hash['displayHints'].is_a? Hash
|
37
40
|
@display_hints = Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints.new_from_hash(hash['displayHints'])
|
38
41
|
end
|
42
|
+
if hash.key? 'displayHintsList'
|
43
|
+
raise TypeError, "value '%s' is not an Array" % [hash['displayHintsList']] unless hash['displayHintsList'].is_a? Array
|
44
|
+
@display_hints_list = []
|
45
|
+
hash['displayHintsList'].each do |e|
|
46
|
+
@display_hints_list << Ingenico::Direct::SDK::Domain::PaymentProductDisplayHints.new_from_hash(e)
|
47
|
+
end
|
48
|
+
end
|
39
49
|
@id = hash['id'] if hash.key? 'id'
|
40
50
|
end
|
41
51
|
end
|
@@ -4,18 +4,22 @@
|
|
4
4
|
#
|
5
5
|
require 'ingenico/direct/sdk/data_object'
|
6
6
|
require 'ingenico/direct/sdk/domain/amount_of_money'
|
7
|
+
require 'ingenico/direct/sdk/domain/payment_references'
|
7
8
|
|
8
9
|
module Ingenico::Direct::SDK
|
9
10
|
module Domain
|
10
11
|
|
11
12
|
# @attr [Ingenico::Direct::SDK::Domain::AmountOfMoney] amount_of_money
|
13
|
+
# @attr [Ingenico::Direct::SDK::Domain::PaymentReferences] references
|
12
14
|
class RefundRequest < Ingenico::Direct::SDK::DataObject
|
13
15
|
attr_accessor :amount_of_money
|
16
|
+
attr_accessor :references
|
14
17
|
|
15
18
|
# @return (Hash)
|
16
19
|
def to_h
|
17
20
|
hash = super
|
18
21
|
hash['amountOfMoney'] = @amount_of_money.to_h if @amount_of_money
|
22
|
+
hash['references'] = @references.to_h if @references
|
19
23
|
hash
|
20
24
|
end
|
21
25
|
|
@@ -25,6 +29,10 @@ module Ingenico::Direct::SDK
|
|
25
29
|
raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
|
26
30
|
@amount_of_money = Ingenico::Direct::SDK::Domain::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
|
27
31
|
end
|
32
|
+
if hash.key? 'references'
|
33
|
+
raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
|
34
|
+
@references = Ingenico::Direct::SDK::Domain::PaymentReferences.new_from_hash(hash['references'])
|
35
|
+
end
|
28
36
|
end
|
29
37
|
end
|
30
38
|
end
|
@@ -13,6 +13,7 @@ require 'ingenico/direct/sdk/domain/complete_payment_response'
|
|
13
13
|
require 'ingenico/direct/sdk/domain/create_payment_request'
|
14
14
|
require 'ingenico/direct/sdk/domain/create_payment_response'
|
15
15
|
require 'ingenico/direct/sdk/domain/error_response'
|
16
|
+
require 'ingenico/direct/sdk/domain/payment_details_response'
|
16
17
|
require 'ingenico/direct/sdk/domain/payment_error_response'
|
17
18
|
require 'ingenico/direct/sdk/domain/payment_response'
|
18
19
|
require 'ingenico/direct/sdk/domain/refund_error_response'
|
@@ -255,6 +256,37 @@ module Ingenico::Direct::SDK
|
|
255
256
|
raise create_exception(e.status_code, e.body, error_object, context)
|
256
257
|
end
|
257
258
|
|
259
|
+
# Resource /v2/!{merchantId}/payments/!{paymentId}/details - {https://support.direct.ingenico.com/documentation/api/reference#operation/GetPaymentDetailsApi Get payment details}
|
260
|
+
# @param payment_id [String]
|
261
|
+
# @param context [Ingenico::Direct::SDK::CallContext]
|
262
|
+
# @return [Ingenico::Direct::SDK::Domain::PaymentDetailsResponse]
|
263
|
+
# @raise [Ingenico::Direct::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
|
264
|
+
# @raise [Ingenico::Direct::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
|
265
|
+
# @raise [Ingenico::Direct::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
|
266
|
+
# @raise [Ingenico::Direct::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
|
267
|
+
# or there was a conflict (HTTP status code 404, 409 or 410)
|
268
|
+
# @raise [Ingenico::Direct::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
|
269
|
+
# the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
|
270
|
+
# or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
|
271
|
+
# @raise [Ingenico::Direct::SDK::ApiException]if the Ingenico ePayments platform returned any other error
|
272
|
+
def get_payment_details(payment_id, context = nil)
|
273
|
+
path_context = {
|
274
|
+
'paymentId'.freeze => payment_id,
|
275
|
+
}
|
276
|
+
uri = instantiate_uri('/v2/{merchantId}/payments/{paymentId}/details', path_context)
|
277
|
+
@communicator.get(
|
278
|
+
uri,
|
279
|
+
client_headers,
|
280
|
+
nil,
|
281
|
+
Ingenico::Direct::SDK::Domain::PaymentDetailsResponse,
|
282
|
+
context
|
283
|
+
)
|
284
|
+
rescue ResponseException => e
|
285
|
+
error_type = Ingenico::Direct::SDK::Domain::ErrorResponse
|
286
|
+
error_object = @communicator.marshaller.unmarshal(e.body, error_type)
|
287
|
+
raise create_exception(e.status_code, e.body, error_object, context)
|
288
|
+
end
|
289
|
+
|
258
290
|
# Resource /v2/!{merchantId}/payments/!{paymentId}/refunds - {https://support.direct.ingenico.com/documentation/api/reference#operation/GetRefundsApi Get Refunds Api}
|
259
291
|
# @param payment_id [String]
|
260
292
|
# @param context [Ingenico::Direct::SDK::CallContext]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: direct-sdk-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.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: 2021-
|
11
|
+
date: 2021-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -224,12 +224,14 @@ files:
|
|
224
224
|
- lib/ingenico/direct/sdk/domain/line_item.rb
|
225
225
|
- lib/ingenico/direct/sdk/domain/line_item_invoice_data.rb
|
226
226
|
- lib/ingenico/direct/sdk/domain/loan_recipient.rb
|
227
|
+
- lib/ingenico/direct/sdk/domain/lodging_data.rb
|
227
228
|
- lib/ingenico/direct/sdk/domain/merchant_action.rb
|
228
229
|
- lib/ingenico/direct/sdk/domain/mobile_payment_data.rb
|
229
230
|
- lib/ingenico/direct/sdk/domain/mobile_payment_method_hosted_checkout_specific_input.rb
|
230
231
|
- lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_input.rb
|
231
232
|
- lib/ingenico/direct/sdk/domain/mobile_payment_method_specific_output.rb
|
232
233
|
- lib/ingenico/direct/sdk/domain/mobile_payment_product320_specific_input.rb
|
234
|
+
- lib/ingenico/direct/sdk/domain/operation_output.rb
|
233
235
|
- lib/ingenico/direct/sdk/domain/order.rb
|
234
236
|
- lib/ingenico/direct/sdk/domain/order_line_details.rb
|
235
237
|
- lib/ingenico/direct/sdk/domain/order_references.rb
|
@@ -238,6 +240,7 @@ files:
|
|
238
240
|
- lib/ingenico/direct/sdk/domain/payment_account_on_file.rb
|
239
241
|
- lib/ingenico/direct/sdk/domain/payment_context.rb
|
240
242
|
- lib/ingenico/direct/sdk/domain/payment_creation_output.rb
|
243
|
+
- lib/ingenico/direct/sdk/domain/payment_details_response.rb
|
241
244
|
- lib/ingenico/direct/sdk/domain/payment_error_response.rb
|
242
245
|
- lib/ingenico/direct/sdk/domain/payment_output.rb
|
243
246
|
- lib/ingenico/direct/sdk/domain/payment_product.rb
|