connect-sdk-ruby 2.25.0 → 2.26.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d3544e10cd38ce540eed9db96f91d7528f199344048fdf30a1c0e2fbfac7d88
4
- data.tar.gz: 98805c926124ced5fe4237ad63d2ed40dc0e76fb16ca6ea12d510f50f809ea08
3
+ metadata.gz: a02706ec5b92c4aef370fa8a669581eaafc9cfec56c79969986656d71d73094d
4
+ data.tar.gz: 751da15e062dda64a8fe59cd64c5b4c98ad2786f43c657aedd301d6cd8954483
5
5
  SHA512:
6
- metadata.gz: 1c6d44127b3971794d6dc04d1156da56b45bc778af36e55d90eca4695b6369f660b44de56f53336ee95e15db3de85035b45b3d0e7e5ed5f77c0b1895f9856479
7
- data.tar.gz: 13727982fff96b31b113738cbbc3242703b84236ebb0bfd040e180e25311762ecdadf6f112b725384cfbf2b3b451f841103ff7a3ca92a2911ac10bb5156e096d
6
+ metadata.gz: 879ed4b786ddbb83969554bf6bf5a784931d18c31dceec8c39e0efe4862b5d3dbb6118ee3354638f780e13509784f84904977aef2704d504e83a77b524c7ef93
7
+ data.tar.gz: 48d48bfb9e023058d252dc3dd9c6b1246d693720a727e3f951ec0142598e6ca043cb24c57aa90b429dc4953c3ff57c3aec7aa2489919d021be1eb99a0a42716f
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '2.25.0'
3
+ spec.version = '2.26.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
+ client.merchant('merchantId').hostedcheckouts.delete('hostedCheckoutId')
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
@@ -5,6 +5,7 @@
5
5
  require 'ingenico/connect/sdk/domain/definitions/fraud_results'
6
6
  require 'ingenico/connect/sdk/domain/definitions/fraud_results_retail_decisions'
7
7
  require 'ingenico/connect/sdk/domain/definitions/fraugster_results'
8
+ require 'ingenico/connect/sdk/domain/definitions/microsoft_fraud_results'
8
9
 
9
10
  module Ingenico::Connect::SDK
10
11
  module Domain
@@ -13,6 +14,7 @@ module Ingenico::Connect::SDK
13
14
  # @attr [String] avs_result
14
15
  # @attr [String] cvv_result
15
16
  # @attr [Ingenico::Connect::SDK::Domain::Definitions::FraugsterResults] fraugster
17
+ # @attr [Ingenico::Connect::SDK::Domain::Definitions::MicrosoftFraudResults] microsoft_fraud_protection
16
18
  # @attr [Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions] retail_decisions
17
19
  class CardFraudResults < Ingenico::Connect::SDK::Domain::Definitions::FraudResults
18
20
 
@@ -22,6 +24,8 @@ module Ingenico::Connect::SDK
22
24
 
23
25
  attr_accessor :fraugster
24
26
 
27
+ attr_accessor :microsoft_fraud_protection
28
+
25
29
  attr_accessor :retail_decisions
26
30
 
27
31
  # @return (Hash)
@@ -30,6 +34,7 @@ module Ingenico::Connect::SDK
30
34
  hash['avsResult'] = @avs_result unless @avs_result.nil?
31
35
  hash['cvvResult'] = @cvv_result unless @cvv_result.nil?
32
36
  hash['fraugster'] = @fraugster.to_h unless @fraugster.nil?
37
+ hash['microsoftFraudProtection'] = @microsoft_fraud_protection.to_h unless @microsoft_fraud_protection.nil?
33
38
  hash['retailDecisions'] = @retail_decisions.to_h unless @retail_decisions.nil?
34
39
  hash
35
40
  end
@@ -46,6 +51,10 @@ module Ingenico::Connect::SDK
46
51
  raise TypeError, "value '%s' is not a Hash" % [hash['fraugster']] unless hash['fraugster'].is_a? Hash
47
52
  @fraugster = Ingenico::Connect::SDK::Domain::Definitions::FraugsterResults.new_from_hash(hash['fraugster'])
48
53
  end
