connect-sdk-ruby 1.0.0 → 1.1.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.
Files changed (27) hide show
  1. checksums.yaml +4 -4
  2. data/connect-sdk-ruby.gemspec +1 -1
  3. data/examples/merchant/payments/create_payment_example.rb +1 -1
  4. data/examples/merchant/products/get_networks_example.rb +30 -0
  5. data/examples/merchant/products/get_payment_product_public_key_example.rb +22 -0
  6. data/examples/merchant/riskassessments/risk_assessment_cards_example.rb +4 -4
  7. data/lib/ingenico/connect/sdk/domain/payment/approve_payment_mobile_payment_method_specific_output.rb +32 -0
  8. data/lib/ingenico/connect/sdk/domain/payment/cancel_payment_mobile_payment_method_specific_output.rb +32 -0
  9. data/lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb +11 -0
  10. data/lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb +14 -0
  11. data/lib/ingenico/connect/sdk/domain/payment/create_payment_request.rb +11 -0
  12. data/lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb +60 -0
  13. data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_data.rb +39 -0
  14. data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb +82 -0
  15. data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_output.rb +72 -0
  16. data/lib/ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input.rb +32 -0
  17. data/lib/ingenico/connect/sdk/domain/payment/payment_approval_response.rb +23 -0
  18. data/lib/ingenico/connect/sdk/domain/payment/payment_output.rb +11 -0
  19. data/lib/ingenico/connect/sdk/domain/payment/refund_mobile_method_specific_output.rb +32 -0
  20. data/lib/ingenico/connect/sdk/domain/payment/refund_output.rb +11 -0
  21. data/lib/ingenico/connect/sdk/domain/product/payment_product_networks_response.rb +38 -0
  22. data/lib/ingenico/connect/sdk/domain/publickey/public_key.rb +39 -0
  23. data/lib/ingenico/connect/sdk/merchant/products/networks_params.rb +39 -0
  24. data/lib/ingenico/connect/sdk/merchant/products/products_client.rb +71 -0
  25. data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
  26. data/lib/ingenico/connect/sdk/modules.rb +4 -0
  27. metadata +16 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9904df39ea9086dd36f1fda45a260a42546ea32
4
- data.tar.gz: 5a9958176cceaba5701b659be2df0b9952fe5ef0
3
+ metadata.gz: bbf603e83e91a6bbb5d70a0ae87f8cf86c31d736
4
+ data.tar.gz: 992b082987599c47c1a3fc9533278d61b532d386
5
5
  SHA512:
6
- metadata.gz: bc6c5983080c1199c1ff60c5e6bcce7a5f381f80b73c9490121b5277f1ec31f9aa06b6ab0dd0465e369d3b8644611f69b21d531caf8beb448671de197eefb9a9
7
- data.tar.gz: 2c4be282e92d5e19a87a14751d37382b0e3d29a215ff2008768dc2bcc90a735545ad2638dc071f3444b75113ad86e4f07db4b108ada3e6c94fe6c3e78b9221c0
6
+ metadata.gz: 4b69acd9f6fbe5f39b71c6e9d7f57d33136363928f5e45cead948f1385b9749bbad85cadbeb1f0c47027010d48197aff03cfa09efbd44837cab62067b06ba086
7
+ data.tar.gz: e4761e00eec60032705cbf12d930c9431bdf8bddad3e51a0639ee7f477a9a659f06849ebb9c5bbf0040b5ec42d1010227bcf6150d237ce74585009cda22c9048
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'connect-sdk-ruby'
3
- spec.version = '1.0.0'
3
+ spec.version = '1.1.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 GlobalCollect platform using the Ingenico Connect Server API}
@@ -118,7 +118,7 @@ def example
118
118
  item2_amount_of_money.currency_code = 'EUR'
119
119
 
120
120
  item2_invoice_data = Payment::LineItemInvoiceData.new
121
- item2_invoice_data.description = 'Asperin'
121
+ item2_invoice_data.description = 'Aspirin'
122
122
  item2_invoice_data.nr_of_items = '12'
123
123
  item2_invoice_data.price_per_item = 40
124
124
 
@@ -0,0 +1,30 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/factory'
6
+ require 'ingenico/connect/sdk/merchant/products/networks_params'
7
+
8
+ Products = Ingenico::Connect::SDK::Merchant::Products
9
+
10
+ def example
11
+ get_client do |client|
12
+ query = Products::NetworksParams.new
13
+ query.country_code = 'NL'
14
+ query.currency_code = 'EUR'
15
+ query.amount = 1000
16
+ query.is_recurring = true
17
+
18
+ response = client.merchant('merchantId').products().networks(320, query)
19
+ end
20
+ end
21
+
22
+ def get_client
23
+ api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
24
+ secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
25
+ configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
26
+ yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
27
+ ensure
28
+ # Free networking resources when done
29
+ client.close unless client.nil?
30
+ end
@@ -0,0 +1,22 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/factory'
6
+
7
+
8
+ def example
9
+ get_client do |client|
10
+ response = client.merchant('merchantId').products().public_key(320)
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
@@ -28,12 +28,12 @@ def example
28
28
  flight_leg1 = Definitions::AirlineFlightLeg.new
29
29
  flight_leg1.airline_class = '1'
30
30
  flight_leg1.arrival_airport = 'AMS'
31
- flight_leg1.carrier_code = '14'
31
+ flight_leg1.carrier_code = 'KL'
32
32
  flight_leg1.date = '20150102'
33
33
  flight_leg1.departure_time = '17:59'
34
34
  flight_leg1.fare = 'fare'
35
35
  flight_leg1.fare_basis = 'INTERNET'
36
- flight_leg1.flight_number = 'KL791'
36
+ flight_leg1.flight_number = '791'
37
37
  flight_leg1.number = 1
38
38
  flight_leg1.origin_airport = 'BCN'
39
39
  flight_leg1.stopover_code = 'non-permitted'
@@ -43,12 +43,12 @@ def example
43
43
  flight_leg2 = Definitions::AirlineFlightLeg.new
44
44
  flight_leg2.airline_class = '1'
