tessitura_rest 1.2.8 → 1.3

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: 1901164dcd7995a8ba886876dc5b7fa980735d1bd2905086eb2c4df41eabb80d
4
- data.tar.gz: 8864e13f29025d57be84ccb3591e7c01e93fba6d6e70f4e4b8a17ac9e6d11455
3
+ metadata.gz: 1a04569767581e4c1fa6e41aa2245220792d3a2ff9ae19a7906509bc33b999cd
4
+ data.tar.gz: c1460e19f9914dc471dced8b9aef2443785e3d9a903caefdb554f50f9e96dff8
5
5
  SHA512:
6
- metadata.gz: 49f93e54b7c81a31c2a2ad5bab97f30ebf2568cb8f2d84ead203f7a7fa8148cc6098131e729d418dfc82f6d10c0251bfc4fff51053caa24a2e51a3431de06925
7
- data.tar.gz: 51fab65616d9ae1066eb23fa6e91acf51a67f574620f729d8738bfd7dc20b97714fa58e7f860aad2d5f479a686a929a2632aad12522c0072ba09f8cec41349c4
6
+ metadata.gz: a517fa329a6c6edb500830e0d1cc189390c71753163f6b0bf94437e5c8e70f969dbc92021aee82896d1b687c9a7ed2c9aaf17322e8ff67d4a0b473ebdc06b494
7
+ data.tar.gz: eda0abc9317c005b5a0230c12d51877ae767b33a225977ebaf6230cc201ba72c4225e82a79b5def7bc0e5ba7c99a52f19b5f7492e97684700fa19a52b0d643fc
@@ -1,12 +1,12 @@
1
1
  module PaymentGateway
2
- def authorize_payment(amount, payload, payment_id, return_url, options = {})
2
+ def authorize_payment(amount, payload, payment_id, return_url, constituent_id, options = {})
3
3
  parameters = {
4
4
  'Amount': amount,
5
5
  'Card': {
6
6
  'TessituraMerchantServicesData': payload,
7
7
  },
8
8
  'PaymentId': payment_id,
9
- 'ConstituentId': 0, # TODO
9
+ 'ConstituentId': constituent_id,
10
10
  'TransactionOrigin': 'webapi',
11
11
  'PaymentMethodId': 606,
12
12
  'ReturnUrl': return_url,
@@ -25,4 +25,16 @@ module PaymentGateway
25
25
  options.merge!(:body => parameters)
26
26
  self.class.post(base_api_endpoint('PaymentGateway/Authorization/Finalize'), options)
27
27
  end
28
- end
28
+
29
+ def reversal_request(amount, reference_number, payment_id, options = {})
30
+ parameters = {
31
+ 'Amount': amount,
32
+ 'PaymentId': payment_id,
33
+ 'TransactionOrigin': 'webapi',
34
+ 'PaymentMethodId': 606,
35
+ }
36
+ options.merge!(basic_auth: @auth, headers: @headers)
37
+ options.merge!(:body => parameters)
38
+ self.class.post(base_api_endpoint("PaymentGateway/Authorization/#{reference_number}/Reverse"), options)
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  class TessituraRest
2
- VERSION = '1.2.8'.freeze
2
+ VERSION = '1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tessitura_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.8
4
+ version: '1.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brittany Martin, Danielle Greaves, Craig Donavin, Patrick FitzGerald
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-13 00:00:00.000000000 Z
11
+ date: 2023-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler