justifi 0.6.6 → 0.7.0

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: 336f40c377552950348f439beca86b56603279f8957ac57a5d149a7d85517edc
4
- data.tar.gz: 30ae032dc49f5e59fe4f8929dc6408db7f60f04b8edd54ccf2bcbe9b040e4c49
3
+ metadata.gz: 9e74017f5b2be791292f47560f534406de989594cb16b66eaf37564555260518
4
+ data.tar.gz: 0d220c6eb7bf63788d8af59920e482a6d0f2fede86ecb789117e20c7d0214580
5
5
  SHA512:
6
- metadata.gz: b0f05db84aef2bae4395cbe6ebd4a7bccfa5dc886157cfb7367a7abfb993c2e51adec6466f1d8da35aba9d47de79d49726174c43869e249d190c254300544eb4
7
- data.tar.gz: 41afe74e5e8c8365368c70e0d51c52db8efa569443d583cf1b5ac3389cd72291ac153678b17e7093596f7968c95499fe5fb33cd86e23ded4cf0d7fb71a2a3d5e
6
+ metadata.gz: 7bf35dcd7e144683cf7aeb100ac51681b11e433e6ab5af40520befb301cc97493275f078759fb94ed6f51cfa6b39d0fdbfc737f238f1ea0fc8c7961129917b94
7
+ data.tar.gz: 9df2db072666a0e1ec81d5a8781fd677ad3693893111a61df29f14a13243df4b65d245f7ca8e9667970bb410b12ae450ca3bf4d416e96a945a37769c39c6bf9f
@@ -20,7 +20,8 @@ module Justifi
20
20
  JustifiOperations.idempotently_request("/v1/disputes/#{dispute_id}",
21
21
  method: :patch,
22
22
  params: params,
23
- headers: {})
23
+ headers: {},
24
+ idempotency_key: idempotency_key)
24
25
  end
25
26
  end
26
27
  end
@@ -10,22 +10,24 @@ module Justifi
10
10
  JustifiOperations.idempotently_request("/v1/payments",
11
11
  method: :post,
12
12
  params: params,
13
- headers: headers)
13
+ headers: headers,
14
+ idempotency_key: idempotency_key)
14
15
  end
15
16
 
16
- def create_refund(amount:, payment_id:, reason: nil, description: nil, metadata: nil)
17
+ def create_refund(amount:, payment_id:, reason: nil, description: nil, metadata: nil, idempotency_key: nil)
17
18
  refund_params = {amount: amount, description: description, reason: reason, metadata: metadata}
18
19
  JustifiOperations.idempotently_request("/v1/payments/#{payment_id}/refunds",
19
20
  method: :post,
20
21
  params: refund_params,
21
- headers: {})
22
+ headers: {},
23
+ idempotency_key: idempotency_key)
22
24
  end
23
25
 
24
26
  def list(params: {}, headers: {}, seller_account_id: nil, sub_account_id: nil)
25
27
  Justifi.seller_account_deprecation_warning if seller_account_id
26
28
  headers[:sub_account] = sub_account_id || seller_account_id if sub_account_id || seller_account_id
27
29
 
28
- JustifiOperations.execute_get_request("/v1/payments", params, headers)
30
+ Justifi::ListObject.list("/v1/payments", params, headers)
29
31
  end
30
32
 
31
33
  def get(payment_id:, headers: {})
@@ -38,7 +40,8 @@ module Justifi
38
40
  JustifiOperations.idempotently_request("/v1/payments/#{payment_id}",
39
41
  method: :patch,
40
42
  params: params,
41
- headers: {})
43
+ headers: {},
44
+ idempotency_key: idempotency_key)
42
45
  end
43
46
 
44
47
  def capture(payment_id:, amount: nil, headers: {}, idempotency_key: nil)
@@ -46,7 +49,14 @@ module Justifi
46
49
  JustifiOperations.idempotently_request("/v1/payments/#{payment_id}/capture",
47
50
  method: :post,
48
51
  params: params,
49
- headers: {})
52
+ headers: {},
53
+ idempotency_key: idempotency_key)
54
+ end
55
+
56
+ def balance_transactions(payment_id:, params: {}, headers: {})
57
+ Justifi::ListObject.list("/v1/payments/#{payment_id}/payment_balance_transactions",
58
+ params,
59
+ headers)
50
60
  end
51
61
  end
52
62
  end
@@ -27,11 +27,12 @@ module Justifi
27
27
  headers)
28
28
  end
29
29
 
30
- def update(token:, card_params:, headers: {})
30
+ def update(token:, card_params:, headers: {}, idempotency_key: nil)
31
31
  JustifiOperations.idempotently_request("/v1/payment_methods/#{token}",
32
32
  method: :patch,
33
33
  params: card_params,
34
- headers: {})
34
+ headers: {},
35
+ idempotency_key: idempotency_key)
35
36
  end
36
37
  end
37
38
  end
@@ -20,7 +20,8 @@ module Justifi
20
20
  JustifiOperations.idempotently_request("/v1/payouts/#{payout_id}",
21
21
  method: :patch,
22
22
  params: params,
23
- headers: {})
23
+ headers: {},
24
+ idempotency_key: idempotency_key)
24
25
  end
25
26
  end
26
27
  end
@@ -20,7 +20,8 @@ module Justifi
20
20
  JustifiOperations.idempotently_request("/v1/refunds/#{refund_id}",
21
21
  method: :patch,
22
22
  params: params,
23
- headers: {})
23
+ headers: {},
24
+ idempotency_key: idempotency_key)
24
25
  end
25
26
  end
26
27
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Justifi
4
- VERSION = "0.6.6"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: justifi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.6
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JustiFi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: byebug