adyen-ruby-api-library 9.0.0 → 9.2.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: e8b08de6a807cdb9b167fbcceda1c0faee1877a74019598143937c601fdb8761
4
- data.tar.gz: 06b6bf8881d4f769691782f6bdae19ce6141b1f6d921178e0d0b10b332739e3a
3
+ metadata.gz: 9cd62465ff95ef75e5317280942c3bd350905eab491cd76dcfbaf2dea524cd64
4
+ data.tar.gz: 3f214db363d20a5bc580004f5c9c08a97f0f497553cae40ba4b07219e660e16e
5
5
  SHA512:
6
- metadata.gz: c49ff13c0d95d1e2cc9a0efca40aad05a5ea1cfaca2b582069fdff3aab7d91c963e8ceeaa8162f1aa3fff3b2078b93ba59a3bac1fbbf8a74793544ac8e7ca622
7
- data.tar.gz: ef19a8c76e01f6b34c8976c472ec336e3cc30e90a8decd480daea4f7517867b1307a4a0bf169e115ddd6ec483ebe6aff1d6e9449419042bbf9d9114d6e0a8b2b
6
+ metadata.gz: 75cf83d9f687ef32587040d42f215cf993971215c51d9917e26ed55bdbe32c31dc38f9fb06896c794d918100af4dfda4103985c3110203ca36ff19eb7cda624a
7
+ data.tar.gz: 6034d7d10d73f9c0f443e233f49e0bd700ac16eb72105452976bd53235f44284ef750b8e24e75f6af20e696ce8b9ca90fa77be6f31c351a4014e3ff0f10b701b
@@ -1,4 +1,4 @@
1
- name: Prepare release
1
+ name: Release
2
2
 
3
3
  on:
4
4
  workflow_dispatch:
@@ -8,6 +8,12 @@ on:
8
8
  type: boolean
9
9
  default: false
10
10
  description: "This release will be labeled as non-production ready"
11
+ github-release:
12
+ required: false
13
+ type: boolean
14
+ default: false
15
+ description: "Publish Github release for the current version"
16
+ # Monitor pull request events
11
17
  pull_request:
12
18
  types:
13
19
  - closed
@@ -15,8 +21,7 @@ on:
15
21
  - main
16
22
 
17
23
  jobs:
18
- candidate:
19
- if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged && !startsWith(github.head_ref, 'promote/'))
24
+ release:
20
25
  permissions:
21
26
  contents: write
22
27
  pull-requests: write
@@ -24,10 +29,12 @@ jobs:
24
29
  steps:
25
30
  - uses: actions/checkout@v4
26
31
  - name: Prepare the next main release
27
- uses: Adyen/release-automation-action@v1.1.1
32
+ uses: Adyen/release-automation-action@v1.3.1
28
33
  with:
29
34
  token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
30
35
  develop-branch: main
31
36
  version-files: lib/adyen/version.rb
37
+ release-title: Adyen Ruby API Library
32
38
  pre-release: ${{ inputs.pre-release || false }}
39
+ github-release: ${{ inputs.github-release || false }}
33
40
  separator: .pre.beta