45
45
  flight_leg2.arrival_airport = 'BCN'
46
- flight_leg2.carrier_code = '14'
46
+ flight_leg2.carrier_code = 'KL'
47
47
  flight_leg2.date = '20150102'
48
48
  flight_leg2.departure_time = '23:59'
49
49
  flight_leg2.fare = 'fare'
50
50
  flight_leg2.fare_basis = 'INTERNET'
51
- flight_leg2.flight_number = 'KL792'
51
+ flight_leg2.flight_number = '792'
52
52
  flight_leg2.number = 2
53
53
  flight_leg2.origin_airport = 'AMS'
54
54
  flight_leg2.stopover_code = 'non-permitted'
@@ -0,0 +1,32 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_ApprovePaymentMobilePaymentMethodSpecificOutput ApprovePaymentMobilePaymentMethodSpecificOutput}
12
+ class ApprovePaymentMobilePaymentMethodSpecificOutput < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :void_response_id
16
+
17
+ def to_h
18
+ hash = super
19
+ add_to_hash(hash, 'voidResponseId', @void_response_id)
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key?('voidResponseId')
26
+ @void_response_id = hash['voidResponseId']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_CancelPaymentMobilePaymentMethodSpecificOutput CancelPaymentMobilePaymentMethodSpecificOutput}
12
+ class CancelPaymentMobilePaymentMethodSpecificOutput < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :void_response_id
16
+
17
+ def to_h
18
+ hash = super
19
+ add_to_hash(hash, 'voidResponseId', @void_response_id)
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key?('voidResponseId')
26
+ @void_response_id = hash['voidResponseId']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -4,6 +4,7 @@
4
4
  #
5
5
  require 'ingenico/connect/sdk/data_object'
6
6
  require 'ingenico/connect/sdk/domain/payment/cancel_payment_card_payment_method_specific_output'
7
+ require 'ingenico/connect/sdk/domain/payment/cancel_payment_mobile_payment_method_specific_output'
7
8
  require 'ingenico/connect/sdk/domain/payment/payment'
8
9
 
9
10
  module Ingenico::Connect::SDK
@@ -16,12 +17,16 @@ module Ingenico::Connect::SDK
16
17
  # {Ingenico::Connect::SDK::Domain::Payment::CancelPaymentCardPaymentMethodSpecificOutput}
17
18
  attr_accessor :card_payment_method_specific_output
18
19
 
20
+ # {Ingenico::Connect::SDK::Domain::Payment::CancelPaymentMobilePaymentMethodSpecificOutput}
21
+ attr_accessor :mobile_payment_method_specific_output
22
+
19
23
  # {Ingenico::Connect::SDK::Domain::Payment::Payment}
20
24
  attr_accessor :payment
21
25
 
22
26
  def to_h
23
27
  hash = super
24
28
  add_to_hash(hash, 'cardPaymentMethodSpecificOutput', @card_payment_method_specific_output)
29
+ add_to_hash(hash, 'mobilePaymentMethodSpecificOutput', @mobile_payment_method_specific_output)
25
30
  add_to_hash(hash, 'payment', @payment)
26
31
  hash
27
32
  end
@@ -34,6 +39,12 @@ module Ingenico::Connect::SDK
34
39
  end
35
40
  @card_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::CancelPaymentCardPaymentMethodSpecificOutput.new_from_hash(hash['cardPaymentMethodSpecificOutput'])
36
41
  end
42
+ if hash.has_key?('mobilePaymentMethodSpecificOutput')
43
+ if !(hash['mobilePaymentMethodSpecificOutput'].is_a? Hash)
44
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']]
45
+ end
46
+ @mobile_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::CancelPaymentMobilePaymentMethodSpecificOutput.new_from_hash(hash['mobilePaymentMethodSpecificOutput'])
47
+ end
37
48
  if hash.has_key?('payment')
38
49
  if !(hash['payment'].is_a? Hash)
39
50
  raise TypeError, "value '%s' is not a Hash" % [hash['payment']]
@@ -11,12 +11,18 @@ module Ingenico::Connect::SDK
11
11
  # Class {https://developer.globalcollect.com/documentation/api/server/#schema_CardPaymentMethodSpecificInputBase CardPaymentMethodSpecificInputBase}
12
12
  class CardPaymentMethodSpecificInputBase < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
13
13
 
14
+ # String
15
+ attr_accessor :authorization_mode
16
+
14
17
  # String
15
18
  attr_accessor :customer_reference
16
19
 
17
20
  # String
18
21
  attr_accessor :recurring_payment_sequence_indicator
19
22
 
23
+ # true/false
24
+ attr_accessor :requires_approval
25
+
20
26
  # true/false
21
27
  attr_accessor :skip_authentication
22
28
 
@@ -28,8 +34,10 @@ module Ingenico::Connect::SDK
28
34
 
29
35
  def to_h
30
36
  hash = super
37
+ add_to_hash(hash, 'authorizationMode', @authorization_mode)
31
38
  add_to_hash(hash, 'customerReference', @customer_reference)
32
39
  add_to_hash(hash, 'recurringPaymentSequenceIndicator', @recurring_payment_sequence_indicator)
40
+ add_to_hash(hash, 'requiresApproval', @requires_approval)
33
41
  add_to_hash(hash, 'skipAuthentication', @skip_authentication)
34
42
  add_to_hash(hash, 'skipFraudService', @skip_fraud_service)
35
43
  add_to_hash(hash, 'token', @token)
@@ -38,12 +46,18 @@ module Ingenico::Connect::SDK
38
46
 
39
47
  def from_hash(hash)
40
48
  super
49
+ if hash.has_key?('authorizationMode')
50
+ @authorization_mode = hash['authorizationMode']
51
+ end
41
52
  if hash.has_key?('customerReference')
42
53
  @customer_reference = hash['customerReference']
43
54
  end
44
55
  if hash.has_key?('recurringPaymentSequenceIndicator')
45
56
  @recurring_payment_sequence_indicator = hash['recurringPaymentSequenceIndicator']
46
57
  end
