checkout_sdk 1.1.4 → 1.1.5

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: 614d4fcde0357737a39ce3468a80f424074e274ad012208e46286c09bda84ded
4
- data.tar.gz: 70c2915a4de35657359cbef87805249766e7ce88caad1806b3e71f1b3a7b71a9
3
+ metadata.gz: 89b0d9812a4c443f439d78446f038e591d0b70285ffc1258d413bfe0966ec948
4
+ data.tar.gz: 56450b03be8537daab95e481f6eec23c2e147fff8f32a1d5c1ea0d2c98032428
5
5
  SHA512:
6
- metadata.gz: f06299d70b3b3a0c629689124dcdd09a7f2b16d15b7f966a0c43b5e1031c0c37d1f5bd8815b7857522cf46d18ad084edba3aa432b936977a9fd11b466b75f552
7
- data.tar.gz: 1e487e77197073878b170db9fcee2488b0955a48161a784ca356ff84245f270af5177b496602f777888181dbcebff61ae417206565c5314d63b79e3d0c999bed
6
+ metadata.gz: fddb2bbff3b40b6ef1a88843bdba5c7d10c5df3bfa87fea000e98ded9ca304f59e36daeb0397b07c61721790f9b507bd01d8b48ba2f65d708a8e04757298b862
7
+ data.tar.gz: 0f2deeabd4dfaf02ded2fee0ddf8054548369babd299993c62b5b5ad13e457416d1441abeacae06d6a5d38528f755bdf08a7d1882d7d7de368f861ed211f5bd6
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)
@@ -58,7 +58,8 @@ module CheckoutSdk
58
58
  :transfers,
59
59
  :metadata,
60
60
  :financial,
61
- :issuing
61
+ :issuing,
62
+ :contexts
62
63
 
63
64
  # @param [CheckoutConfiguration] configuration
64
65
  def initialize(configuration)
@@ -82,6 +83,7 @@ module CheckoutSdk
82
83
  @metadata = CheckoutSdk::Metadata::MetadataClient.new api_client, configuration
83
84
  @financial = CheckoutSdk::Financial::FinancialClient.new api_client, configuration
84
85
  @issuing = CheckoutSdk::Issuing::IssuingClient.new api_client, configuration
86
+ @contexts = CheckoutSdk::Payments::PaymentContextsClient.new api_client, configuration
85
87
  end
86
88
 
87
89
  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
@@ -155,3 +155,6 @@ 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'
@@ -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.5'
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.5
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: 2023-12-22 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