data/README.md CHANGED
@@ -88,7 +88,7 @@ response = adyen.checkout.payments_api.payments({
88
88
 
89
89
  - Change API Version
90
90
  ~~~~ruby
91
- adyen.checkout.version = 68
91
+ adyen.checkout.version = 69
92
92
  ~~~~
93
93
 
94
94
  ### Example integration
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 9.0.0
1
+ 9.2.0
2
2
 
@@ -34,15 +34,6 @@ module Adyen
34
34
  @client.call_adyen_api(@service, action, {}, headers, @version)
35
35
  end
36
36
 
37
- def get_all_payment_instruments_for_balance_account(id, headers: {}, query_params: {})
38
- endpoint = '/balanceAccounts/{id}/paymentInstruments'.gsub(/{.+?}/, '%s')
39
- endpoint = endpoint.gsub(%r{^/}, '')
40
- endpoint = format(endpoint, id)
41
- endpoint += create_query_string(query_params)
42
- action = { method: 'get', url: endpoint }
43
- @client.call_adyen_api(@service, action, {}, headers, @version)
44
- end
45
-
46
37
  def get_all_sweeps_for_balance_account(balance_account_id, headers: {}, query_params: {})
47
38
  endpoint = '/balanceAccounts/{balanceAccountId}/sweeps'.gsub(/{.+?}/, '%s')
48
39
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -61,6 +52,15 @@ module Adyen
61
52
  @client.call_adyen_api(@service, action, {}, headers, @version)
62
53
  end
63
54
 
55
+ def get_payment_instruments_linked_to_balance_account(id, headers: {}, query_params: {})
56
+ endpoint = '/balanceAccounts/{id}/paymentInstruments'.gsub(/{.+?}/, '%s')
57
+ endpoint = endpoint.gsub(%r{^/}, '')
58
+ endpoint = format(endpoint, id)
59
+ endpoint += create_query_string(query_params)
60
+ action = { method: 'get', url: endpoint }
61
+ @client.call_adyen_api(@service, action, {}, headers, @version)
62
+ end
63
+
64
64
  def get_sweep(balance_account_id, sweep_id, headers: {})
65
65
  endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'.gsub(/{.+?}/, '%s')
66
66
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -0,0 +1,29 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+ class CardOrdersApi < Service
4
+ attr_accessor :service, :version
5
+
6
+ def initialize(client, version = DEFAULT_VERSION)
7
+ super(client, version, 'BalancePlatform')
8
+ end
9
+
10
+ def get_card_order_items(id, headers: {}, query_params: {})
11
+ endpoint = '/cardorders/{id}/items'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint, id)
14
+ endpoint += create_query_string(query_params)
15
+ action = { method: 'get', url: endpoint }
16
+ @client.call_adyen_api(@service, action, {}, headers, @version)
17
+ end
18
+
19
+ def list_card_orders(headers: {}, query_params: {})
20
+ endpoint = '/cardorders'.gsub(/{.+?}/, '%s')
21
+ endpoint = endpoint.gsub(%r{^/}, '')
22
+ endpoint = format(endpoint)
23
+ endpoint += create_query_string(query_params)
24
+ action = { method: 'get', url: endpoint }
25
+ @client.call_adyen_api(@service, action, {}, headers, @version)
26
+ end
27
+
28
+ end
29
+ end
@@ -0,0 +1,38 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+ class ManageCardPINApi < Service
4
+ attr_accessor :service, :version
5
+
6
+ def initialize(client, version = DEFAULT_VERSION)
7
+ super(client, version, 'BalancePlatform')
8
+ end
9
+
10
+ def change_card_pin(request, headers: {})
11
+ endpoint = '/pins/change'.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
+
19
+ def public_key(headers: {}, query_params: {})
20
+ endpoint = '/publicKey'.gsub(/{.+?}/, '%s')
21
+ endpoint = endpoint.gsub(%r{^/}, '')
22
+ endpoint = format(endpoint)
23
+ endpoint += create_query_string(query_params)
24
+ action = { method: 'get', url: endpoint }
25
+ @client.call_adyen_api(@service, action, {}, headers, @version)
26
+ end
27
+
28
+ def reveal_card_pin(request, headers: {})
29
+ endpoint = '/pins/reveal'.gsub(/{.+?}/, '%s')
30
+ endpoint = endpoint.gsub(%r{^/}, '')
31
+ endpoint = format(endpoint)
32
+
33
+ action = { method: 'post', url: endpoint }
34
+ @client.call_adyen_api(@service, action, request, headers, @version)
35
+ end
36
+
37
+ end
38
+ end
@@ -52,6 +52,15 @@ module Adyen
52
52
  @client.call_adyen_api(@service, action, {}, headers, @version)
53
53
  end
54
54
 
55
+ def reveal_data_of_payment_instrument(request, headers: {})
56
+ endpoint = '/paymentInstruments/reveal'.gsub(/{.+?}/, '%s')
57
+ endpoint = endpoint.gsub(%r{^/}, '')
58
+ endpoint = format(endpoint)
59
+
60
+ action = { method: 'post', url: endpoint }
61
+ @client.call_adyen_api(@service, action, request, headers, @version)
62
+ end
63
+
55
64
  def update_payment_instrument(request, id, headers: {})
56
65
  endpoint = '/paymentInstruments/{id}'.gsub(/{.+?}/, '%s')
57
66
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -1,8 +1,10 @@
1
1
  require_relative 'balancePlatform/account_holders_api'
2
2
  require_relative 'balancePlatform/balance_accounts_api'
3
3
  require_relative 'balancePlatform/bank_account_validation_api'
4
+ require_relative 'balancePlatform/card_orders_api'
4
5
  require_relative 'balancePlatform/grant_accounts_api'
5
6
  require_relative 'balancePlatform/grant_offers_api'
7
+ require_relative 'balancePlatform/manage_card_pin_api'
6
8
  require_relative 'balancePlatform/network_tokens_api'
7
9
  require_relative 'balancePlatform/payment_instrument_groups_api'
8
10
  require_relative 'balancePlatform/payment_instruments_api'
@@ -33,6 +35,10 @@ module Adyen
33
35
  @bank_account_validation_api ||= Adyen::BankAccountValidationApi.new(@client, @version)
34
36
  end
35
37
 
38
+ def card_orders_api
39
+ @card_orders_api ||= Adyen::CardOrdersApi.new(@client, @version)
40
+ end
41
+
36
42
  def grant_accounts_api
37
43
  @grant_accounts_api ||= Adyen::GrantAccountsApi.new(@client, @version)
38
44
  end
@@ -41,6 +47,10 @@ module Adyen
41
47
  @grant_offers_api ||= Adyen::GrantOffersApi.new(@client, @version)
42
48
  end
43
49
 
50
+ def manage_card_pin_api
51
+ @manage_card_pin_api ||= Adyen::ManageCardPINApi.new(@client, @version)
52
+ end
53
+
44
54
  def network_tokens_api
45
55
  @network_tokens_api ||= Adyen::NetworkTokensApi.new(@client, @version)
46
56
  end
@@ -25,5 +25,14 @@ module Adyen
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
28
+ def stored_payment_methods(request, headers: {})
29
+ endpoint = '/storedPaymentMethods'.gsub(/{.+?}/, '%s')
30
+ endpoint = endpoint.gsub(%r{^/}, '')
31
+ endpoint = format(endpoint)
32
+
33
+ action = { method: 'post', url: endpoint }
34
+ @client.call_adyen_api(@service, action, request, headers, @version)
35
+ end
36
+
28
37
  end
29
38
  end
@@ -25,5 +25,14 @@ module Adyen
25
25
  @client.call_adyen_api(@service, action, request, headers, @version)
26
26
  end
27
27
 
28
+ def updates_order_for_paypal_express_checkout(request, headers: {})
29
+ endpoint = '/paypal/updateOrder'.gsub(/{.+?}/, '%s')
30
+ endpoint = endpoint.gsub(%r{^/}, '')
31
+ endpoint = format(endpoint)
32
+
33
+ action = { method: 'post', url: endpoint }
34
+ @client.call_adyen_api(@service, action, request, headers, @version)
35
+ end
36
+
28
37
  end
29
38
  end
@@ -16,11 +16,11 @@ module Adyen
16
16
  @client.call_adyen_api(@service, action, {}, headers, @version)
17
17
  end
18
18
 
19
- def get_document(id, headers: {})
19
+ def get_document(id, headers: {}, query_params: {})
20
20
  endpoint = '/documents/{id}'.gsub(/{.+?}/, '%s')
21
21
  endpoint = endpoint.gsub(%r{^/}, '')
22
22
  endpoint = format(endpoint, id)
23
-
23
+ endpoint += create_query_string(query_params)
24
24
  action = { method: 'get', url: endpoint }
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
@@ -7,6 +7,24 @@ module Adyen
7
7
  super(client, version, 'Transfers')
8
8
  end
9
9
 
10
+ def get_all_transfers(headers: {}, query_params: {})
11
+ endpoint = '/transfers'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint)
14
+ endpoint += create_query_string(query_params)
15
+ action = { method: 'get', url: endpoint }
16
+ @client.call_adyen_api(@service, action, {}, headers, @version)
17
+ end
18
+
19
+ def get_transfer(id, headers: {})
20
+ endpoint = '/transfers/{id}'.gsub(/{.+?}/, '%s')
21
+ endpoint = endpoint.gsub(%r{^/}, '')
22
+ endpoint = format(endpoint, id)
23
+
24
+ action = { method: 'get', url: endpoint }
25
+ @client.call_adyen_api(@service, action, {}, headers, @version)
26
+ end
27
+
10
28
  def return_transfer(request, transfer_id, headers: {})
