checkout_sdk 1.1.4 → 1.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 614d4fcde0357737a39ce3468a80f424074e274ad012208e46286c09bda84ded
4
- data.tar.gz: 70c2915a4de35657359cbef87805249766e7ce88caad1806b3e71f1b3a7b71a9
3
+ metadata.gz: bd0bda6ae88b783a419a908bda378b4f88da4fd067e48633e6c0e8ff7e9ffcd5
4
+ data.tar.gz: e9b88917a378973ec8c7154a6929647d419e4e0e0e20cd343d3e03897b81fc18
5
5
  SHA512:
6
- metadata.gz: f06299d70b3b3a0c629689124dcdd09a7f2b16d15b7f966a0c43b5e1031c0c37d1f5bd8815b7857522cf46d18ad084edba3aa432b936977a9fd11b466b75f552
7
- data.tar.gz: 1e487e77197073878b170db9fcee2488b0955a48161a784ca356ff84245f270af5177b496602f777888181dbcebff61ae417206565c5314d63b79e3d0c999bed
6
+ metadata.gz: d2c55bb4d0ea1799a2cb5bef18a1a6a1439f7f36d16d78726b19d0a65542360059a977ef773843b4c6719d433cef1e2a597085dac3bd328f738c838db0bd182e
7
+ data.tar.gz: c6c7716ff91038b94fccebbbb5e0f853ce7dcd8033b9e38c3bfa70e08f0bd9153274fe9dfc91404901306302b905cb4e45efb1f563b448138ad28f4915dd75e2
data/README.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Checkout.com Ruby SDK
2
+ [![build-status](https://github.com/checkout/checkout-sdk-ruby/workflows/build-master/badge.svg)](https://github.com/checkout/checkout-sdk-ruby/actions/workflows/build-master.yml)
3
+ ![CodeQL](https://github.com/checkout/checkout-sdk-ruby/workflows/CodeQL/badge.svg)
2
4
 
3
- ![build-status](https://github.com/checkout/checkout-sdk-ruby/workflows/build-master/badge.svg)
4
- [![GitHub license](https://img.shields.io/github/license/checkout/checkout-sdk-ruby.svg)](https://github.com/checkout/checkout-sdk-ruby/blob/master/LICENSE)
5
+ [![build-status](https://github.com/checkout/checkout-sdk-ruby/workflows/build-release/badge.svg)](https://github.com/checkout/checkout-sdk-ruby/actions/workflows/build-release.yml)
5
6
  [![GitHub release](https://img.shields.io/github/release/checkout/checkout-sdk-ruby.svg)](https://GitHub.com/checkout/checkout-sdk-ruby/releases/)
6
7
  [![Gem Version](https://badge.fury.io/rb/checkout_sdk.svg)](https://badge.fury.io/rb/checkout_sdk)
7
8
 
9
+ [![GitHub license](https://img.shields.io/github/license/checkout/checkout-sdk-ruby.svg)](https://github.com/checkout/checkout-sdk-ruby/blob/master/LICENSE.md)
10
+
8
11
  ## Getting started
9
12
 
10
13
  > **Version 1.0.0 is here!**
@@ -127,7 +127,7 @@ module CheckoutSdk
127
127
  end
128
128
 
129
129
  def parse_response(response)
130
- raise CheckoutApiException, response if response.status < 200 || response.status >= 300
130
+ raise CheckoutApiException, response if response.status < 200 || response.status >= 400
131
131
 
132
132
  metadata = CheckoutUtils.map_to_http_metadata(response)
133
133
  body = parse_json_or_contents(response)
@@ -39,6 +39,10 @@ module CheckoutSdk
39
39
  # @return [CheckoutSdk::Financial::FinancialClient]
40
40
  # @!attribute issuing
41
41
  # @return [CheckoutSdk::Issuing::IssuingClient]
42
+ # @!attribute contexts
43
+ # @return [CheckoutSdk::Payments::PaymentContextsClient]
44
+ # @!attribute payment_sessions
45
+ # @return [CheckoutSdk::Payments::PaymentSessionsClient]
42
46
  class CheckoutApi
43
47
  attr_reader :customers,
44
48
  :disputes,
@@ -58,7 +62,9 @@ module CheckoutSdk
58
62
  :transfers,
59
63
  :metadata,
60
64
  :financial,
61
- :issuing
65
+ :issuing,
66
+ :contexts,
67
+ :payment_sessions
62
68
 
63
69
  # @param [CheckoutConfiguration] configuration
64
70
  def initialize(configuration)
@@ -82,6 +88,8 @@ module CheckoutSdk
82
88
  @metadata = CheckoutSdk::Metadata::MetadataClient.new api_client, configuration
83
89
  @financial = CheckoutSdk::Financial::FinancialClient.new api_client, configuration
84
90
  @issuing = CheckoutSdk::Issuing::IssuingClient.new api_client, configuration
91
+ @contexts = CheckoutSdk::Payments::PaymentContextsClient.new api_client, configuration
92
+ @payment_sessions = CheckoutSdk::Payments::PaymentSessionsClient.new api_client, configuration
85
93
  end
86
94
 
87
95
  private
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ class PaymentContextsClient < Client
6
+ PAYMENT_CONTEXTS = 'payment-contexts'
7
+
8
+ # @param [ApiClient] api_client
9
+ # @param [CheckoutConfiguration] configuration
10
+ def initialize(api_client, configuration)
11
+ super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY_OR_OAUTH
12
+ end
13
+
14
+ # @param [Hash] payment_contexts
15
+ def create_payment_contexts(payment_contexts)
16
+ api_client.invoke_post(PAYMENT_CONTEXTS, sdk_authorization, payment_contexts)
17
+ end
18
+
19
+ # @param [String] payment_context_id
20
+ def get_payment_context_details(payment_context_id)
21
+ api_client.invoke_get(build_path(PAYMENT_CONTEXTS, payment_context_id), sdk_authorization)
22
+ end
23
+ end
24
+ end
25
+ end
@@ -2,6 +2,8 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # @!attribute payment_context_id
6
+ # @return [String]
5
7
  # @!attribute source
6
8
  # @return [PaymentSource]
7
9
  # @!attribute amount
@@ -28,6 +30,8 @@ module CheckoutSdk
28
30
  # @return [BillingDescriptor]
29
31
  # @!attribute shipping
30
32
  # @return [ShippingDetails]
33
+ # @!attribute segment
34
+ # @return [PaymentSegment]
31
35
  # @!attribute three_ds
32
36
  # @return [ThreeDSRequest]
33
37
  # @!attribute processing_channel_id
@@ -55,10 +59,13 @@ module CheckoutSdk
55
59
  # @return [ProcessingSettings]
56
60
  # @!attribute items
57
61
  # @return [Array(Product)]
62
+ # @!attribute retry
63
+ # @return [PaymentRetryRequest]
58
64
  # @!attribute metadata
59
65
  # @return [Hash{String => Object}]
60
66
  class PaymentRequest
61
- attr_accessor :source,
67
+ attr_accessor :payment_context_id,
68
+ :source,
62
69
  :amount,
63
70
  :currency,
64
71
  :payment_type,
@@ -71,6 +78,7 @@ module CheckoutSdk
71
78
  :customer,
72
79
  :billing_descriptor,
73
80
  :shipping,
81
+ :segment,
74
82
  :three_ds,
75
83
  :processing_channel_id,
76
84
  :previous_payment_id,
@@ -84,6 +92,7 @@ module CheckoutSdk
84
92
  :amount_allocations,
85
93
  :processing,
86
94
  :items,
95
+ :retry,
87
96
  :metadata
88
97
  end
89
98
  end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # @!attribute enabled
6
+ # @return [TrueClass, FalseClass]
7
+ # @!attribute max_attempts
8
+ # @return [Integer]
9
+ # @!attribute end_after_days
10
+ # @return [Integer]
11
+ class PaymentRetryRequest
12
+ attr_accessor :enabled,
13
+ :max_attempts,
14
+ :end_after_day
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ # @!attribute brand
6
+ # @return [String]
7
+ # @!attribute business_category
8
+ # @return [String]
9
+ # @!attribute market
10
+ # @return [String]
11
+ class PaymentSegment
12
+ attr_accessor :brand,
13
+ :business_category,
14
+ :market
15
+ end
16
+ end
17
+ end
@@ -155,3 +155,9 @@ require 'checkout_sdk/payments/hosted/hosted_payments_client'
155
155
  # Payment Links
156
156
  require 'checkout_sdk/payments/links/payment_link'
157
157
  require 'checkout_sdk/payments/links/payments_links_client'
158
+
159
+ # Payment Contexts
160
+ require 'checkout_sdk/payments/contexts/payment_contexts_client'
161
+
162
+ # Payment Sessions
163
+ require 'checkout_sdk/payments/sessions/payment_sessions_client'
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CheckoutSdk
4
+ module Payments
5
+ class PaymentSessionsClient < Client
6
+ PAYMENT_SESSIONS = 'payment-sessions'
7
+
8
+ # @param [ApiClient] api_client
9
+ # @param [CheckoutConfiguration] configuration
10
+ def initialize(api_client, configuration)
11
+ super api_client, configuration, CheckoutSdk::AuthorizationType::SECRET_KEY
12
+ end
13
+
14
+ # @param [Hash] payment_sessions
15
+ def create_payment_sessions(payment_sessions)
16
+ api_client.invoke_post(PAYMENT_SESSIONS, sdk_authorization, payment_sessions)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -2,7 +2,11 @@
2
2
 
3
3
  module CheckoutSdk
4
4
  module Payments
5
+ # @!attribute account_holder
6
+ # @return [CheckoutSdk::Common::AccountHolder]
5
7
  class GiropaySource < PaymentSource
8
+ attr_accessor :account_holder
9
+
6
10
  def initialize
7
11
  super CheckoutSdk::Common::PaymentSourceType::GIROPAY
8
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CheckoutSdk
4
- VERSION = '1.1.4'
4
+ VERSION = '1.1.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkout_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Checkout
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-07 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -270,6 +270,7 @@ files:
270
270
  - lib/checkout_sdk/payments/capture_request.rb
271
271
  - lib/checkout_sdk/payments/capture_type.rb
272
272
  - lib/checkout_sdk/payments/charge_bearer.rb
273
+ - lib/checkout_sdk/payments/contexts/payment_contexts_client.rb
273
274
  - lib/checkout_sdk/payments/d_local_installments.rb
274
275
  - lib/checkout_sdk/payments/d_local_processing_settings.rb
275
276
  - lib/checkout_sdk/payments/destination/bank_account_destination.rb
@@ -294,6 +295,8 @@ files:
294
295
  - lib/checkout_sdk/payments/payment_instruction.rb
295
296
  - lib/checkout_sdk/payments/payment_recipient.rb
296
297
  - lib/checkout_sdk/payments/payment_request.rb
298
+ - lib/checkout_sdk/payments/payment_retry_request.rb
299
+ - lib/checkout_sdk/payments/payment_segment.rb
297
300
  - lib/checkout_sdk/payments/payment_type.rb
298
301
  - lib/checkout_sdk/payments/payments.rb
299
302
  - lib/checkout_sdk/payments/payments_client.rb
@@ -352,6 +355,7 @@ files:
352
355
  - lib/checkout_sdk/payments/sender/sender_type.rb
353
356
  - lib/checkout_sdk/payments/sender/source_of_funds.rb
354
357
  - lib/checkout_sdk/payments/sender/ticket.rb
358
+ - lib/checkout_sdk/payments/sessions/payment_sessions_client.rb
355
359
  - lib/checkout_sdk/payments/shipping_details.rb
356
360
  - lib/checkout_sdk/payments/shipping_preference.rb
357
361
  - lib/checkout_sdk/payments/source/apm/after_pay_source.rb