58
+ if hash.has_key?('requiresApproval')
59
+ @requires_approval = hash['requiresApproval']
60
+ end
47
61
  if hash.has_key?('skipAuthentication')
48
62
  @skip_authentication = hash['skipAuthentication']
49
63
  end
@@ -8,6 +8,7 @@ require 'ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specif
8
8
  require 'ingenico/connect/sdk/domain/payment/card_payment_method_specific_input'
9
9
  require 'ingenico/connect/sdk/domain/payment/cash_payment_method_specific_input'
10
10
  require 'ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_input'
11
+ require 'ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input'
11
12
  require 'ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input'
12
13
  require 'ingenico/connect/sdk/domain/payment/order'
13
14
  require 'ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_input'
@@ -41,6 +42,9 @@ module Ingenico::Connect::SDK
41
42
  # {Ingenico::Connect::SDK::Domain::Payment::InvoicePaymentMethodSpecificInput}
42
43
  attr_accessor :invoice_payment_method_specific_input
43
44
 
45
+ # {Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificInput}
46
+ attr_accessor :mobile_payment_method_specific_input
47
+
44
48
  # {Ingenico::Connect::SDK::Domain::Payment::Order}
45
49
  attr_accessor :order
46
50
 
@@ -59,6 +63,7 @@ module Ingenico::Connect::SDK
59
63
  add_to_hash(hash, 'encryptedCustomerInput', @encrypted_customer_input)
60
64
  add_to_hash(hash, 'fraudFields', @fraud_fields)
61
65
  add_to_hash(hash, 'invoicePaymentMethodSpecificInput', @invoice_payment_method_specific_input)
66
+ add_to_hash(hash, 'mobilePaymentMethodSpecificInput', @mobile_payment_method_specific_input)
62
67
  add_to_hash(hash, 'order', @order)
63
68
  add_to_hash(hash, 'redirectPaymentMethodSpecificInput', @redirect_payment_method_specific_input)
64
69
  add_to_hash(hash, 'sepaDirectDebitPaymentMethodSpecificInput', @sepa_direct_debit_payment_method_specific_input)
@@ -106,6 +111,12 @@ module Ingenico::Connect::SDK
106
111
  end
107
112
  @invoice_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::InvoicePaymentMethodSpecificInput.new_from_hash(hash['invoicePaymentMethodSpecificInput'])
108
113
  end
114
+ if hash.has_key?('mobilePaymentMethodSpecificInput')
115
+ if !(hash['mobilePaymentMethodSpecificInput'].is_a? Hash)
116
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificInput']]
117
+ end
118
+ @mobile_payment_method_specific_input = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificInput.new_from_hash(hash['mobilePaymentMethodSpecificInput'])
119
+ end
109
120
  if hash.has_key?('order')
110
121
  if !(hash['order'].is_a? Hash)
111
122
  raise TypeError, "value '%s' is not a Hash" % [hash['order']]