11
29
  endpoint = '/transfers/{transferId}/returns'.gsub(/{.+?}/, '%s')
12
30
  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.0.0'.freeze
3
+ VERSION = '9.2.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.0.0
4
+ version: 9.2.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-01-15 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -83,11 +83,9 @@ files:
83
83
  - ".github/PULL_REQUEST_TEMPLATE.md"
84
84
  - ".github/release.yml"
85
85
  - ".github/workflows/codeql.yml"
86
- - ".github/workflows/gh_release.yml"
87
86
  - ".github/workflows/release.yml"
88
87
  - ".github/workflows/ruby.yml"
89
88
  - ".github/workflows/rubygems_release.yml"
90
- - ".github/workflows/services.yml"
91
89
  - ".gitignore"
92
90
  - ".rubocop.yml"
93
91
  - CODE_OF_CONDUCT.md
@@ -125,8 +123,10 @@ files:
125
123
  - lib/adyen/services/balancePlatform/account_holders_api.rb
126
124
  - lib/adyen/services/balancePlatform/balance_accounts_api.rb
127
125
  - lib/adyen/services/balancePlatform/bank_account_validation_api.rb
126
+ - lib/adyen/services/balancePlatform/card_orders_api.rb
128
127
  - lib/adyen/services/balancePlatform/grant_accounts_api.rb
129
128
  - lib/adyen/services/balancePlatform/grant_offers_api.rb
129
+ - lib/adyen/services/balancePlatform/manage_card_pin_api.rb
130
130
  - lib/adyen/services/balancePlatform/network_tokens_api.rb
131
131
  - lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb
132
132
  - lib/adyen/services/balancePlatform/payment_instruments_api.rb
@@ -1,20 +0,0 @@
1
- name: Automatic Github release
2
-
3
- on:
4
- workflow_dispatch:
5
- push:
6
- branches:
7
- - main
8
- paths:
9
- - VERSION
10
-
11
- jobs:
12
- github:
13
- permissions:
14
- contents: write
15
- uses: Adyen/release-automation-action/.github/workflows/reusable-github-release.yml@v1.1.1
16
- with:
17
- release-title: Adyen Ruby API Library
18
- develop-branch: main
19
- secrets:
20
- token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
@@ -1,28 +0,0 @@
1
- name: Ruby Library Services Generation
2
-
3
- on: [ workflow_dispatch ]
4
-
5
- jobs:
6
- generate:
7
- runs-on: ubuntu-latest
8
- name: Generate Services
9
- steps:
10
- - uses: actions/checkout@v4
11
- - run: make allServices
12
- - name: Set PR variables
13
- id: vars
14
- run: |
15
- echo ::set-output name=pr_title::"Update services"
16
- echo ::set-output name=pr_body::"OpenAPI spec or templates produced new services on $(date +%d-%m-%Y) \
17
- by [commit](https://github.com/Adyen/adyen-openapi/commit/$(git rev-parse HEAD))."
18
- - name: Create Pull Request
19
- uses: peter-evans/create-pull-request@v5
20
- with:
21
- token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
22
- committer: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
23
- author: ${{ secrets.ADYEN_AUTOMATION_BOT_EMAIL }}
24
- base: main
25
- branch: automation/services
26
- title: ${{ steps.vars.outputs.pr_title }}
27
- body: ${{ steps.vars.outputs.pr_body }}
28
- add-paths: lib/adyen/services