connect-sdk-ruby 1.30.0 → 1.31.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/connect-sdk-ruby.gemspec +1 -1
  3. data/examples/merchant/disputes/get_dispute_example.rb +22 -0
  4. data/examples/merchant/disputes/submit_dispute_example.rb +22 -0
  5. data/examples/merchant/payments/create_payment_dispute_example.rb +37 -0
  6. data/examples/merchant/payments/get_payment_disputes_example.rb +22 -0
  7. data/lib/ingenico/connect/sdk/domain/dispute/create_dispute_request.rb +63 -0
  8. data/lib/ingenico/connect/sdk/domain/dispute/dispute.rb +67 -0
  9. data/lib/ingenico/connect/sdk/domain/dispute/dispute_creation_detail.rb +45 -0
  10. data/lib/ingenico/connect/sdk/domain/dispute/dispute_output.rb +106 -0
  11. data/lib/ingenico/connect/sdk/domain/dispute/dispute_reference.rb +59 -0
  12. data/lib/ingenico/connect/sdk/domain/dispute/dispute_response.rb +15 -0
  13. data/lib/ingenico/connect/sdk/domain/dispute/dispute_status_output.rb +52 -0
  14. data/lib/ingenico/connect/sdk/domain/dispute/disputes_response.rb +38 -0
  15. data/lib/ingenico/connect/sdk/domain/file/hosted_file.rb +52 -0
  16. data/lib/ingenico/connect/sdk/domain/payment/abstract_redirect_payment_product840_specific_input.rb +31 -0
  17. data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input_base.rb +20 -0
  18. data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input.rb +2 -2
  19. data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product840_specific_input_base.rb +15 -0
  20. data/lib/ingenico/connect/sdk/merchant/captures/captures_client.rb +1 -3
  21. data/lib/ingenico/connect/sdk/merchant/disputes/disputes_client.rb +86 -0
  22. data/lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb +2 -6
  23. data/lib/ingenico/connect/sdk/merchant/hostedmandatemanagements/hostedmandatemanagements_client.rb +2 -6
  24. data/lib/ingenico/connect/sdk/merchant/mandates/mandates_client.rb +6 -18
  25. data/lib/ingenico/connect/sdk/merchant/merchant_client.rb +7 -26
  26. data/lib/ingenico/connect/sdk/merchant/payments/payments_client.rb +78 -42
  27. data/lib/ingenico/connect/sdk/merchant/payouts/payouts_client.rb +6 -18
  28. data/lib/ingenico/connect/sdk/merchant/productgroups/productgroups_client.rb +3 -9
  29. data/lib/ingenico/connect/sdk/merchant/products/products_client.rb +7 -21
  30. data/lib/ingenico/connect/sdk/merchant/refunds/refunds_client.rb +5 -15
  31. data/lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb +2 -6
  32. data/lib/ingenico/connect/sdk/merchant/services/services_client.rb +4 -12
  33. data/lib/ingenico/connect/sdk/merchant/sessions/sessions_client.rb +1 -3
  34. data/lib/ingenico/connect/sdk/merchant/tokens/tokens_client.rb +5 -15
  35. data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
  36. data/lib/ingenico/connect/sdk/modules.rb +14 -0
  37. metadata +18 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e02115e2dab9440881845b678788d86eb87344087d3bbecaabdfdb2e8ce059c3
4
- data.tar.gz: bb84228975409f7335817a16fdbf22d7223b676e3c619b116ed33a964057fe6a
3
+ metadata.gz: 9d6fcdc2f027cdeefbca0ccd452ba53cd5ea8ec9a369b6d8fd5828a68bb616c5
4
+ data.tar.gz: 9817e5abd2a1b0b213dd584ce742039e5724e2f90442fd110566232f9d3fffcf
5
5
  SHA512:
