blockchyp 2.24.5 → 2.24.8

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: 346386c4ce46b54b7a4b0adb89c5e6632bbed1e4a32d569472017f152ba52278
4
- data.tar.gz: d2699aaeb0be05083b513105a0fc725619031b3bf1c6e60854ecd6f20ace210f
3
+ metadata.gz: 9735874427b7dd99fe3a89fe19f79a71ffa3e407aca7f00f950c8901a9fdad2b
4
+ data.tar.gz: 8354b86d38f44d0b766b26a1f5ba005a2f1cffc147771d148c27687f20834629
5
5
  SHA512:
6
- metadata.gz: f8bd9bf67b7b16005508c97afac67dcb17ef802ad18b1ff291be95df2e7bb62fccfe1a1c8a044f0c905cf1b0832243a432063b1d132599c03b6189e5a528415d
7
- data.tar.gz: f9ce51c7a7e96c3dc47ad270cc6c055166b06c127b353f8c7de1ad5250fb8a51707d24574d3bb079ddb40e95a9911da72278f41afb2685253161e42f1fa08b29
6
+ metadata.gz: d4eaa070de6a4279596cc4eefb4b6459030e2664e3cb06e49f54e65fb0e2565b5d6cc0cb4d6689183aab442fc8794140baf0beb8f5dcde710cbaf4da486b3963
7
+ data.tar.gz: 3076e3296b9acad951157b475d256869d9ba34ddadc8a673f030ada9400a7898b3640ced7f556b6712122a66f852b4f36d36fc58aae7c7474f15162200714da7
data/README.md CHANGED
@@ -2540,6 +2540,43 @@ response = blockchyp.unlinkToken(request)
2540
2540
  puts "Response: #{response.inspect}"
2541
2541
 
2542
2542
 
2543
+ ```
2544
+
2545
+ #### Update Token
2546
+
2547
+
2548
+
2549
+ * **API Credential Types:** Merchant
2550
+ * **Required Role:** Payment API Access
2551
+
2552
+ This API updates a payment token in the gateway. This can be used to update token metadata such as expiration dates, cardholder name, bank name, account holder type, account type, address, and postal code.
2553
+
2554
+
2555
+
2556
+
2557
+ ```ruby
2558
+ # frozen_string_literal: true
2559
+
2560
+ require 'blockchyp'
2561
+
2562
+ blockchyp = BlockChyp::BlockChyp.new(
2563
+ ENV['BC_API_KEY'],
2564
+ ENV['BC_BEARER_TOKEN'],
2565
+ ENV['BC_SIGNING_KEY']
2566
+ )
2567
+
2568
+ # Set request parameters
2569
+ request = {
2570
+ token: '<TOKEN>',
2571
+ expiryMonth: '12',
2572
+ expiryYear: '2040'
2573
+ }
2574
+
2575
+ response = blockchyp.updateToken(request)
2576
+
2577
+ puts "Response: #{response.inspect}"
2578
+
2579
+
2543
2580
  ```
2544
2581
 
2545
2582
  #### Delete Token
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlockChyp
4
- VERSION = '2.24.5'
4
+ VERSION = '2.24.8'
5
5
  end
data/lib/blockchyp.rb CHANGED
@@ -325,6 +325,11 @@ module BlockChyp
325
325
  gateway_request('POST', '/api/unlink-token', request)
326
326
  end
327
327
 
328
+ # Updates a payment token.
329
+ def update_token(request)
330
+ gateway_request('POST', '/api/token/' + request[:token], request)
331
+ end
332
+
328
333
  # Deletes a payment token.
329
334
  def delete_token(request)
330
335
  gateway_request('DELETE', '/api/token/' + request[:token], request)
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2025 BlockChyp, Inc. All rights reserved. Use of this code is
4
+ # governed by a license that can be found in the LICENSE file.
5
+ #
6
+ # This file was generated automatically by the BlockChyp SDK Generator.
7
+ # Changes to this file will be lost every time the code is regenerated.
8
+
9
+ require ::File.expand_path('test_helper', __dir__)
10
+
11
+ module BlockChyp
12
+ class UpdateTokenTest < TestCase
13
+ def test_update_token
14
+
15
+ puts "Running test_update_token..."
16
+
17
+ config = load_test_config
18
+
19
+ blockchyp = BlockChyp.new(
20
+ config[:apiKey],
21
+ config[:bearerToken],
22
+ config[:signingKey]
23
+ )
24
+ blockchyp.gateway_host = config[:gatewayHost]
25
+ blockchyp.test_gateway_host = config[:testGatewayHost]
26
+ blockchyp.dashboard_host = config[:dashboardHost]
27
+
28
+
29
+
30
+
31
+
32
+ # Set request parameters
33
+ setup_request = {
34
+ pan: '4111111111111111',
35
+ test: true,
36
+ customer: {
37
+ customerRef: 'TESTCUSTOMER',
38
+ firstName: 'Test',
39
+ lastName: 'Customer'
40
+ }
41
+ }
42
+ response = blockchyp.enroll(setup_request)
43
+
44
+ # Set request parameters
45
+ request = {
46
+ token: response[:token],
47
+ expiryMonth: '12',
48
+ expiryYear: '2040'
49
+ }
50
+
51
+ response = blockchyp.update_token(request)
52
+ assert_not_nil(response)
53
+ # response assertions
54
+ assert(response[:success])
55
+ end
56
+ end
57
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blockchyp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.24.5
4
+ version: 2.24.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlockChyp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-18 00:00:00.000000000 Z
11
+ date: 2025-10-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -119,6 +119,7 @@ files:
119
119
  - test/update_merchant_test.rb
120
120
  - test/update_slide_show_test.rb
121
121
  - test/update_survey_question_test.rb
122
+ - test/update_token_test.rb
122
123
  - test/update_transaction_display_test.rb
123
124
  - test/upload_status_test.rb
124
125
  homepage: https://github.com/blockchyp/blockchyp-ruby