treezor_connect 0.27.0 → 0.28.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 +4 -4
- data/lib/treezor_connect/api_resource.rb +11 -9
- data/lib/treezor_connect/resources/card_transaction.rb +16 -0
- data/lib/treezor_connect/resources/payin_refund.rb +16 -0
- data/lib/treezor_connect/resources/payout.rb +2 -0
- data/lib/treezor_connect/resources/payout_refund.rb +16 -0
- data/lib/treezor_connect/resources/transfer.rb +18 -0
- data/lib/treezor_connect/resources/user/relationship.rb +1 -0
- data/lib/treezor_connect/resources/user.rb +5 -0
- data/lib/treezor_connect/resources.rb +4 -0
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5493050c9c01cf83ca915626adc01a579282ab593df38f6fb0bfb7d3eae5f71
|
|
4
|
+
data.tar.gz: b2b09954650277e4f4029561aca094c5a528ee7243fdecfb49584f89257c82e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2504099f5e1ecff3228093ed0c17180133d8ef05d468ee6004af9c5dd15896e2092bad2b571a81c3cffa46b4cfa42c840f7a0d0208c48777f1046807d994bae
|
|
7
|
+
data.tar.gz: a8a59e53ca0bd822824392d00f2a68db36f65552ed83236a31465f5b79ab85d91d123dcd056cbf72b92e2123ec2927b620e1ce46a821d2d972f4a8faeb05d21b
|
|
@@ -11,13 +11,13 @@ module TreezorConnect
|
|
|
11
11
|
'on its subclasses (Payin, Payout, Transfer ...)'
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def custom_action(http_method, *actions, ignores_id: false, first_letter_upcased: false)
|
|
14
|
+
def custom_action(http_method, *actions, ignores_id: false, first_letter_upcased: false, without_body: false)
|
|
15
15
|
actions.each do |action|
|
|
16
16
|
case http_method
|
|
17
17
|
when :post
|
|
18
18
|
define_method_with_params(http_method, action, first_letter_upcased)
|
|
19
19
|
when :put, :patch
|
|
20
|
-
define_put_path_methods(http_method, action, ignores_id, first_letter_upcased)
|
|
20
|
+
define_put_path_methods(http_method, action, ignores_id, first_letter_upcased, without_body)
|
|
21
21
|
else
|
|
22
22
|
raise ArgumentError, "Unsupported HTTP method: #{http_method}"
|
|
23
23
|
end
|
|
@@ -34,26 +34,28 @@ module TreezorConnect
|
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
-
def define_put_path_methods(http_method, action, ignores_id, first_letter_upcased)
|
|
37
|
+
def define_put_path_methods(http_method, action, ignores_id, first_letter_upcased, without_body)
|
|
38
38
|
if ignores_id
|
|
39
|
-
define_method_without_id_and_params(http_method, action, first_letter_upcased)
|
|
39
|
+
define_method_without_id_and_params(http_method, action, first_letter_upcased, without_body)
|
|
40
40
|
else
|
|
41
|
-
define_method_with_id_and_params(http_method, action, first_letter_upcased)
|
|
41
|
+
define_method_with_id_and_params(http_method, action, first_letter_upcased, without_body)
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
def define_method_with_id_and_params(http_method, action, first_letter_upcased)
|
|
45
|
+
def define_method_with_id_and_params(http_method, action, first_letter_upcased, without_body)
|
|
46
46
|
define_singleton_method(action) do |id, params = {}, access_token = nil|
|
|
47
47
|
url = build_url(action, first_letter_upcased, id)
|
|
48
|
-
|
|
48
|
+
request_params = without_body ? {} : { body: params }
|
|
49
|
+
response = request(http_method, url, params: request_params, access_token:)
|
|
49
50
|
process_response(response)
|
|
50
51
|
end
|
|
51
52
|
end
|
|
52
53
|
|
|
53
|
-
def define_method_without_id_and_params(http_method, action, first_letter_upcased)
|
|
54
|
+
def define_method_without_id_and_params(http_method, action, first_letter_upcased, without_body)
|
|
54
55
|
define_singleton_method(action) do |params = {}, access_token = nil|
|
|
55
56
|
url = build_url(action, first_letter_upcased)
|
|
56
|
-
|
|
57
|
+
request_params = without_body ? {} : { body: params }
|
|
58
|
+
response = request(http_method, url, params: request_params, access_token:)
|
|
57
59
|
process_response(response)
|
|
58
60
|
end
|
|
59
61
|
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TreezorConnect
|
|
4
|
+
class CardTransaction < ApiResource
|
|
5
|
+
extend TreezorConnect::ApiOperations::List
|
|
6
|
+
extend TreezorConnect::ApiOperations::Fetch
|
|
7
|
+
|
|
8
|
+
OBJECT_NAME = 'card_transaction'
|
|
9
|
+
OBJECT_KEY = 'cardtransactions'
|
|
10
|
+
OBJECT_PRIMARY_KEY = 'cardtransactionId'
|
|
11
|
+
|
|
12
|
+
def self.resource_url
|
|
13
|
+
'/v1/cardtransactions'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TreezorConnect
|
|
4
|
+
class PayinRefund < ApiResource
|
|
5
|
+
extend TreezorConnect::ApiOperations::Fetch
|
|
6
|
+
extend TreezorConnect::ApiOperations::List
|
|
7
|
+
|
|
8
|
+
OBJECT_NAME = 'payin_refund'
|
|
9
|
+
OBJECT_KEY = 'payinrefunds'
|
|
10
|
+
OBJECT_PRIMARY_KEY = 'payinrefundId'
|
|
11
|
+
|
|
12
|
+
def self.resource_url
|
|
13
|
+
'/v1/payinrefunds'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TreezorConnect
|
|
4
|
+
class PayoutRefund < ApiResource
|
|
5
|
+
extend TreezorConnect::ApiOperations::Fetch
|
|
6
|
+
extend TreezorConnect::ApiOperations::Create
|
|
7
|
+
|
|
8
|
+
OBJECT_NAME = 'payoutRefund'
|
|
9
|
+
OBJECT_KEY = 'payoutRefunds'
|
|
10
|
+
OBJECT_PRIMARY_KEY = 'payoutRefundId'
|
|
11
|
+
|
|
12
|
+
def self.resource_url
|
|
13
|
+
'/v1/payoutRefunds'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module TreezorConnect
|
|
4
|
+
class Transfer < ApiResource
|
|
5
|
+
extend TreezorConnect::ApiOperations::Create
|
|
6
|
+
extend TreezorConnect::ApiOperations::Fetch
|
|
7
|
+
extend TreezorConnect::ApiOperations::List
|
|
8
|
+
extend TreezorConnect::ApiOperations::Delete
|
|
9
|
+
|
|
10
|
+
OBJECT_NAME = 'transfer'
|
|
11
|
+
OBJECT_KEY = 'transfers'
|
|
12
|
+
OBJECT_PRIMARY_KEY = 'transferId'
|
|
13
|
+
|
|
14
|
+
def self.resource_url
|
|
15
|
+
'/v1/transfers'
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -4,6 +4,11 @@ module TreezorConnect
|
|
|
4
4
|
class User < ApiResource
|
|
5
5
|
extend TreezorConnect::ApiOperations::Create
|
|
6
6
|
extend TreezorConnect::ApiOperations::Update
|
|
7
|
+
extend TreezorConnect::ApiOperations::Fetch
|
|
8
|
+
extend TreezorConnect::ApiOperations::List
|
|
9
|
+
extend TreezorConnect::ApiOperations::Delete
|
|
10
|
+
|
|
11
|
+
custom_action :put, :kycreview, first_letter_upcased: true, without_body: true
|
|
7
12
|
|
|
8
13
|
OBJECT_NAME = 'user'
|
|
9
14
|
OBJECT_KEY = 'users'
|
|
@@ -18,3 +18,7 @@ require 'treezor_connect/resources/sca/passcode'
|
|
|
18
18
|
require 'treezor_connect/resources/sca/wallet'
|
|
19
19
|
require 'treezor_connect/resources/sct_inst/payin'
|
|
20
20
|
require 'treezor_connect/resources/sct_inst/recall'
|
|
21
|
+
require 'treezor_connect/resources/transfer'
|
|
22
|
+
require 'treezor_connect/resources/card_transaction'
|
|
23
|
+
require 'treezor_connect/resources/payin_refund'
|
|
24
|
+
require 'treezor_connect/resources/payout_refund'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: treezor_connect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.28.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- stefakins
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-10-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: faraday
|
|
@@ -93,17 +93,21 @@ files:
|
|
|
93
93
|
- lib/treezor_connect/resources/beneficiary_validation.rb
|
|
94
94
|
- lib/treezor_connect/resources/card.rb
|
|
95
95
|
- lib/treezor_connect/resources/card_image.rb
|
|
96
|
+
- lib/treezor_connect/resources/card_transaction.rb
|
|
96
97
|
- lib/treezor_connect/resources/document.rb
|
|
97
98
|
- lib/treezor_connect/resources/mass_payout.rb
|
|
98
99
|
- lib/treezor_connect/resources/oauth/token.rb
|
|
99
100
|
- lib/treezor_connect/resources/payin.rb
|
|
101
|
+
- lib/treezor_connect/resources/payin_refund.rb
|
|
100
102
|
- lib/treezor_connect/resources/payout.rb
|
|
103
|
+
- lib/treezor_connect/resources/payout_refund.rb
|
|
101
104
|
- lib/treezor_connect/resources/sca/external_operation.rb
|
|
102
105
|
- lib/treezor_connect/resources/sca/passcode.rb
|
|
103
106
|
- lib/treezor_connect/resources/sca/wallet.rb
|
|
104
107
|
- lib/treezor_connect/resources/sct_inst/payin.rb
|
|
105
108
|
- lib/treezor_connect/resources/sct_inst/recall.rb
|
|
106
109
|
- lib/treezor_connect/resources/tax_residence.rb
|
|
110
|
+
- lib/treezor_connect/resources/transfer.rb
|
|
107
111
|
- lib/treezor_connect/resources/user.rb
|
|
108
112
|
- lib/treezor_connect/resources/user/relationship.rb
|
|
109
113
|
- lib/treezor_connect/resources/wallet.rb
|
|
@@ -130,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
130
134
|
- !ruby/object:Gem::Version
|
|
131
135
|
version: '0'
|
|
132
136
|
requirements: []
|
|
133
|
-
rubygems_version: 3.
|
|
137
|
+
rubygems_version: 3.5.22
|
|
134
138
|
signing_key:
|
|
135
139
|
specification_version: 4
|
|
136
140
|
summary: A gem for making HTTP calls to Treezor Connect.
|