@@ -0,0 +1,60 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_DecryptedPaymentData DecryptedPaymentData}
12
+ class DecryptedPaymentData < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :cardholder_name
16
+
17
+ # String
18
+ attr_accessor :cryptogram
19
+
20
+ # String
21
+ attr_accessor :dpan
22
+
23
+ # Integer
24
+ attr_accessor :eci
25
+
26
+ # String
27
+ attr_accessor :expiry_date
28
+
29
+ def to_h
30
+ hash = super
31
+ add_to_hash(hash, 'cardholderName', @cardholder_name)
32
+ add_to_hash(hash, 'cryptogram', @cryptogram)
33
+ add_to_hash(hash, 'dpan', @dpan)
34
+ add_to_hash(hash, 'eci', @eci)
35
+ add_to_hash(hash, 'expiryDate', @expiry_date)
36
+ hash
37
+ end
38
+
39
+ def from_hash(hash)
40
+ super
41
+ if hash.has_key?('cardholderName')
42
+ @cardholder_name = hash['cardholderName']
43
+ end
44
+ if hash.has_key?('cryptogram')
45
+ @cryptogram = hash['cryptogram']
46
+ end
47
+ if hash.has_key?('dpan')
48
+ @dpan = hash['dpan']
49
+ end
50
+ if hash.has_key?('eci')
51
+ @eci = hash['eci']
52
+ end
53
+ if hash.has_key?('expiryDate')
54
+ @expiry_date = hash['expiryDate']
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,39 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentData MobilePaymentData}
12
+ class MobilePaymentData < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :dpan
16
+
17
+ # String
18
+ attr_accessor :expiry_date
19
+
20
+ def to_h
21
+ hash = super
22
+ add_to_hash(hash, 'dpan', @dpan)
23
+ add_to_hash(hash, 'expiryDate', @expiry_date)
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.has_key?('dpan')
30
+ @dpan = hash['dpan']
31
+ end
32
+ if hash.has_key?('expiryDate')
33
+ @expiry_date = hash['expiryDate']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,82 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/domain/definitions/abstract_payment_method_specific_input'
6
+ require 'ingenico/connect/sdk/domain/payment/decrypted_payment_data'
7
+ require 'ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input'
8
+
9
+ module Ingenico::Connect::SDK
10
+ module Domain
11
+ module Payment
12
+
13
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentMethodSpecificInput MobilePaymentMethodSpecificInput}
14
+ class MobilePaymentMethodSpecificInput < Ingenico::Connect::SDK::Domain::Definitions::AbstractPaymentMethodSpecificInput
15
+
16
+ # String
17
+ attr_accessor :authorization_mode
18
+
19
+ # {Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData}
20
+ attr_accessor :decrypted_payment_data
21
+
22
+ # String
23
+ attr_accessor :encrypted_payment_data
24
+
25
+ # {Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput}
26
+ attr_accessor :payment_product320_specific_input
27
+
28
+ # true/false
29
+ attr_accessor :requires_approval
30
+
31
+ # true/false
32
+ attr_accessor :skip_fraud_service
33
+
34
+ # String
35
+ attr_accessor :transaction_id
36
+
37
+ def to_h
38
+ hash = super
39
+ add_to_hash(hash, 'authorizationMode', @authorization_mode)
40
+ add_to_hash(hash, 'decryptedPaymentData', @decrypted_payment_data)
41
+ add_to_hash(hash, 'encryptedPaymentData', @encrypted_payment_data)
42
+ add_to_hash(hash, 'paymentProduct320SpecificInput', @payment_product320_specific_input)
43
+ add_to_hash(hash, 'requiresApproval', @requires_approval)
44
+ add_to_hash(hash, 'skipFraudService', @skip_fraud_service)
45
+ add_to_hash(hash, 'transactionId', @transaction_id)
46
+ hash
47
+ end
48
+
49
+ def from_hash(hash)
50
+ super
51
+ if hash.has_key?('authorizationMode')
52
+ @authorization_mode = hash['authorizationMode']
53
+ end
54
+ if hash.has_key?('decryptedPaymentData')
55
+ if !(hash['decryptedPaymentData'].is_a? Hash)
56
+ raise TypeError, "value '%s' is not a Hash" % [hash['decryptedPaymentData']]
57
+ end
58
+ @decrypted_payment_data = Ingenico::Connect::SDK::Domain::Payment::DecryptedPaymentData.new_from_hash(hash['decryptedPaymentData'])
59
+ end
60
+ if hash.has_key?('encryptedPaymentData')
61
+ @encrypted_payment_data = hash['encryptedPaymentData']
62
+ end
63
+ if hash.has_key?('paymentProduct320SpecificInput')
64
+ if !(hash['paymentProduct320SpecificInput'].is_a? Hash)
65
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentProduct320SpecificInput']]
66
+ end
67
+ @payment_product320_specific_input = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentProduct320SpecificInput.new_from_hash(hash['paymentProduct320SpecificInput'])
68
+ end
69
+ if hash.has_key?('requiresApproval')
70
+ @requires_approval = hash['requiresApproval']
71
+ end
72
+ if hash.has_key?('skipFraudService')
73
+ @skip_fraud_service = hash['skipFraudService']
74
+ end
75
+ if hash.has_key?('transactionId')
76
+ @transaction_id = hash['transactionId']
77
+ end
78
+ end
79
+ end
80
+ end
81
+ end
82
+ end
@@ -0,0 +1,72 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/domain/definitions/card_fraud_results'
6
+ require 'ingenico/connect/sdk/domain/payment/abstract_payment_method_specific_output'
7
+ require 'ingenico/connect/sdk/domain/payment/mobile_payment_data'
8
+ require 'ingenico/connect/sdk/domain/payment/three_d_secure_results'
9
+
10
+ module Ingenico::Connect::SDK
11
+ module Domain
12
+ module Payment
13
+
14
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentMethodSpecificOutput MobilePaymentMethodSpecificOutput}
15
+ class MobilePaymentMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Payment::AbstractPaymentMethodSpecificOutput
16
+
17
+ # String
18
+ attr_accessor :authorisation_code
19
+
20
+ # {Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults}
21
+ attr_accessor :fraud_results
22
+
23
+ # String
24
+ attr_accessor :network
25
+
26
+ # {Ingenico::Connect::SDK::Domain::Payment::MobilePaymentData}
27
+ attr_accessor :payment_data
28
+
29
+ # {Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureResults}
30
+ attr_accessor :three_d_secure_results
31
+
32
+ def to_h
33
+ hash = super
34
+ add_to_hash(hash, 'authorisationCode', @authorisation_code)
35
+ add_to_hash(hash, 'fraudResults', @fraud_results)
36
+ add_to_hash(hash, 'network', @network)
37
+ add_to_hash(hash, 'paymentData', @payment_data)
38
+ add_to_hash(hash, 'threeDSecureResults', @three_d_secure_results)
39
+ hash
40
+ end
41
+
42
+ def from_hash(hash)
43
+ super
44
+ if hash.has_key?('authorisationCode')
45
+ @authorisation_code = hash['authorisationCode']
46
+ end
47
+ if hash.has_key?('fraudResults')
48
+ if !(hash['fraudResults'].is_a? Hash)
49
+ raise TypeError, "value '%s' is not a Hash" % [hash['fraudResults']]
50
+ end
51
+ @fraud_results = Ingenico::Connect::SDK::Domain::Definitions::CardFraudResults.new_from_hash(hash['fraudResults'])
52
+ end
53
+ if hash.has_key?('network')
54
+ @network = hash['network']
55
+ end
56
+ if hash.has_key?('paymentData')
57
+ if !(hash['paymentData'].is_a? Hash)
58
+ raise TypeError, "value '%s' is not a Hash" % [hash['paymentData']]
59
+ end
60
+ @payment_data = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentData.new_from_hash(hash['paymentData'])
61
+ end
62
+ if hash.has_key?('threeDSecureResults')
63
+ if !(hash['threeDSecureResults'].is_a? Hash)
64
+ raise TypeError, "value '%s' is not a Hash" % [hash['threeDSecureResults']]
65
+ end
66
+ @three_d_secure_results = Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureResults.new_from_hash(hash['threeDSecureResults'])
67
+ end
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,32 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_MobilePaymentProduct320SpecificInput MobilePaymentProduct320SpecificInput}
12
+ class MobilePaymentProduct320SpecificInput < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :key_id
16
+
17
+ def to_h
18
+ hash = super
19
+ add_to_hash(hash, 'keyId', @key_id)
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key?('keyId')
26
+ @key_id = hash['keyId']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -4,6 +4,7 @@
4
4
  #
5
5
  require 'ingenico/connect/sdk/data_object'
6
6
  require 'ingenico/connect/sdk/domain/payment/approve_payment_card_payment_method_specific_output'
7
+ require 'ingenico/connect/sdk/domain/payment/approve_payment_mobile_payment_method_specific_output'
7
8
  require 'ingenico/connect/sdk/domain/payment/payment'
8
9
 
9
10
  module Ingenico::Connect::SDK
@@ -13,14 +14,24 @@ module Ingenico::Connect::SDK
13
14
  # Class {https://developer.globalcollect.com/documentation/api/server/#schema_PaymentApprovalResponse PaymentApprovalResponse}
14
15
  class PaymentApprovalResponse < Ingenico::Connect::SDK::DataObject
15
16
 
17
+ # {Ingenico::Connect::SDK::Domain::Payment::ApprovePaymentCardPaymentMethodSpecificOutput}
18
+ attr_accessor :card_payment_method_specific_output
19
+
20
+ # {Ingenico::Connect::SDK::Domain::Payment::ApprovePaymentMobilePaymentMethodSpecificOutput}
21
+ attr_accessor :mobile_payment_method_specific_output
22
+
16
23
  # {Ingenico::Connect::SDK::Domain::Payment::Payment}
17
24
  attr_accessor :payment
18
25
 
19
26
  # {Ingenico::Connect::SDK::Domain::Payment::ApprovePaymentCardPaymentMethodSpecificOutput}
27
+ #
28
+ # Deprecated; Use cardPaymentMethodSpecificOutput instead
20
29
  attr_accessor :payment_method_specific_output
21
30
 
22
31
  def to_h
23
32
  hash = super
33
+ add_to_hash(hash, 'cardPaymentMethodSpecificOutput', @card_payment_method_specific_output)
34
+ add_to_hash(hash, 'mobilePaymentMethodSpecificOutput', @mobile_payment_method_specific_output)
24
35
  add_to_hash(hash, 'payment', @payment)
25
36
  add_to_hash(hash, 'paymentMethodSpecificOutput', @payment_method_specific_output)
26
37
  hash
@@ -28,6 +39,18 @@ module Ingenico::Connect::SDK
28
39
 
29
40
  def from_hash(hash)
30
41
  super
42
+ if hash.has_key?('cardPaymentMethodSpecificOutput')
43
+ if !(hash['cardPaymentMethodSpecificOutput'].is_a? Hash)
44
+ raise TypeError, "value '%s' is not a Hash" % [hash['cardPaymentMethodSpecificOutput']]
45
+ end
46
+ @card_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::ApprovePaymentCardPaymentMethodSpecificOutput.new_from_hash(hash['cardPaymentMethodSpecificOutput'])
47
+ end
48
+ if hash.has_key?('mobilePaymentMethodSpecificOutput')
49
+ if !(hash['mobilePaymentMethodSpecificOutput'].is_a? Hash)
50
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']]
51
+ end
52
+ @mobile_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::ApprovePaymentMobilePaymentMethodSpecificOutput.new_from_hash(hash['mobilePaymentMethodSpecificOutput'])
53
+ end
31
54
  if hash.has_key?('payment')
32
55
  if !(hash['payment'].is_a? Hash)
33
56
  raise TypeError, "value '%s' is not a Hash" % [hash['payment']]
@@ -6,6 +6,7 @@ require 'ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specif
6
6
  require 'ingenico/connect/sdk/domain/payment/card_payment_method_specific_output'
7
7
  require 'ingenico/connect/sdk/domain/payment/cash_payment_method_specific_output'
8
8
  require 'ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_output'
9
+ require 'ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_output'
9
10
  require 'ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_output'
10
11
  require 'ingenico/connect/sdk/domain/payment/order_output'
11
12
  require 'ingenico/connect/sdk/domain/payment/redirect_payment_method_specific_output'
@@ -36,6 +37,9 @@ module Ingenico::Connect::SDK
36
37
  # {Ingenico::Connect::SDK::Domain::Payment::InvoicePaymentMethodSpecificOutput}
37
38
  attr_accessor :invoice_payment_method_specific_output
38
39
 
40
+ # {Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificOutput}
41
+ attr_accessor :mobile_payment_method_specific_output
42
+
39
43
  # String
40
44
  attr_accessor :payment_method
41
45
 
@@ -53,6 +57,7 @@ module Ingenico::Connect::SDK
53
57
  add_to_hash(hash, 'cashPaymentMethodSpecificOutput', @cash_payment_method_specific_output)
54
58
  add_to_hash(hash, 'directDebitPaymentMethodSpecificOutput', @direct_debit_payment_method_specific_output)
55
59
  add_to_hash(hash, 'invoicePaymentMethodSpecificOutput', @invoice_payment_method_specific_output)
60
+ add_to_hash(hash, 'mobilePaymentMethodSpecificOutput', @mobile_payment_method_specific_output)
56
61
  add_to_hash(hash, 'paymentMethod', @payment_method)
57
62
  add_to_hash(hash, 'redirectPaymentMethodSpecificOutput', @redirect_payment_method_specific_output)
58
63
  add_to_hash(hash, 'sepaDirectDebitPaymentMethodSpecificOutput', @sepa_direct_debit_payment_method_specific_output)
@@ -94,6 +99,12 @@ module Ingenico::Connect::SDK
94
99
  end
95
100
  @invoice_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::InvoicePaymentMethodSpecificOutput.new_from_hash(hash['invoicePaymentMethodSpecificOutput'])
96
101
  end
102
+ if hash.has_key?('mobilePaymentMethodSpecificOutput')
103
+ if !(hash['mobilePaymentMethodSpecificOutput'].is_a? Hash)
104
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobilePaymentMethodSpecificOutput']]
105
+ end
106
+ @mobile_payment_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::MobilePaymentMethodSpecificOutput.new_from_hash(hash['mobilePaymentMethodSpecificOutput'])
107
+ end
97
108
  if hash.has_key?('paymentMethod')
98
109
  @payment_method = hash['paymentMethod']
99
110
  end
@@ -0,0 +1,32 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/domain/payment/refund_method_specific_output'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Payment
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_RefundMobileMethodSpecificOutput RefundMobileMethodSpecificOutput}
12
+ class RefundMobileMethodSpecificOutput < Ingenico::Connect::SDK::Domain::Payment::RefundMethodSpecificOutput
13
+
14
+ # String
15
+ attr_accessor :network
16
+
17
+ def to_h
18
+ hash = super
19
+ add_to_hash(hash, 'network', @network)
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key?('network')
26
+ @network = hash['network']
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -6,6 +6,7 @@ require 'ingenico/connect/sdk/domain/payment/order_output'
6
6
  require 'ingenico/connect/sdk/domain/payment/refund_bank_method_specific_output'
