adyen-ruby-api-library 9.6.0 → 9.7.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: a4b74cc08f99b7c28119241aa0ac360b9d9f6f7fbfb81555d16bd945bc544fbd
4
- data.tar.gz: 11fb923af53ea8573e2ded33e334778d264df64745f7db7cebf97111bc013f98
3
+ metadata.gz: cde4dd4dad622931d9bba93a914f9eca16918eab9fd4a314416fd1397d2db5f4
4
+ data.tar.gz: 2c7e74c40eb6a9976c8340b6c13fa8f4177fb55d6d272c97af1e9d21772fa038
5
5
  SHA512:
6
- metadata.gz: c8bebee1ec9d2e18432ea895a86a580266d4d9f0117a83cc75b563f43a5bfba029dfd4f177ae98538085311245f152fe93e500bc8ff2a61dba8766b1d595cf0f
7
- data.tar.gz: 6288f958c1cacbfdaedf2a8bd7017d6b1a7020735930c319b3a6d79950999c2f3b64cca3c8d2bd8afa6799571bb89a0a0743100fff2c598a613989aa46dc7052
6
+ metadata.gz: 75a4635f2ec599af443d8987592077fe625e7945372e91d458baf4abaa68593efcda42254fe0bff76e32ffdae6b9e4f8f47049b198bf52253b9b474d64a9761d
7
+ data.tar.gz: 3b6f0c9023f6e89c1cd6a43f963a22bd97d0afa4acfec7dcb2152e22b56f01bc2bc437c11cbd0f85b1b60794655cb54b167173d4b3b74b73008502dbac29e1c1
data/README.md CHANGED
@@ -24,6 +24,8 @@ This library supports the following:
24
24
  | [Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/terminal-api-reference/) | - | Our point-of-sale integration. | [TerminalCloudAPI](lib/adyen/services/terminalCloudAPI.rb) |
25
25
  | [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | v30 | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](lib/adyen/services/disputes.rb) |
26
26
  | [POS Mobile API](https://docs.adyen.com/api-explorer/possdk/68/overview) | v68 | The POS Mobile API is used in the mutual authentication flow between an Adyen Android or iOS [POS Mobile SDK](https://docs.adyen.com/point-of-sale/ipp-mobile/) and the Adyen payments platform. The POS Mobile SDK for Android or iOS devices enables businesses to accept in-person payments using a commercial off-the-shelf (COTS) device like a phone. For example, Tap to Pay transactions, or transactions on a mobile device in combination with a card reader. | [POS Mobile](lib/adyen/services/posMobile.rb) |
27
+ | [Payments App API](https://docs.adyen.com/api-explorer/payments-app/1/overview) | v1 | The Payments App API is used to Board and manage the Adyen Payments App on your Android mobile devices. | [paymentsApp](lib/adyen/services/paymentsApp.rb) |
28
+
27
29
 
28
30
 
29
31
  For more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 9.6.0
1
+ 9.7.0
2
2
 
data/lib/adyen/client.rb CHANGED
@@ -13,10 +13,10 @@ require_relative './result'
13
13
  module Adyen
14
14
  class Client
15
15
  attr_accessor :ws_user, :ws_password, :api_key, :oauth_token, :client, :adapter
16
- attr_reader :env, :connection_options, :adapter_options
16
+ attr_reader :env, :connection_options, :adapter_options, :terminal_region
17
17
 
18
18
  def initialize(ws_user: nil, ws_password: nil, api_key: nil, oauth_token: nil, env: :live, adapter: nil, mock_port: 3001,
19
- live_url_prefix: nil, mock_service_url_base: nil, connection_options: nil, adapter_options: nil)
19
+ live_url_prefix: nil, mock_service_url_base: nil, connection_options: nil, adapter_options: nil, terminal_region: nil)
20
20
  @ws_user = ws_user
21
21
  @ws_password = ws_password
22
22
  @api_key = api_key
@@ -33,6 +33,7 @@ module Adyen
33
33
  @mock_service_url_base = mock_service_url_base || "http://localhost:#{mock_port}"
34
34
  @live_url_prefix = live_url_prefix
35
35
  @connection_options = connection_options || Faraday::ConnectionOptions.new
36
+ @terminal_region = terminal_region
36
37
  end
37
38
 
38
39
  # make sure that env can only be :live, :test, or :mock
@@ -84,7 +85,11 @@ module Adyen
84
85
  url = "https://management-#{@env}.adyen.com"
85
86
  supports_live_url_prefix = false
86
87
  when 'TerminalCloudAPI'
87
- url = "https://terminal-api-#{@env}.adyen.com"
88
+ url = if !terminal_region.nil?
89
+ "https://terminal-api-#{@env}-#{terminal_region}.adyen.com"
90
+ else
91
+ "https://terminal-api-#{@env}.adyen.com"
92
+ end
88
93
  supports_live_url_prefix = false
89
94
  else
90
95
  raise ArgumentError, 'Invalid service specified'
@@ -7,6 +7,15 @@ module Adyen
7
7
  super(client, version, 'Checkout')
8
8
  end
9
9
 
10
+ def donation_campaigns(request, headers: {})
11
+ endpoint = '/donationCampaigns'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
+ end
18
+
10
19
  def donations(request, headers: {})
11
20
  endpoint = '/donations'.gsub(/{.+?}/, '%s')
12
21
  endpoint = endpoint.gsub(%r{^/}, '')
data/lib/adyen/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Adyen
2
2
  NAME = 'adyen-ruby-api-library'.freeze
3
- VERSION = '9.6.0'.freeze
3
+ VERSION = '9.7.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adyen-ruby-api-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.6.0
4
+ version: 9.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-01 00:00:00.000000000 Z
11
+ date: 2024-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday