blockchyp 2.15.25 → 2.16.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: 2790b1798c7d64d41af7489dfd7b894f866301be2ef737d8e0258b5ab2511cd4
4
- data.tar.gz: 473b3a257d984c8fcd77cc29b710753a3643f7e15e906fe1458f4d139a801671
3
+ metadata.gz: fe7037d65ec09a0063f12853668503f52cb0e6fbaedaf14897891b119bc5d162
4
+ data.tar.gz: f5b7ad3c162d1743e3d1767aa6545df60aabd9cc03f38ea474137518fcf77bf3
5
5
  SHA512:
6
- metadata.gz: aa9da544a25bba2460dd73ec469fbbfdc832cd4a6a6d95d395fa485888a201c9375e3f38fb9e418b1108ba09d12bf92deb812984fc180f04aa78be83c956898f
7
- data.tar.gz: 6d06215d3a5a7e0e3f434a0f9ce97c5e4fb6c4d29b299d6ae7186fe245a4797f5b5d1ca26b0a3a85a1dfbbce45a35c34c74b6f8a6a5859313d5aa8dd4f586470
6
+ metadata.gz: 3a0acaa000891e335405cc60b86520c4e1955fbf6cbdb423c25e5a1bb2c2aadd89472fe6830c91c0781dbaf03feca36eddc23273f030275286c707514ab7520b
7
+ data.tar.gz: 590de5bb268b093fd1e843ffa901f93f969ee22da3957f763e3cd34af437ca2be736647bfa262b6668089ee1393965851338b7ae85f6d3207f097d718e8c5d0e
data/README.md CHANGED
@@ -792,6 +792,42 @@ response = blockchyp.sendPaymentLink(request)
792
792
  puts "Response: #{response.inspect}"
793
793
 
794
794
 
795
+ ```
796
+
797
+ #### Resend Payment Link
798
+
799
+
800
+
801
+ * **API Credential Types:** Merchant
802
+ * **Required Role:** Payment API Access
803
+
804
+ This API will resend a previously created payment link. An error is returned if the payment link is expired, has been
805
+ cancelled, or has already been paid.
806
+
807
+
808
+
809
+
810
+ ```ruby
811
+ # frozen_string_literal: true
812
+
813
+ require 'blockchyp'
814
+
815
+ blockchyp = BlockChyp::BlockChyp.new(
816
+ ENV['BC_API_KEY'],
817
+ ENV['BC_BEARER_TOKEN'],
818
+ ENV['BC_SIGNING_KEY']
819
+ )
820
+
821
+ # Set request parameters
822
+ request = {
823
+ linkCode: '<PAYMENT LINK CODE>'
824
+ }
825
+
826
+ response = blockchyp.resendPaymentLink(request)
827
+
828
+ puts "Response: #{response.inspect}"
829
+
830
+
795
831
  ```
796
832
 
797
833
  #### Cancel Payment Link
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BlockChyp
4
- VERSION = '2.15.25'
4
+ VERSION = '2.16.0'
5
5
  end
data/lib/blockchyp.rb CHANGED
@@ -209,6 +209,11 @@ module BlockChyp
209
209
  gateway_request('POST', '/api/send-payment-link', request)
210
210
  end
211
211
 
212
+ # Resends payment link.
213
+ def resend_payment_link(request)
214
+ gateway_request('POST', '/api/resend-payment-link', request)
215
+ end
216
+
212
217
  # Cancels a payment link.
213
218
  def cancel_payment_link(request)
214
219
  gateway_request('POST', '/api/cancel-payment-link', request)
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2019-2023 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 ResendPaymentLinkTest < TestCase
13
+ def test_resend_payment_link
14
+
15
+ puts "Running test_resend_payment_link..."
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
+ linkCode: response[:linkCode]
35
+ }
36
+ response = blockchyp.resend_payment_link(setup_request)
37
+
38
+ # Set request parameters
39
+ request = {
40
+ linkCode: response[:linkCode]
41
+ }
42
+
43
+ response = blockchyp.resend_payment_link(request)
44
+ assert_not_nil(response)
45
+ # response assertions
46
+ assert(response[:success])
47
+ end
48
+ end
49
+ 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.15.25
4
+ version: 2.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlockChyp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-04 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -60,6 +60,7 @@ files:
60
60
  - test/pan_preauth_test.rb
61
61
  - test/partial_refund_test.rb
62
62
  - test/payment_link_status_test.rb
63
+ - test/resend_payment_link_test.rb
63
64
  - test/search_customer_test.rb
64
65
  - test/send_payment_link_test.rb
65
66
  - test/simple_batch_close_test.rb