7
7
  require 'ingenico/connect/sdk/domain/payment/refund_card_method_specific_output'
8
8
  require 'ingenico/connect/sdk/domain/payment/refund_e_wallet_method_specific_output'
9
+ require 'ingenico/connect/sdk/domain/payment/refund_mobile_method_specific_output'
9
10
 
10
11
  module Ingenico::Connect::SDK
11
12
  module Domain
@@ -26,6 +27,9 @@ module Ingenico::Connect::SDK
26
27
  # {Ingenico::Connect::SDK::Domain::Payment::RefundEWalletMethodSpecificOutput}
27
28
  attr_accessor :e_wallet_refund_method_specific_output
28
29
 
30
+ # {Ingenico::Connect::SDK::Domain::Payment::RefundMobileMethodSpecificOutput}
31
+ attr_accessor :mobile_refund_method_specific_output
32
+
29
33
  # String
30
34
  attr_accessor :payment_method
31
35
 
@@ -35,6 +39,7 @@ module Ingenico::Connect::SDK
35
39
  add_to_hash(hash, 'bankRefundMethodSpecificOutput', @bank_refund_method_specific_output)
36
40
  add_to_hash(hash, 'cardRefundMethodSpecificOutput', @card_refund_method_specific_output)
37
41
  add_to_hash(hash, 'eWalletRefundMethodSpecificOutput', @e_wallet_refund_method_specific_output)
42
+ add_to_hash(hash, 'mobileRefundMethodSpecificOutput', @mobile_refund_method_specific_output)
38
43
  add_to_hash(hash, 'paymentMethod', @payment_method)
39
44
  hash
40
45
  end
@@ -62,6 +67,12 @@ module Ingenico::Connect::SDK
62
67
  end
63
68
  @e_wallet_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundEWalletMethodSpecificOutput.new_from_hash(hash['eWalletRefundMethodSpecificOutput'])
64
69
  end
70
+ if hash.has_key?('mobileRefundMethodSpecificOutput')
71
+ if !(hash['mobileRefundMethodSpecificOutput'].is_a? Hash)
72
+ raise TypeError, "value '%s' is not a Hash" % [hash['mobileRefundMethodSpecificOutput']]
73
+ end
74
+ @mobile_refund_method_specific_output = Ingenico::Connect::SDK::Domain::Payment::RefundMobileMethodSpecificOutput.new_from_hash(hash['mobileRefundMethodSpecificOutput'])
75
+ end
65
76
  if hash.has_key?('paymentMethod')
66
77
  @payment_method = hash['paymentMethod']
67
78
  end
@@ -0,0 +1,38 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Product
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_PaymentProductNetworksResponse PaymentProductNetworksResponse}
12
+ class PaymentProductNetworksResponse < Ingenico::Connect::SDK::DataObject
13
+
14
+ # Array of String
15
+ attr_accessor :networks
16
+
17
+ def to_h
18
+ hash = super
19
+ add_to_hash(hash, 'networks', @networks)
20
+ hash
21
+ end
22
+
23
+ def from_hash(hash)
24
+ super
25
+ if hash.has_key?('networks')
26
+ if !(hash['networks'].is_a? Array)
27
+ raise TypeError, "value '%s' is not an Array" % [hash['networks']]
28
+ end
29
+ @networks = []
30
+ hash['networks'].each do |e|
31
+ @networks << e
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,39 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/data_object'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Domain
9
+ module Publickey
10
+
11
+ # Class {https://developer.globalcollect.com/documentation/api/server/#schema_PublicKey PublicKey}
12
+ class PublicKey < Ingenico::Connect::SDK::DataObject
13
+
14
+ # String
15
+ attr_accessor :key_id
16
+
17
+ # String
18
+ attr_accessor :public_key
19
+
20
+ def to_h
21
+ hash = super
22
+ add_to_hash(hash, 'keyId', @key_id)
23
+ add_to_hash(hash, 'publicKey', @public_key)
24
+ hash
25
+ end
26
+
27
+ def from_hash(hash)
28
+ super
29
+ if hash.has_key?('keyId')
30
+ @key_id = hash['keyId']
31
+ end
32
+ if hash.has_key?('publicKey')
33
+ @public_key = hash['publicKey']
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,39 @@
1
+ #
2
+ # This class was auto-generated from the API references found at
3
+ # https://developer.globalcollect.com/documentation/api/server/
4
+ #
5
+ require 'ingenico/connect/sdk/param_request'
6
+
7
+ module Ingenico::Connect::SDK
8
+ module Merchant
9
+ module Products
10
+
11
+ # Query parameters for {https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__networks_get Get payment product networks}
12
+ class NetworksParams < Ingenico::Connect::SDK::ParamRequest
13
+
14
+ # String
15
+ attr_accessor :country_code
16
+
17
+ # String
18
+ attr_accessor :currency_code
19
+
20
+ # Integer
21
+ attr_accessor :amount
22
+
23
+ # true/false
24
+ attr_accessor :is_recurring
25
+ attr_accessor :country_code, :currency_code, :amount, :is_recurring
26
+
27
+ # Returns an Array of {Ingenico::Connect::SDK::RequestParam} objects representing the attributes of this class
28
+ def to_request_parameters
29
+ result = []
30
+ add_parameter(result, 'countryCode', @country_code)
31
+ add_parameter(result, 'currencyCode', @currency_code)
32
+ add_parameter(result, 'amount', @amount)
33
+ add_parameter(result, 'isRecurring', @is_recurring)
34
+ result
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -6,8 +6,10 @@ require 'ingenico/connect/sdk/api_resource'
6
6
  require 'ingenico/connect/sdk/response_exception'
7
7
  require 'ingenico/connect/sdk/domain/errors/error_response'
8
8
  require 'ingenico/connect/sdk/domain/product/directory'
9
+ require 'ingenico/connect/sdk/domain/product/payment_product_networks_response'
9
10
  require 'ingenico/connect/sdk/domain/product/payment_product_response'