54
+ if hash.has_key? 'microsoftFraudProtection'
55
+ raise TypeError, "value '%s' is not a Hash" % [hash['microsoftFraudProtection']] unless hash['microsoftFraudProtection'].is_a? Hash
56
+ @microsoft_fraud_protection = Ingenico::Connect::SDK::Domain::Definitions::MicrosoftFraudResults.new_from_hash(hash['microsoftFraudProtection'])
57
+ end
49
58
  if hash.has_key? 'retailDecisions'
50
59
  raise TypeError, "value '%s' is not a Hash" % [hash['retailDecisions']] unless hash['retailDecisions'].is_a? Hash
51
60
  @retail_decisions = Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions.new_from_hash(hash['retailDecisions'])
@@ -0,0 +1,32 @@
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 Definitions
10
+
11
+ # @attr [Integer] fraud_score
12
+ class MicrosoftFraudResults < Ingenico::Connect::SDK::DataObject
13
+
14
+ attr_accessor :fraud_score
15
+
16
+ # @return (Hash)
17
+ def to_h
18
+ hash = super
19
+ hash['fraudScore'] = @fraud_score unless @fraud_score.nil?
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key? 'fraudScore'
26
+ @fraud_score = hash['fraudScore']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -78,6 +78,35 @@ module Ingenico::Connect::SDK
78
78
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
79
79
  raise create_exception(e.status_code, e.body, error_object, context)
80
80
  end
81
+
82
+ # Resource /!{merchantId}/hostedcheckouts/!{hostedCheckoutId} - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/hostedcheckouts/delete.html Delete hosted checkout}
83
+ # @param hosted_checkout_id [String]
84
+ # @param context [Ingenico::Connect::SDK::CallContext]
85
+ # @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
86
+ # @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
87
+ # @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
88
+ # @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
89
+ # or there was a conflict (HTTP status code 404, 409 or 410)
90
+ # @raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
91
+ # the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
92
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
93
+ # @raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error
94
+ def delete(hosted_checkout_id, context=nil)
95
+ path_context = {
96
+ 'hostedCheckoutId'.freeze => hosted_checkout_id,
97
+ }
98
+ uri = instantiate_uri('/v1/{merchantId}/hostedcheckouts/{hostedCheckoutId}', path_context)
99
+ return @communicator.delete(
100
+ uri,
101
+ client_headers,
102
+ nil,
103
+ nil,
104
+ context)
105
+ rescue ResponseException => e
106
+ error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
107
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
108
+ raise create_exception(e.status_code, e.body, error_object, context)
109
+ end
81
110
  end
82
111
  end
83
112
  end
@@ -7,7 +7,7 @@ module Ingenico::Connect::SDK
7
7
  #
8
8
  # @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
9
9
  class MetaDataProvider
10
- @@SDK_VERSION = '2.25.0'
10
+ @@SDK_VERSION = '2.26.0'
11
11
  @@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
12
12
  @@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
13
13
  '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: 2.25.0
4
+ version: 2.26.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-10-07 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -135,6 +135,7 @@ files:
135
135
  - examples/merchant/example_configuration.yml
136
136
  - examples/merchant/files/get_file_example.rb
137
137
  - examples/merchant/hostedcheckouts/create_hosted_checkout_example.rb
138
+ - examples/merchant/hostedcheckouts/delete_hosted_checkout_example.rb
138
139
  - examples/merchant/hostedcheckouts/get_hosted_checkout_example.rb
139
140
  - examples/merchant/hostedmandatemanagements/create_hosted_mandate_management_example.rb
140
141
  - examples/merchant/hostedmandatemanagements/get_hosted_mandate_management_example.rb
@@ -249,6 +250,7 @@ files:
249
250
  - lib/ingenico/connect/sdk/domain/definitions/lodging_charge.rb
250
251
  - lib/ingenico/connect/sdk/domain/definitions/lodging_data.rb
251
252
  - lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb
253
+ - lib/ingenico/connect/sdk/domain/definitions/microsoft_fraud_results.rb
252
254
  - lib/ingenico/connect/sdk/domain/definitions/order_status_output.rb
253
255
  - lib/ingenico/connect/sdk/domain/definitions/payment_product_filter.rb
254
256
  - lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb