connect-sdk-ruby 1.32.0 → 1.33.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: 8df5897a79a44422bf030b39a746fd2829af0d36cc98607e1a9f417b49a6396f
4
- data.tar.gz: 5e8454e1e8785f9079bc589b99e23ef184e4e2feb8e8957bd88121823db2ffd9
3
+ metadata.gz: dddcd06bb06ff14b1cb296b5aa57988a655bcf02f32e17956ffed6a600230b77
4
+ data.tar.gz: 0c6cce4fe93c28fd8fc01d4653d7e5588bfa1f6019fa7a47aae07d5d486e3934
5
5
  SHA512:
6
- metadata.gz: 5ea3bde82f8e40e1935ccbd0436103a406efa65222a9ae18081c74daa6e9e66734f7406add81466b8574a7c8762864d0b6e26d853991b0e5d9ec32da3436498f
7
- data.tar.gz: 6a8c1b9fac228f2037cb1d798fed4af64d40f7d4d365d15e03462cea1297a2dacf0504454d757a95abed209950d7f87b57f3289619db83ad4bf1af25b64ff2e4
6
+ metadata.gz: 93333fa3b6ce0fdca69b2fc8d43e4eede1410111aeb27e96e540d25f63ef48400881b2162bd9be700cdf6eeea734fa7eef20e6210f3d02079c15c2f2bfc8e88a
7
+ data.tar.gz: e3042ac20359ba6f508ae97a1e05eb572f5d5e50fdf74a4ceb538bd6c22045d4dd9d3a0e58857f9353af17d4650647810155e7a8fa9b9bb6903f9db454341525
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '1.32.0'
3
+ spec.version = '1.33.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,28 @@
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/services/privacypolicy_params'
7
+
8
+ Services = Ingenico::Connect::SDK::Merchant::Services
9
+
10
+ def example
11
+ get_client do |client|
12
+ query = Services::PrivacypolicyParams.new
13
+ query.locale = 'en_US'
14
+ query.payment_product_id = 771
15
+
16
+ response = client.merchant('merchantId').services().privacypolicy(query)
17
+ end
18
+ end
19
+
20
+ def get_client
21
+ api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
22
+ secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
23
+ configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
24
+ yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
25
+ ensure
26
+ # Free networking resources when done
27
+ client.close unless client.nil?
28
+ end
@@ -9,6 +9,7 @@ require 'ingenico/connect/sdk/domain/payment/customer'
9
9
  require 'ingenico/connect/sdk/domain/payment/line_item'
10
10
  require 'ingenico/connect/sdk/domain/payment/order_references'
11
11
  require 'ingenico/connect/sdk/domain/payment/seller'
12
+ require 'ingenico/connect/sdk/domain/payment/shipping'
12
13
  require 'ingenico/connect/sdk/domain/payment/shopping_cart'
13
14
 
14
15
  module Ingenico::Connect::SDK
@@ -37,6 +38,9 @@ module Ingenico::Connect::SDK
37
38
  # {Ingenico::Connect::SDK::Domain::Payment::Seller}
38
39
  attr_accessor :seller
39
40
 
41
+ # {Ingenico::Connect::SDK::Domain::Payment::Shipping}
42
+ attr_accessor :shipping
43
+
40
44
  # {Ingenico::Connect::SDK::Domain::Payment::ShoppingCart}
41
45
  attr_accessor :shopping_cart
42
46
 
@@ -48,6 +52,7 @@ module Ingenico::Connect::SDK
48
52
  add_to_hash(hash, 'items', @items)
49
53
  add_to_hash(hash, 'references', @references)
50
54
  add_to_hash(hash, 'seller', @seller)
55
+ add_to_hash(hash, 'shipping', @shipping)
51
56
  add_to_hash(hash, 'shoppingCart', @shopping_cart)
52
57
  hash
53
58
  end
@@ -93,6 +98,12 @@ module Ingenico::Connect::SDK
93
98
  end
94
99
  @seller = Ingenico::Connect::SDK::Domain::Payment::Seller.new_from_hash(hash['seller'])
95
100
  end
101
+ if hash.has_key?('shipping')
102
+ if !(hash['shipping'].is_a? Hash)
103
+ raise TypeError, "value '%s' is not a Hash" % [hash['shipping']]
104
+ end
105
+ @shipping = Ingenico::Connect::SDK::Domain::Payment::Shipping.new_from_hash(hash['shipping'])
106
+ end
96
107
  if hash.has_key?('shoppingCart')
97
108
  if !(hash['shoppingCart'].is_a? Hash)
98
109
  raise TypeError, "value '%s' is not a Hash" % [hash['shoppingCart']]
@@ -19,6 +19,9 @@ module Ingenico::Connect::SDK
19
19
  # String
20
20
  attr_accessor :company_name
21
21
 
22
+ # String
23
+ attr_accessor :contact_phone
24
+
22
25
  # String
23
26
  attr_accessor :country_code
24
27
 
@@ -42,6 +45,7 @@ module Ingenico::Connect::SDK
42
45
  add_to_hash(hash, 'accountId', @account_id)
43
46
  add_to_hash(hash, 'billingAgreementId', @billing_agreement_id)
44
47
  add_to_hash(hash, 'companyName', @company_name)
48
+ add_to_hash(hash, 'contactPhone', @contact_phone)
45
49
  add_to_hash(hash, 'countryCode', @country_code)
46
50
  add_to_hash(hash, 'customerAccountStatus', @customer_account_status)
47
51
  add_to_hash(hash, 'customerAddressStatus', @customer_address_status)
@@ -62,6 +66,9 @@ module Ingenico::Connect::SDK
62
66
  if hash.has_key?('companyName')
63
67
  @company_name = hash['companyName']
64
68
  end
69
+ if hash.has_key?('contactPhone')
70
+ @contact_phone = hash['contactPhone']
71
+ end
65
72
  if hash.has_key?('countryCode')
66
73
  @country_code = hash['countryCode']
67
74
  end
@@ -0,0 +1,31 @@
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 Payment
10
+
11
+ class Shipping < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :email_address
15
+
16
+ def to_h
17
+ hash = super
18
+ add_to_hash(hash, 'emailAddress', @email_address)
19
+ hash
20
+ end
21
+
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key?('emailAddress')
25
+ @email_address = hash['emailAddress']
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,31 @@
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 Services
10
+
11
+ class GetPrivacyPolicyResponse < Ingenico::Connect::SDK::DataObject
12
+
13
+ # String
14
+ attr_accessor :html_content
15
+
16
+ def to_h
17
+ hash = super
18
+ add_to_hash(hash, 'htmlContent', @html_content)
19
+ hash
20
+ end
21
+
22
+ def from_hash(hash)
23
+ super
24
+ if hash.has_key?('htmlContent')
25
+ @html_content = hash['htmlContent']
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ 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/param_request'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Merchant
9
+ module Services
10
+
11
+ # Query parameters for {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/services/privacypolicy.html Get privacy policy}
12
+ class PrivacypolicyParams < Ingenico::Connect::SDK::ParamRequest
13
+
14
+ # String
15
+ attr_accessor :locale
16
+
17
+ # Integer
18
+ attr_accessor :payment_product_id
19
+
20
+ # Returns an Array of {Ingenico::Connect::SDK::RequestParam} objects representing the attributes of this class
21
+ def to_request_parameters
22
+ result = []
23
+ add_parameter(result, 'locale', @locale)
24
+ add_parameter(result, 'paymentProductId', @payment_product_id)
25
+ result
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -8,6 +8,7 @@ require 'ingenico/connect/sdk/domain/errors/error_response'
8
8
  require 'ingenico/connect/sdk/domain/services/bank_details_response'
9
9
  require 'ingenico/connect/sdk/domain/services/convert_amount'
10
10
  require 'ingenico/connect/sdk/domain/services/get_iin_details_response'
11
+ require 'ingenico/connect/sdk/domain/services/get_privacy_policy_response'
11
12
  require 'ingenico/connect/sdk/domain/services/test_connection'
12
13
 
13
14
  module Ingenico::Connect::SDK
@@ -106,6 +107,33 @@ module Ingenico::Connect::SDK
106
107
  raise create_exception(e.status_code, e.body, error_object, context)
107
108
  end
108
109
 
110
+ # Resource /{{merchantId}}/services/privacypolicy - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/services/privacypolicy.html Get privacy policy}
111
+ # query:: {Ingenico::Connect::SDK::Merchant::Services::PrivacypolicyParams}
112
+ # context:: {Ingenico::Connect::SDK::CallContext}
113
+ # Returns:: {Ingenico::Connect::SDK::Domain::Services::GetPrivacyPolicyResponse}
114
+ # Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
115
+ # Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
116
+ # Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
117
+ # Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
118
+ # or there was a conflict (HTTP status code 404, 409 or 410)
119
+ # Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the Ingenico ePayments platform,
120
+ # the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
121
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
122
+ # Raises:: {Ingenico::Connect::SDK::ApiException} if the Ingenico ePayments platform returned any other error
123
+ def privacypolicy(query, context=nil)
124
+ uri = instantiate_uri('/{apiVersion}/{merchantId}/services/privacypolicy', nil)
125
+ return @communicator.get(
126
+ uri,
127
+ client_headers,
128
+ query,
129
+ Ingenico::Connect::SDK::Domain::Services::GetPrivacyPolicyResponse,
130
+ context)
131
+ rescue ResponseException => e
132
+ error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
133
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
134
+ raise create_exception(e.status_code, e.body, error_object, context)
135
+ end
136
+
109
137
  # Resource /{{merchantId}}/services/testconnection - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/services/testconnection.html Test connection}
110
138
  # context:: {Ingenico::Connect::SDK::CallContext}
111
139
  # Returns:: {Ingenico::Connect::SDK::Domain::Services::TestConnection}
@@ -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.32.0'
8
+ @@SDK_VERSION = '1.33.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.32.0
4
+ version: 1.33.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: 2019-03-05 00:00:00.000000000 Z
11
+ date: 2019-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -177,6 +177,7 @@ files:
177
177
  - examples/merchant/riskassessments/risk_assessment_cards_example.rb
178
178
  - examples/merchant/services/convert_amount_example.rb
179
179
  - examples/merchant/services/convert_bank_account_example.rb
180
+ - examples/merchant/services/get_privacy_policy_example.rb
180
181
  - examples/merchant/services/iin_details_example.rb
181
182
  - examples/merchant/services/test_connection_example.rb
182
183
  - examples/merchant/sessions/create_session_example.rb
@@ -398,6 +399,7 @@ files:
398
399
  - lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_method_specific_output.rb
399
400
  - lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_product771_specific_input.rb
400
401
  - lib/ingenico/connect/sdk/domain/payment/sepa_direct_debit_payment_product771_specific_input_base.rb
402
+ - lib/ingenico/connect/sdk/domain/payment/shipping.rb
401
403
  - lib/ingenico/connect/sdk/domain/payment/shopping_cart.rb
402
404
  - lib/ingenico/connect/sdk/domain/payment/third_party_status_response.rb
403
405
  - lib/ingenico/connect/sdk/domain/payment/three_d_secure_results.rb
@@ -478,6 +480,7 @@ files:
478
480
  - lib/ingenico/connect/sdk/domain/services/convert_amount.rb
479
481
  - lib/ingenico/connect/sdk/domain/services/get_iin_details_request.rb
480
482
  - lib/ingenico/connect/sdk/domain/services/get_iin_details_response.rb
483
+ - lib/ingenico/connect/sdk/domain/services/get_privacy_policy_response.rb
481
484
  - lib/ingenico/connect/sdk/domain/services/iin_detail.rb
482
485
  - lib/ingenico/connect/sdk/domain/services/payment_context.rb
483
486
  - lib/ingenico/connect/sdk/domain/services/swift.rb
@@ -550,6 +553,7 @@ files:
550
553
  - lib/ingenico/connect/sdk/merchant/refunds/refunds_client.rb
551
554
  - lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb
552
555
  - lib/ingenico/connect/sdk/merchant/services/convert_amount_params.rb
556
+ - lib/ingenico/connect/sdk/merchant/services/privacypolicy_params.rb
553
557
  - lib/ingenico/connect/sdk/merchant/services/services_client.rb
554
558
  - lib/ingenico/connect/sdk/merchant/sessions/sessions_client.rb
555
559
  - lib/ingenico/connect/sdk/merchant/tokens/delete_token_params.rb