10
11
  require 'ingenico/connect/sdk/domain/product/payment_products'
12
+ require 'ingenico/connect/sdk/domain/publickey/public_key'
11
13
 
12
14
  module Ingenico::Connect::SDK
13
15
  module Merchant
@@ -118,6 +120,75 @@ module Ingenico::Connect::SDK
118
120
  error_object = @communicator.marshaller.unmarshal(e.body, error_type)
119
121
  raise create_exception(e.status_code, e.body, error_object, context)
120
122
  end
123
+
124
+ # Resource /{{merchantId}}/products/{{paymentProductId}}/networks
125
+ #
126
+ # {https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__networks_get Get payment product networks}
127
+ # payment_product_id:: Integer
128
+ # query:: {Ingenico::Connect::SDK::Merchant::Products::NetworksParams}
129
+ # context:: {Ingenico::Connect::SDK::CallContext}
130
+ # Returns:: {Ingenico::Connect::SDK::Domain::Product::PaymentProductNetworksResponse}
131
+ # Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
132
+ # Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
133
+ # Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
134
+ # Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
135
+ # or there was a conflict (HTTP status code 404, 409 or 410)
136
+ # Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the GlobalCollect platform,
137
+ # the GlobalCollect platform was unable to process a message from a downstream partner/acquirer,
138
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
139
+ # Raises:: {Ingenico::Connect::SDK::ApiException} if the GlobalCollect platform returned any other error
140
+ def networks(payment_product_id, query, context=nil)
141
+ path_context = {
142
+ 'paymentProductId' => payment_product_id.to_s,
143
+ }
144
+ uri = instantiate_uri('/{apiVersion}/{merchantId}/products/{paymentProductId}/networks', path_context)
145
+ return @communicator.get(
146
+ uri,
147
+ client_headers,
148
+ query,
149
+ Ingenico::Connect::SDK::Domain::Product::PaymentProductNetworksResponse,
150
+ context)
151
+ rescue ResponseException => e
152
+ error_type = {
153
+ 404 => Ingenico::Connect::SDK::Domain::Errors::ErrorResponse,
154
+ }.fetch(e.status_code, Ingenico::Connect::SDK::Domain::Errors::ErrorResponse)
155
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
156
+ raise create_exception(e.status_code, e.body, error_object, context)
157
+ end
158
+
159
+ # Resource /{{merchantId}}/products/{{paymentProductId}}/publicKey
160
+ #
161
+ # {https://developer.globalcollect.com/documentation/api/server/#__merchantId__products__paymentProductId__publicKey_get Get payment product specific public key}
162
+ # payment_product_id:: Integer
163
+ # context:: {Ingenico::Connect::SDK::CallContext}
164
+ # Returns:: {Ingenico::Connect::SDK::Domain::Publickey::PublicKey}
165
+ # Raises:: {Ingenico::Connect::SDK::ValidationException} if the request was not correct and couldn't be processed (HTTP status code 400)
166
+ # Raises:: {Ingenico::Connect::SDK::AuthorizationException} if the request was not allowed (HTTP status code 403)
167
+ # Raises:: {Ingenico::Connect::SDK::IdempotenceException} if an idempotent request caused a conflict (HTTP status code 409)
168
+ # Raises:: {Ingenico::Connect::SDK::ReferenceException} if an object was attempted to be referenced that doesn't exist or has been removed,
169
+ # or there was a conflict (HTTP status code 404, 409 or 410)
170
+ # Raises:: {Ingenico::Connect::SDK::GlobalCollectException} if something went wrong at the GlobalCollect platform,
171
+ # the GlobalCollect platform was unable to process a message from a downstream partner/acquirer,
172
+ # or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
173
+ # Raises:: {Ingenico::Connect::SDK::ApiException} if the GlobalCollect platform returned any other error
174
+ def public_key(payment_product_id, context=nil)
175
+ path_context = {
176
+ 'paymentProductId' => payment_product_id.to_s,
177
+ }
178
+ uri = instantiate_uri('/{apiVersion}/{merchantId}/products/{paymentProductId}/publicKey', path_context)
179
+ return @communicator.get(
180
+ uri,
181
+ client_headers,
182
+ nil,
183
+ Ingenico::Connect::SDK::Domain::Publickey::PublicKey,
184
+ context)
185
+ rescue ResponseException => e
186
+ error_type = {
187
+ 404 => Ingenico::Connect::SDK::Domain::Errors::ErrorResponse,
188
+ }.fetch(e.status_code, Ingenico::Connect::SDK::Domain::Errors::ErrorResponse)
189
+ error_object = @communicator.marshaller.unmarshal(e.body, error_type)
190
+ raise create_exception(e.status_code, e.body, error_object, context)
191
+ end
121
192
  end
122
193
  end
123
194
  end
@@ -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.0.0'
8
+ @@SDK_VERSION = '1.1.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
@@ -116,6 +116,10 @@ end
116
116
  module Ingenico::Connect::SDK::Domain::Token
117
117
  end
118
118
 
119
+ # Contains data classes that are used for cryptography services.
120
+ module Ingenico::Connect::SDK::Domain::Publickey
121
+ end
122
+
119
123
  # Contains the general data classes that are used in multiple different types of requests.
120
124
  # These classes can be serialized and used in communication with the GlobalCollect platform.
121
125
  module Ingenico::Connect::SDK::Domain::Definitions
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.0.0
4
+ version: 1.1.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: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
@@ -126,7 +126,9 @@ files:
126
126
  - examples/merchant/productgroups/get_payment_product_group_example.rb
127
127
  - examples/merchant/productgroups/get_payment_product_groups_example.rb
128
128
  - examples/merchant/products/get_directory_example.rb
129
+ - examples/merchant/products/get_networks_example.rb
129
130
  - examples/merchant/products/get_payment_product_example.rb
131
+ - examples/merchant/products/get_payment_product_public_key_example.rb
130
132
  - examples/merchant/products/get_payment_products_example.rb
131
133
  - examples/merchant/refunds/approve_refund_example.rb
132
134
  - examples/merchant/refunds/cancel_approval_refund_example.rb