6
- metadata.gz: 4a827e2f0cfbd3fc791fbc7b08c72a3ad7df12b674f34c829a01c4d3e0d5f3c3bee5ed62e9a227331b834a14d7501405663dbfdffc0b554b6f15e80e82b3b3c6
7
- data.tar.gz: 77cb4eea44d9566ce4f2de96e705e6aae5f960c027e541b927ec5f7a464e0d6524156ce726432e5dedcba6a784044ae60109779538d59e458db2b0687a096cc4
6
+ metadata.gz: edc66e5f8fe391f1d7904fbe39ec5f88565d5d889415f3207128bee2ad9e22b0fe5e57c18d5a0f335e95c013b419fd7765a61815586adfe8c748f7f4bb2b5106
7
+ data.tar.gz: 6b09bc826e60c42e56940f48ab8e5b53b571342f18393cd878cb65119ae7de5c92d20829faa1cd9a82fa3f942221404d2c9453fabe098107cac2660d7251b0cf
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '1.30.0'
3
+ spec.version = '1.31.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().get('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
@@ -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().submit('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
@@ -0,0 +1,37 @@
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/definitions/amount_of_money'
7
+ require 'ingenico/connect/sdk/domain/dispute/create_dispute_request'
8
+
9
+ Definitions = Ingenico::Connect::SDK::Domain::Definitions
10
+ Dispute = Ingenico::Connect::SDK::Domain::Dispute
11
+
12
+ def example
13
+ get_client do |client|
14
+ amount_of_money = Definitions::AmountOfMoney.new
15
+ amount_of_money.amount = 1234
16
+ amount_of_money.currency_code = 'USD'
17
+
18
+ body = Dispute::CreateDisputeRequest.new
19
+ body.amount_of_money = amount_of_money
20
+ body.contact_person = 'Wile Coyote'
21
+ body.email_address = 'wile.e.coyote@acmelabs.com'
22
+ body.reply_to = 'r.runner@acmelabs.com'
23
+ body.request_message = 'This is the message from the merchant to GlobalCollect. It is a a freeform text field.'
24
+
25
+ response = client.merchant('merchantId').payments().dispute('paymentId', body)
26
+ end
27
+ end
28
+
29
+ def get_client
30
+ api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
31
+ secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
32
+ configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
33
+ yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
34
+ ensure
35
+ # Free networking resources when done
36
+ client.close unless client.nil?
37
+ 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').payments().disputes('paymentId')
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
@@ -0,0 +1,63 @@
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/definitions/amount_of_money'
7
+
8
+ module Ingenico::Connect::SDK
9
+ module Domain
10
+ module Dispute
11
+
12
+ class CreateDisputeRequest < Ingenico::Connect::SDK::DataObject
13
+
14
+ # {Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney}
15
+ attr_accessor :amount_of_money
16
+
17
+ # String
18
+ attr_accessor :contact_person
19
+
20
+ # String
21
+ attr_accessor :email_address
22
+
23
+ # String
24
+ attr_accessor :reply_to
25
+
26
+ # String
27
+ attr_accessor :request_message
28
+
29
+ def to_h
30
+ hash = super
31
+ add_to_hash(hash, 'amountOfMoney', @amount_of_money)
32
+ add_to_hash(hash, 'contactPerson', @contact_person)
33
+ add_to_hash(hash, 'emailAddress', @email_address)
34
+ add_to_hash(hash, 'replyTo', @reply_to)
35
+ add_to_hash(hash, 'requestMessage', @request_message)
36
+ hash
37
+ end
38
+
39
+ def from_hash(hash)
40
+ super
41
+ if hash.has_key?('amountOfMoney')
42
+ if !(hash['amountOfMoney'].is_a? Hash)
43
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']]
44
+ end
45
+ @amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
46
+ end
47
+ if hash.has_key?('contactPerson')
48
+ @contact_person = hash['contactPerson']
49
+ end
50
+ if hash.has_key?('emailAddress')
51
+ @email_address = hash['emailAddress']
52
+ end
53
+ if hash.has_key?('replyTo')
54
+ @reply_to = hash['replyTo']
55
+ end
56
+ if hash.has_key?('requestMessage')
57
+ @request_message = hash['requestMessage']
58
+ end
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -0,0 +1,67 @@
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/dispute/dispute_output'
7
+ require 'ingenico/connect/sdk/domain/dispute/dispute_status_output'
8
+
9
+ module Ingenico::Connect::SDK
10
+ module Domain
11
+ module Dispute
12
+
13
+ class Dispute < Ingenico::Connect::SDK::DataObject
14
+
15
+ # {Ingenico::Connect::SDK::Domain::Dispute::DisputeOutput}
16
+ attr_accessor :dispute_output
17
+
18
+ # String
19
+ attr_accessor :id
20
+
21
+ # String
22
+ attr_accessor :payment_id
23
+
24
+ # String
25
+ attr_accessor :status
26
+
27
+ # {Ingenico::Connect::SDK::Domain::Dispute::DisputeStatusOutput}
28
+ attr_accessor :status_output
29
+
30
+ def to_h
31
+ hash = super
32
+ add_to_hash(hash, 'disputeOutput', @dispute_output)
33
+ add_to_hash(hash, 'id', @id)
34
+ add_to_hash(hash, 'paymentId', @payment_id)
35
+ add_to_hash(hash, 'status', @status)
36
+ add_to_hash(hash, 'statusOutput', @status_output)
37
+ hash
38
+ end
39
+
40
+ def from_hash(hash)
41
+ super
42
+ if hash.has_key?('disputeOutput')
43
+ if !(hash['disputeOutput'].is_a? Hash)
44
+ raise TypeError, "value '%s' is not a Hash" % [hash['disputeOutput']]
45
+ end
46
+ @dispute_output = Ingenico::Connect::SDK::Domain::Dispute::DisputeOutput.new_from_hash(hash['disputeOutput'])
47
+ end
48
+ if hash.has_key?('id')
49
+ @id = hash['id']
50
+ end
51
+ if hash.has_key?('paymentId')
52
+ @payment_id = hash['paymentId']
53
+ end
54
+ if hash.has_key?('status')
55
+ @status = hash['status']
56
+ end
57
+ if hash.has_key?('statusOutput')
58
+ if !(hash['statusOutput'].is_a? Hash)
59
+ raise TypeError, "value '%s' is not a Hash" % [hash['statusOutput']]
60
+ end
61
+ @status_output = Ingenico::Connect::SDK::Domain::Dispute::DisputeStatusOutput.new_from_hash(hash['statusOutput'])
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
67
+ 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 Dispute
10
+
11
+ class DisputeCreationDetail < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :dispute_creation_date
15
+
16
+ # String
17
+ attr_accessor :dispute_originator
18
+
19
+ # String
20
+ attr_accessor :user_name
21
+
22
+ def to_h
23
+ hash = super
24
+ add_to_hash(hash, 'disputeCreationDate', @dispute_creation_date)
25
+ add_to_hash(hash, 'disputeOriginator', @dispute_originator)
26
+ add_to_hash(hash, 'userName', @user_name)
27
+ hash
28
+ end
29
+
30
+ def from_hash(hash)
31
+ super
32
+ if hash.has_key?('disputeCreationDate')
33
+ @dispute_creation_date = hash['disputeCreationDate']
34
+ end
35
+ if hash.has_key?('disputeOriginator')
36
+ @dispute_originator = hash['disputeOriginator']
37
+ end
38
+ if hash.has_key?('userName')
39
+ @user_name = hash['userName']
40
+ end
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,106 @@
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/definitions/amount_of_money'
7
+ require 'ingenico/connect/sdk/domain/dispute/dispute_creation_detail'
8
+ require 'ingenico/connect/sdk/domain/dispute/dispute_reference'
9
+ require 'ingenico/connect/sdk/domain/file/hosted_file'
10
+
11
+ module Ingenico::Connect::SDK
12
+ module Domain
13
+ module Dispute
14
+
15
+ class DisputeOutput < Ingenico::Connect::SDK::DataObject
16
+
17
+ # {Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney}
18
+ attr_accessor :amount_of_money
19
+
20
+ # String
21
+ attr_accessor :contact_person
22
+
23
+ # {Ingenico::Connect::SDK::Domain::Dispute::DisputeCreationDetail}
24
+ attr_accessor :creation_details
25
+
26
+ # String
27
+ attr_accessor :email_address
28
+
29
+ # Array of {Ingenico::Connect::SDK::Domain::File::HostedFile}
30
+ attr_accessor :files
31
+
32
+ # {Ingenico::Connect::SDK::Domain::Dispute::DisputeReference}
33
+ attr_accessor :reference
34
+
35
+ # String
36
+ attr_accessor :reply_to
37
+
38
+ # String
39
+ attr_accessor :request_message
40
+
41
+ # String
42
+ attr_accessor :response_message
43
+
44
+ def to_h
45
+ hash = super
46
+ add_to_hash(hash, 'amountOfMoney', @amount_of_money)
47
+ add_to_hash(hash, 'contactPerson', @contact_person)
48
+ add_to_hash(hash, 'creationDetails', @creation_details)
49
+ add_to_hash(hash, 'emailAddress', @email_address)
50
+ add_to_hash(hash, 'files', @files)
51
+ add_to_hash(hash, 'reference', @reference)
52
+ add_to_hash(hash, 'replyTo', @reply_to)
53
+ add_to_hash(hash, 'requestMessage', @request_message)
54
+ add_to_hash(hash, 'responseMessage', @response_message)
55
+ hash
56
+ end
57
+
58
+ def from_hash(hash)
59
+ super
60
+ if hash.has_key?('amountOfMoney')
61
+ if !(hash['amountOfMoney'].is_a? Hash)
62
+ raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']]
63
+ end
64
+ @amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
65
+ end
66
+ if hash.has_key?('contactPerson')
67
+ @contact_person = hash['contactPerson']
68
+ end
69
+ if hash.has_key?('creationDetails')
70
+ if !(hash['creationDetails'].is_a? Hash)
71
+ raise TypeError, "value '%s' is not a Hash" % [hash['creationDetails']]
72
+ end
73
+ @creation_details = Ingenico::Connect::SDK::Domain::Dispute::DisputeCreationDetail.new_from_hash(hash['creationDetails'])
74
+ end
75
+ if hash.has_key?('emailAddress')
76
+ @email_address = hash['emailAddress']
77
+ end
78
+ if hash.has_key?('files')
79
+ if !(hash['files'].is_a? Array)
80
+ raise TypeError, "value '%s' is not an Array" % [hash['files']]
81
+ end
82
+ @files = []
83
+ hash['files'].each do |e|
84
+ @files << Ingenico::Connect::SDK::Domain::File::HostedFile.new_from_hash(e)
85
+ end
86
+ end
87
+ if hash.has_key?('reference')
88
+ if !(hash['reference'].is_a? Hash)
89
+ raise TypeError, "value '%s' is not a Hash" % [hash['reference']]
90
+ end
91
+ @reference = Ingenico::Connect::SDK::Domain::Dispute::DisputeReference.new_from_hash(hash['reference'])
92
+ end
93
+ if hash.has_key?('replyTo')
94
+ @reply_to = hash['replyTo']
95
+ end
96
+ if hash.has_key?('requestMessage')
97
+ @request_message = hash['requestMessage']
98
+ end
99
+ if hash.has_key?('responseMessage')
100
+ @response_message = hash['responseMessage']
101
+ end
102
+ end
103
+ end
104
+ end
105
+ end
106
+ 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
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Dispute
10
+
11
+ class DisputeReference < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :merchant_order_id
15
+
16
+ # String
17
+ attr_accessor :merchant_reference
18
+
19
+ # String
20
+ attr_accessor :payment_reference
21
+
22
+ # String
23
+ attr_accessor :provider_id
24
+
25
+ # String
26
+ attr_accessor :provider_reference
27
+
28
+ def to_h
29
+ hash = super
30
+ add_to_hash(hash, 'merchantOrderId', @merchant_order_id)
31
+ add_to_hash(hash, 'merchantReference', @merchant_reference)
32
+ add_to_hash(hash, 'paymentReference', @payment_reference)
33
+ add_to_hash(hash, 'providerId', @provider_id)
34
+ add_to_hash(hash, 'providerReference', @provider_reference)
35
+ hash
36
+ end
37
+
38
+ def from_hash(hash)
39
+ super
40
+ if hash.has_key?('merchantOrderId')
41
+ @merchant_order_id = hash['merchantOrderId']
42
+ end
43
+ if hash.has_key?('merchantReference')
44
+ @merchant_reference = hash['merchantReference']
45
+ end
46
+ if hash.has_key?('paymentReference')
47
+ @payment_reference = hash['paymentReference']
48
+ end
49
+ if hash.has_key?('providerId')
50
+ @provider_id = hash['providerId']
51
+ end
52
+ if hash.has_key?('providerReference')
53
+ @provider_reference = hash['providerReference']
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end