@@ -207,6 +209,7 @@ files:
207
209
  - lib/ingenico/connect/sdk/domain/payment/additional_order_input.rb
208
210
  - lib/ingenico/connect/sdk/domain/payment/address_personal.rb
209
211
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_card_payment_method_specific_output.rb
212
+ - lib/ingenico/connect/sdk/domain/payment/approve_payment_mobile_payment_method_specific_output.rb
210
213
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_non_sepa_direct_debit_payment_method_specific_input.rb
211
214
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_payment_method_specific_input.rb
212
215
  - lib/ingenico/connect/sdk/domain/payment/approve_payment_request.rb
@@ -216,6 +219,7 @@ files:
216
219
  - lib/ingenico/connect/sdk/domain/payment/bank_transfer_payment_method_specific_output.rb
217
220
  - lib/ingenico/connect/sdk/domain/payment/cancel_approval_payment_response.rb
218
221
  - lib/ingenico/connect/sdk/domain/payment/cancel_payment_card_payment_method_specific_output.rb
222
+ - lib/ingenico/connect/sdk/domain/payment/cancel_payment_mobile_payment_method_specific_output.rb
219
223
  - lib/ingenico/connect/sdk/domain/payment/cancel_payment_response.rb
220
224
  - lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input.rb
221
225
  - lib/ingenico/connect/sdk/domain/payment/card_payment_method_specific_input_base.rb
@@ -230,6 +234,7 @@ files:
230
234
  - lib/ingenico/connect/sdk/domain/payment/create_payment_response.rb
231
235
  - lib/ingenico/connect/sdk/domain/payment/create_payment_result.rb
232
236
  - lib/ingenico/connect/sdk/domain/payment/customer.rb
237
+ - lib/ingenico/connect/sdk/domain/payment/decrypted_payment_data.rb
233
238
  - lib/ingenico/connect/sdk/domain/payment/external_cardholder_authentication_data.rb
234
239
  - lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_input.rb
235
240
  - lib/ingenico/connect/sdk/domain/payment/invoice_payment_method_specific_output.rb
@@ -238,6 +243,10 @@ files:
238
243
  - lib/ingenico/connect/sdk/domain/payment/line_item_invoice_data.rb
239
244
  - lib/ingenico/connect/sdk/domain/payment/line_item_level3_interchange_information.rb
240
245
  - lib/ingenico/connect/sdk/domain/payment/merchant_action.rb
246
+ - lib/ingenico/connect/sdk/domain/payment/mobile_payment_data.rb
247
+ - lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_input.rb
248
+ - lib/ingenico/connect/sdk/domain/payment/mobile_payment_method_specific_output.rb
249
+ - lib/ingenico/connect/sdk/domain/payment/mobile_payment_product320_specific_input.rb
241
250
  - lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_input.rb
242
251
  - lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_method_specific_output.rb
243
252
  - lib/ingenico/connect/sdk/domain/payment/non_sepa_direct_debit_payment_product705_specific_input.rb
@@ -273,6 +282,7 @@ files:
273
282
  - lib/ingenico/connect/sdk/domain/payment/refund_card_method_specific_output.rb
274
283
  - lib/ingenico/connect/sdk/domain/payment/refund_e_wallet_method_specific_output.rb
275
284
  - lib/ingenico/connect/sdk/domain/payment/refund_method_specific_output.rb
285
+ - lib/ingenico/connect/sdk/domain/payment/refund_mobile_method_specific_output.rb
276
286
  - lib/ingenico/connect/sdk/domain/payment/refund_output.rb
277
287
  - lib/ingenico/connect/sdk/domain/payment/refund_payment_product840_customer_account.rb
278
288
  - lib/ingenico/connect/sdk/domain/payment/refund_payment_product840_specific_output.rb
@@ -307,11 +317,13 @@ files:
307
317
  - lib/ingenico/connect/sdk/domain/product/payment_product_group.rb
308
318
  - lib/ingenico/connect/sdk/domain/product/payment_product_group_response.rb
309
319
  - lib/ingenico/connect/sdk/domain/product/payment_product_groups.rb
320
+ - lib/ingenico/connect/sdk/domain/product/payment_product_networks_response.rb
310
321
  - lib/ingenico/connect/sdk/domain/product/payment_product_response.rb
311
322
  - lib/ingenico/connect/sdk/domain/product/payment_products.rb
312
323
  - lib/ingenico/connect/sdk/domain/product/range_validator.rb
313
324
  - lib/ingenico/connect/sdk/domain/product/regular_expression_validator.rb
314
325
  - lib/ingenico/connect/sdk/domain/product/value_mapping_element.rb
326
+ - lib/ingenico/connect/sdk/domain/publickey/public_key.rb
315
327
  - lib/ingenico/connect/sdk/domain/refund/approve_refund_request.rb
316
328
  - lib/ingenico/connect/sdk/domain/refund/bank_account_bban_refund.rb
317
329
  - lib/ingenico/connect/sdk/domain/refund/bank_refund_method_specific_input.rb
@@ -395,6 +407,7 @@ files:
395
407
  - lib/ingenico/connect/sdk/merchant/products/directory_params.rb
396
408
  - lib/ingenico/connect/sdk/merchant/products/find_products_params.rb
397
409
  - lib/ingenico/connect/sdk/merchant/products/get_product_params.rb
410
+ - lib/ingenico/connect/sdk/merchant/products/networks_params.rb
398
411
  - lib/ingenico/connect/sdk/merchant/products/products_client.rb
399
412
  - lib/ingenico/connect/sdk/merchant/refunds/refunds_client.rb
400
413
  - lib/ingenico/connect/sdk/merchant/riskassessments/riskassessments_client.rb
@@ -497,7 +510,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
497
510
  version: '0'
498
511
  requirements: []
499
512
  rubyforge_project:
500
- rubygems_version: 2.5.1
513
+ rubygems_version: 2.2.2
501
514
  signing_key:
502
515
  specification_version: 4
503
516
  summary: SDK to communicate with the GlobalCollect platform using the Ingenico Connect