payabli 2.2.20 → 2.2.21
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/.fern/metadata.json +4 -3
- data/LICENSE.md +5 -6
- data/README.md +6 -0
- data/lib/payabli/bill/client.rb +11 -11
- data/lib/payabli/boarding/client.rb +10 -10
- data/lib/payabli/charge_backs/client.rb +3 -3
- data/lib/payabli/client.rb +11 -1
- data/lib/payabli/cloud/client.rb +4 -4
- data/lib/payabli/customer/client.rb +6 -6
- data/lib/payabli/export/client.rb +29 -29
- data/lib/payabli/ghost_card/client.rb +99 -0
- data/lib/payabli/ghost_card/types/card_status.rb +16 -0
- data/lib/payabli/ghost_card/types/create_ghost_card_request_body.rb +27 -0
- data/lib/payabli/ghost_card/types/create_ghost_card_response.rb +14 -0
- data/lib/payabli/ghost_card/types/create_ghost_card_response_data.rb +13 -0
- data/lib/payabli/ghost_card/types/update_card_request_body.rb +13 -0
- data/lib/payabli/hosted_payment_pages/client.rb +3 -3
- data/lib/payabli/import/client.rb +3 -3
- data/lib/payabli/invoice/client.rb +11 -11
- data/lib/payabli/line_item/client.rb +5 -5
- data/lib/payabli/money_in/client.rb +13 -13
- data/lib/payabli/money_out/client.rb +7 -7
- data/lib/payabli/notification/client.rb +4 -4
- data/lib/payabli/notificationlogs/client.rb +2 -2
- data/lib/payabli/ocr/client.rb +2 -2
- data/lib/payabli/organization/client.rb +6 -6
- data/lib/payabli/payment_link/client.rb +11 -11
- data/lib/payabli/payment_method_domain/client.rb +5 -5
- data/lib/payabli/payout_subscription/client.rb +160 -0
- data/lib/payabli/payout_subscription/types/add_payout_subscription_response.rb +15 -0
- data/lib/payabli/payout_subscription/types/delete_payout_subscription_response.rb +14 -0
- data/lib/payabli/payout_subscription/types/get_payout_subscription_response.rb +14 -0
- data/lib/payabli/payout_subscription/types/payout_payment_detail.rb +24 -0
- data/lib/payabli/payout_subscription/types/payout_schedule_detail.rb +13 -0
- data/lib/payabli/payout_subscription/types/payout_set_pause.rb +25 -0
- data/lib/payabli/payout_subscription/types/payout_subscription_query_record.rb +39 -0
- data/lib/payabli/payout_subscription/types/payout_subscription_query_record_pascal.rb +39 -0
- data/lib/payabli/payout_subscription/types/payout_subscription_request_body.rb +20 -0
- data/lib/payabli/payout_subscription/types/query_payout_subscription_response.rb +13 -0
- data/lib/payabli/payout_subscription/types/request_payout_schedule.rb +12 -0
- data/lib/payabli/payout_subscription/types/update_payout_subscription_body.rb +14 -0
- data/lib/payabli/payout_subscription/types/update_payout_subscription_response.rb +15 -0
- data/lib/payabli/paypoint/client.rb +7 -7
- data/lib/payabli/query/client.rb +143 -43
- data/lib/payabli/query/types/list_payout_subscriptions_org_request.rb +16 -0
- data/lib/payabli/query/types/list_payout_subscriptions_request.rb +16 -0
- data/lib/payabli/statistic/client.rb +4 -4
- data/lib/payabli/subscription/client.rb +3 -3
- data/lib/payabli/templates/client.rb +4 -4
- data/lib/payabli/token_storage/client.rb +3 -3
- data/lib/payabli/user/client.rb +6 -6
- data/lib/payabli/vendor/client.rb +4 -4
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +22 -0
- data/reference.md +1304 -372
- data/wiremock/wiremock-mappings.json +1 -1
- metadata +23 -1
|
@@ -70,7 +70,7 @@ module Payabli
|
|
|
70
70
|
request = Payabli::Internal::JSON::Request.new(
|
|
71
71
|
base_url: request_options[:base_url],
|
|
72
72
|
method: "DELETE",
|
|
73
|
-
path: "Organization/#{params[:org_id]}",
|
|
73
|
+
path: "Organization/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
74
74
|
request_options: request_options
|
|
75
75
|
)
|
|
76
76
|
begin
|
|
@@ -108,7 +108,7 @@ module Payabli
|
|
|
108
108
|
request = Payabli::Internal::JSON::Request.new(
|
|
109
109
|
base_url: request_options[:base_url],
|
|
110
110
|
method: "PUT",
|
|
111
|
-
path: "Organization/#{params[:org_id]}",
|
|
111
|
+
path: "Organization/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
112
112
|
body: body,
|
|
113
113
|
request_options: request_options
|
|
114
114
|
)
|
|
@@ -143,7 +143,7 @@ module Payabli
|
|
|
143
143
|
request = Payabli::Internal::JSON::Request.new(
|
|
144
144
|
base_url: request_options[:base_url],
|
|
145
145
|
method: "GET",
|
|
146
|
-
path: "Organization/basic/#{params[:entry]}",
|
|
146
|
+
path: "Organization/basic/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
147
147
|
request_options: request_options
|
|
148
148
|
)
|
|
149
149
|
begin
|
|
@@ -177,7 +177,7 @@ module Payabli
|
|
|
177
177
|
request = Payabli::Internal::JSON::Request.new(
|
|
178
178
|
base_url: request_options[:base_url],
|
|
179
179
|
method: "GET",
|
|
180
|
-
path: "Organization/basicById/#{params[:org_id]}",
|
|
180
|
+
path: "Organization/basicById/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
181
181
|
request_options: request_options
|
|
182
182
|
)
|
|
183
183
|
begin
|
|
@@ -211,7 +211,7 @@ module Payabli
|
|
|
211
211
|
request = Payabli::Internal::JSON::Request.new(
|
|
212
212
|
base_url: request_options[:base_url],
|
|
213
213
|
method: "GET",
|
|
214
|
-
path: "Organization/read/#{params[:org_id]}",
|
|
214
|
+
path: "Organization/read/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
215
215
|
request_options: request_options
|
|
216
216
|
)
|
|
217
217
|
begin
|
|
@@ -245,7 +245,7 @@ module Payabli
|
|
|
245
245
|
request = Payabli::Internal::JSON::Request.new(
|
|
246
246
|
base_url: request_options[:base_url],
|
|
247
247
|
method: "GET",
|
|
248
|
-
path: "Organization/settings/#{params[:org_id]}",
|
|
248
|
+
path: "Organization/settings/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
249
249
|
request_options: request_options
|
|
250
250
|
)
|
|
251
251
|
begin
|
|
@@ -42,7 +42,7 @@ module Payabli
|
|
|
42
42
|
request = Payabli::Internal::JSON::Request.new(
|
|
43
43
|
base_url: request_options[:base_url],
|
|
44
44
|
method: "POST",
|
|
45
|
-
path: "PaymentLink/#{params[:id_invoice]}",
|
|
45
|
+
path: "PaymentLink/#{URI.encode_uri_component(params[:id_invoice].to_s)}",
|
|
46
46
|
headers: headers,
|
|
47
47
|
query: query_params,
|
|
48
48
|
body: Payabli::PaymentLink::Types::PaymentPageRequestBody.new(body_params).to_h,
|
|
@@ -95,7 +95,7 @@ module Payabli
|
|
|
95
95
|
request = Payabli::Internal::JSON::Request.new(
|
|
96
96
|
base_url: request_options[:base_url],
|
|
97
97
|
method: "POST",
|
|
98
|
-
path: "PaymentLink/bill/#{params[:bill_id]}",
|
|
98
|
+
path: "PaymentLink/bill/#{URI.encode_uri_component(params[:bill_id].to_s)}",
|
|
99
99
|
headers: headers,
|
|
100
100
|
query: query_params,
|
|
101
101
|
body: Payabli::PaymentLink::Types::PaymentPageRequestBodyOut.new(body_params).to_h,
|
|
@@ -132,7 +132,7 @@ module Payabli
|
|
|
132
132
|
request = Payabli::Internal::JSON::Request.new(
|
|
133
133
|
base_url: request_options[:base_url],
|
|
134
134
|
method: "DELETE",
|
|
135
|
-
path: "PaymentLink/#{params[:pay_link_id]}",
|
|
135
|
+
path: "PaymentLink/#{URI.encode_uri_component(params[:pay_link_id].to_s)}",
|
|
136
136
|
request_options: request_options
|
|
137
137
|
)
|
|
138
138
|
begin
|
|
@@ -166,7 +166,7 @@ module Payabli
|
|
|
166
166
|
request = Payabli::Internal::JSON::Request.new(
|
|
167
167
|
base_url: request_options[:base_url],
|
|
168
168
|
method: "GET",
|
|
169
|
-
path: "PaymentLink/load/#{params[:paylink_id]}",
|
|
169
|
+
path: "PaymentLink/load/#{URI.encode_uri_component(params[:paylink_id].to_s)}",
|
|
170
170
|
request_options: request_options
|
|
171
171
|
)
|
|
172
172
|
begin
|
|
@@ -200,7 +200,7 @@ module Payabli
|
|
|
200
200
|
request = Payabli::Internal::JSON::Request.new(
|
|
201
201
|
base_url: request_options[:base_url],
|
|
202
202
|
method: "POST",
|
|
203
|
-
path: "PaymentLink/push/#{params[:pay_link_id]}",
|
|
203
|
+
path: "PaymentLink/push/#{URI.encode_uri_component(params[:pay_link_id].to_s)}",
|
|
204
204
|
body: Payabli::Types::PushPayLinkRequest.new(params).to_h,
|
|
205
205
|
request_options: request_options
|
|
206
206
|
)
|
|
@@ -241,7 +241,7 @@ module Payabli
|
|
|
241
241
|
request = Payabli::Internal::JSON::Request.new(
|
|
242
242
|
base_url: request_options[:base_url],
|
|
243
243
|
method: "GET",
|
|
244
|
-
path: "PaymentLink/refresh/#{params[:pay_link_id]}",
|
|
244
|
+
path: "PaymentLink/refresh/#{URI.encode_uri_component(params[:pay_link_id].to_s)}",
|
|
245
245
|
query: query_params,
|
|
246
246
|
request_options: request_options
|
|
247
247
|
)
|
|
@@ -284,7 +284,7 @@ module Payabli
|
|
|
284
284
|
request = Payabli::Internal::JSON::Request.new(
|
|
285
285
|
base_url: request_options[:base_url],
|
|
286
286
|
method: "GET",
|
|
287
|
-
path: "PaymentLink/send/#{params[:pay_link_id]}",
|
|
287
|
+
path: "PaymentLink/send/#{URI.encode_uri_component(params[:pay_link_id].to_s)}",
|
|
288
288
|
query: query_params,
|
|
289
289
|
request_options: request_options
|
|
290
290
|
)
|
|
@@ -323,7 +323,7 @@ module Payabli
|
|
|
323
323
|
request = Payabli::Internal::JSON::Request.new(
|
|
324
324
|
base_url: request_options[:base_url],
|
|
325
325
|
method: "PUT",
|
|
326
|
-
path: "PaymentLink/update/#{params[:pay_link_id]}",
|
|
326
|
+
path: "PaymentLink/update/#{URI.encode_uri_component(params[:pay_link_id].to_s)}",
|
|
327
327
|
body: body,
|
|
328
328
|
request_options: request_options
|
|
329
329
|
)
|
|
@@ -374,7 +374,7 @@ module Payabli
|
|
|
374
374
|
request = Payabli::Internal::JSON::Request.new(
|
|
375
375
|
base_url: request_options[:base_url],
|
|
376
376
|
method: "POST",
|
|
377
|
-
path: "PaymentLink/bill/lotNumber/#{params[:lot_number]}",
|
|
377
|
+
path: "PaymentLink/bill/lotNumber/#{URI.encode_uri_component(params[:lot_number].to_s)}",
|
|
378
378
|
query: query_params,
|
|
379
379
|
body: Payabli::PaymentLink::Types::PaymentPageRequestBodyOut.new(body_params).to_h,
|
|
380
380
|
request_options: request_options
|
|
@@ -412,7 +412,7 @@ module Payabli
|
|
|
412
412
|
request = Payabli::Internal::JSON::Request.new(
|
|
413
413
|
base_url: request_options[:base_url],
|
|
414
414
|
method: "PATCH",
|
|
415
|
-
path: "PaymentLink/out/#{params[:paylink_id]}",
|
|
415
|
+
path: "PaymentLink/out/#{URI.encode_uri_component(params[:paylink_id].to_s)}",
|
|
416
416
|
body: Payabli::PaymentLink::Types::PatchOutPaymentLinkRequest.new(params).to_h,
|
|
417
417
|
request_options: request_options
|
|
418
418
|
)
|
|
@@ -448,7 +448,7 @@ module Payabli
|
|
|
448
448
|
request = Payabli::Internal::JSON::Request.new(
|
|
449
449
|
base_url: request_options[:base_url],
|
|
450
450
|
method: "PATCH",
|
|
451
|
-
path: "PaymentLink/updateOut/#{params[:paylink_id]}",
|
|
451
|
+
path: "PaymentLink/updateOut/#{URI.encode_uri_component(params[:paylink_id].to_s)}",
|
|
452
452
|
body: Payabli::PaymentLink::Types::PaymentPageRequestBodyOut.new(params).to_h,
|
|
453
453
|
request_options: request_options
|
|
454
454
|
)
|
|
@@ -62,7 +62,7 @@ module Payabli
|
|
|
62
62
|
request = Payabli::Internal::JSON::Request.new(
|
|
63
63
|
base_url: request_options[:base_url],
|
|
64
64
|
method: "POST",
|
|
65
|
-
path: "PaymentMethodDomain/#{params[:domain_id]}/cascade",
|
|
65
|
+
path: "PaymentMethodDomain/#{URI.encode_uri_component(params[:domain_id].to_s)}/cascade",
|
|
66
66
|
request_options: request_options
|
|
67
67
|
)
|
|
68
68
|
begin
|
|
@@ -97,7 +97,7 @@ module Payabli
|
|
|
97
97
|
request = Payabli::Internal::JSON::Request.new(
|
|
98
98
|
base_url: request_options[:base_url],
|
|
99
99
|
method: "DELETE",
|
|
100
|
-
path: "PaymentMethodDomain/#{params[:domain_id]}",
|
|
100
|
+
path: "PaymentMethodDomain/#{URI.encode_uri_component(params[:domain_id].to_s)}",
|
|
101
101
|
request_options: request_options
|
|
102
102
|
)
|
|
103
103
|
begin
|
|
@@ -131,7 +131,7 @@ module Payabli
|
|
|
131
131
|
request = Payabli::Internal::JSON::Request.new(
|
|
132
132
|
base_url: request_options[:base_url],
|
|
133
133
|
method: "GET",
|
|
134
|
-
path: "PaymentMethodDomain/#{params[:domain_id]}",
|
|
134
|
+
path: "PaymentMethodDomain/#{URI.encode_uri_component(params[:domain_id].to_s)}",
|
|
135
135
|
request_options: request_options
|
|
136
136
|
)
|
|
137
137
|
begin
|
|
@@ -215,7 +215,7 @@ module Payabli
|
|
|
215
215
|
request = Payabli::Internal::JSON::Request.new(
|
|
216
216
|
base_url: request_options[:base_url],
|
|
217
217
|
method: "PATCH",
|
|
218
|
-
path: "PaymentMethodDomain/#{params[:domain_id]}",
|
|
218
|
+
path: "PaymentMethodDomain/#{URI.encode_uri_component(params[:domain_id].to_s)}",
|
|
219
219
|
body: body,
|
|
220
220
|
request_options: request_options
|
|
221
221
|
)
|
|
@@ -251,7 +251,7 @@ module Payabli
|
|
|
251
251
|
request = Payabli::Internal::JSON::Request.new(
|
|
252
252
|
base_url: request_options[:base_url],
|
|
253
253
|
method: "POST",
|
|
254
|
-
path: "PaymentMethodDomain/#{params[:domain_id]}/verify",
|
|
254
|
+
path: "PaymentMethodDomain/#{URI.encode_uri_component(params[:domain_id].to_s)}/verify",
|
|
255
255
|
request_options: request_options
|
|
256
256
|
)
|
|
257
257
|
begin
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
class Client
|
|
6
|
+
# @param client [Payabli::Internal::Http::RawClient]
|
|
7
|
+
#
|
|
8
|
+
# @return [void]
|
|
9
|
+
def initialize(client:)
|
|
10
|
+
@client = client
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
# Creates a payout subscription to automatically send payouts to a vendor on a recurring schedule. See [Manage
|
|
14
|
+
# payout subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for a step-by-step guide.
|
|
15
|
+
#
|
|
16
|
+
# @param request_options [Hash]
|
|
17
|
+
# @param params [Payabli::PayoutSubscription::Types::PayoutSubscriptionRequestBody]
|
|
18
|
+
# @option request_options [String] :base_url
|
|
19
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
20
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
21
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
22
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
23
|
+
# @option params [String, nil] :idempotency_key
|
|
24
|
+
#
|
|
25
|
+
# @return [Payabli::PayoutSubscription::Types::AddPayoutSubscriptionResponse]
|
|
26
|
+
def create_payout_subscription(request_options: {}, **params)
|
|
27
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
28
|
+
headers = {}
|
|
29
|
+
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
30
|
+
|
|
31
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
32
|
+
base_url: request_options[:base_url],
|
|
33
|
+
method: "POST",
|
|
34
|
+
path: "PayoutSubscription",
|
|
35
|
+
headers: headers,
|
|
36
|
+
body: Payabli::PayoutSubscription::Types::PayoutSubscriptionRequestBody.new(params).to_h,
|
|
37
|
+
request_options: request_options
|
|
38
|
+
)
|
|
39
|
+
begin
|
|
40
|
+
response = @client.send(request)
|
|
41
|
+
rescue Net::HTTPRequestTimeout
|
|
42
|
+
raise Payabli::Errors::TimeoutError
|
|
43
|
+
end
|
|
44
|
+
code = response.code.to_i
|
|
45
|
+
if code.between?(200, 299)
|
|
46
|
+
Payabli::PayoutSubscription::Types::AddPayoutSubscriptionResponse.load(response.body)
|
|
47
|
+
else
|
|
48
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
49
|
+
raise error_class.new(response.body, code: code)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Retrieves a single payout subscription's details. See [Manage payout
|
|
54
|
+
# subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information.
|
|
55
|
+
#
|
|
56
|
+
# @param request_options [Hash]
|
|
57
|
+
# @param params [Hash]
|
|
58
|
+
# @option request_options [String] :base_url
|
|
59
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
60
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
61
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
62
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
63
|
+
# @option params [Integer] :id
|
|
64
|
+
#
|
|
65
|
+
# @return [Payabli::PayoutSubscription::Types::GetPayoutSubscriptionResponse]
|
|
66
|
+
def get_payout_subscription(request_options: {}, **params)
|
|
67
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
68
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
69
|
+
base_url: request_options[:base_url],
|
|
70
|
+
method: "GET",
|
|
71
|
+
path: "PayoutSubscription/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
72
|
+
request_options: request_options
|
|
73
|
+
)
|
|
74
|
+
begin
|
|
75
|
+
response = @client.send(request)
|
|
76
|
+
rescue Net::HTTPRequestTimeout
|
|
77
|
+
raise Payabli::Errors::TimeoutError
|
|
78
|
+
end
|
|
79
|
+
code = response.code.to_i
|
|
80
|
+
if code.between?(200, 299)
|
|
81
|
+
Payabli::PayoutSubscription::Types::GetPayoutSubscriptionResponse.load(response.body)
|
|
82
|
+
else
|
|
83
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
84
|
+
raise error_class.new(response.body, code: code)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Updates a payout subscription's details. See [Manage payout
|
|
89
|
+
# subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information.
|
|
90
|
+
#
|
|
91
|
+
# @param request_options [Hash]
|
|
92
|
+
# @param params [Payabli::PayoutSubscription::Types::UpdatePayoutSubscriptionBody]
|
|
93
|
+
# @option request_options [String] :base_url
|
|
94
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
95
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
96
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
97
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
98
|
+
# @option params [Integer] :id
|
|
99
|
+
#
|
|
100
|
+
# @return [Payabli::PayoutSubscription::Types::UpdatePayoutSubscriptionResponse]
|
|
101
|
+
def update_payout_subscription(request_options: {}, **params)
|
|
102
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
103
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
104
|
+
base_url: request_options[:base_url],
|
|
105
|
+
method: "PUT",
|
|
106
|
+
path: "PayoutSubscription/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
107
|
+
body: Payabli::PayoutSubscription::Types::UpdatePayoutSubscriptionBody.new(params).to_h,
|
|
108
|
+
request_options: request_options
|
|
109
|
+
)
|
|
110
|
+
begin
|
|
111
|
+
response = @client.send(request)
|
|
112
|
+
rescue Net::HTTPRequestTimeout
|
|
113
|
+
raise Payabli::Errors::TimeoutError
|
|
114
|
+
end
|
|
115
|
+
code = response.code.to_i
|
|
116
|
+
if code.between?(200, 299)
|
|
117
|
+
Payabli::PayoutSubscription::Types::UpdatePayoutSubscriptionResponse.load(response.body)
|
|
118
|
+
else
|
|
119
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
120
|
+
raise error_class.new(response.body, code: code)
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Deletes a payout subscription and prevents future payouts. See [Manage payout
|
|
125
|
+
# subscriptions](/guides/pay-out-developer-payout-subscriptions-manage) for more information.
|
|
126
|
+
#
|
|
127
|
+
# @param request_options [Hash]
|
|
128
|
+
# @param params [Hash]
|
|
129
|
+
# @option request_options [String] :base_url
|
|
130
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
131
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
132
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
133
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
134
|
+
# @option params [Integer] :id
|
|
135
|
+
#
|
|
136
|
+
# @return [Payabli::PayoutSubscription::Types::DeletePayoutSubscriptionResponse]
|
|
137
|
+
def delete_payout_subscription(request_options: {}, **params)
|
|
138
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
139
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
140
|
+
base_url: request_options[:base_url],
|
|
141
|
+
method: "DELETE",
|
|
142
|
+
path: "PayoutSubscription/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
143
|
+
request_options: request_options
|
|
144
|
+
)
|
|
145
|
+
begin
|
|
146
|
+
response = @client.send(request)
|
|
147
|
+
rescue Net::HTTPRequestTimeout
|
|
148
|
+
raise Payabli::Errors::TimeoutError
|
|
149
|
+
end
|
|
150
|
+
code = response.code.to_i
|
|
151
|
+
if code.between?(200, 299)
|
|
152
|
+
Payabli::PayoutSubscription::Types::DeletePayoutSubscriptionResponse.load(response.body)
|
|
153
|
+
else
|
|
154
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
155
|
+
raise error_class.new(response.body, code: code)
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
# Success response
|
|
7
|
+
class AddPayoutSubscriptionResponse < Internal::Types::Model
|
|
8
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
9
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
10
|
+
field :response_data, -> { Integer }, optional: false, nullable: false, api_name: "responseData"
|
|
11
|
+
field :customer_id, -> { Integer }, optional: true, nullable: false, api_name: "customerId"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
# Success response
|
|
7
|
+
class DeletePayoutSubscriptionResponse < Internal::Types::Model
|
|
8
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
9
|
+
field :response_data, -> { String }, optional: true, nullable: false, api_name: "responseData"
|
|
10
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
# Success response
|
|
7
|
+
class GetPayoutSubscriptionResponse < Internal::Types::Model
|
|
8
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
9
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
10
|
+
field :response_data, -> { Payabli::PayoutSubscription::Types::PayoutSubscriptionQueryRecord }, optional: true, nullable: false, api_name: "responseData"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
# Payment details for payout subscriptions.
|
|
7
|
+
class PayoutPaymentDetail < Internal::Types::Model
|
|
8
|
+
field :total_amount, -> { Integer }, optional: false, nullable: false, api_name: "totalAmount"
|
|
9
|
+
field :service_fee, -> { Integer }, optional: true, nullable: false, api_name: "serviceFee"
|
|
10
|
+
field :currency, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :check_number, -> { String }, optional: true, nullable: false, api_name: "checkNumber"
|
|
12
|
+
field :order_description, -> { String }, optional: true, nullable: false, api_name: "orderDescription"
|
|
13
|
+
field :order_id, -> { String }, optional: true, nullable: false, api_name: "orderId"
|
|
14
|
+
field :order_id_alternative, -> { String }, optional: true, nullable: false, api_name: "orderIdAlternative"
|
|
15
|
+
field :payment_description, -> { String }, optional: true, nullable: false, api_name: "paymentDescription"
|
|
16
|
+
field :settlement_descriptor, -> { String }, optional: true, nullable: false, api_name: "settlementDescriptor"
|
|
17
|
+
field :group_number, -> { String }, optional: true, nullable: false, api_name: "groupNumber"
|
|
18
|
+
field :source, -> { String }, optional: true, nullable: false
|
|
19
|
+
field :payabli_trans_id, -> { String }, optional: true, nullable: false, api_name: "payabliTransId"
|
|
20
|
+
field :unbundled, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
class PayoutScheduleDetail < Internal::Types::Model
|
|
7
|
+
field :start_date, -> { String }, optional: true, nullable: false, api_name: "startDate"
|
|
8
|
+
field :end_date, -> { String }, optional: true, nullable: false, api_name: "endDate"
|
|
9
|
+
field :frequency, -> { Payabli::Types::Frequency }, optional: true, nullable: false
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
module PayoutSetPause
|
|
7
|
+
# PayoutSetPause is an alias for Boolean
|
|
8
|
+
|
|
9
|
+
# @option str [String]
|
|
10
|
+
#
|
|
11
|
+
# @return [untyped]
|
|
12
|
+
def self.load(str)
|
|
13
|
+
::JSON.parse(str)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# @option value [untyped]
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
def self.dump(value)
|
|
20
|
+
::JSON.generate(value)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
class PayoutSubscriptionQueryRecord < Internal::Types::Model
|
|
7
|
+
field :id_out_subscription, -> { Integer }, optional: true, nullable: false, api_name: "idOutSubscription"
|
|
8
|
+
field :status, -> { Integer }, optional: true, nullable: false
|
|
9
|
+
field :events, -> { Internal::Types::Array[Payabli::Types::GeneralEvents] }, optional: true, nullable: false
|
|
10
|
+
field :vendor, -> { Payabli::Types::VendorQueryRecord }, optional: true, nullable: false
|
|
11
|
+
field :bill_data, -> { Internal::Types::Array[Payabli::Types::BillPayOutData] }, optional: true, nullable: false, api_name: "billData"
|
|
12
|
+
field :external_paypoint_id, -> { String }, optional: true, nullable: false, api_name: "externalPaypointID"
|
|
13
|
+
field :method_, -> { String }, optional: true, nullable: false, api_name: "method"
|
|
14
|
+
field :paypoint_id, -> { Integer }, optional: true, nullable: false, api_name: "paypointId"
|
|
15
|
+
field :total_amount, -> { Integer }, optional: true, nullable: false, api_name: "totalAmount"
|
|
16
|
+
field :net_amount, -> { Integer }, optional: true, nullable: false, api_name: "netAmount"
|
|
17
|
+
field :fee_amount, -> { Integer }, optional: true, nullable: false, api_name: "feeAmount"
|
|
18
|
+
field :payment_data, -> { Payabli::Types::QueryPaymentData }, optional: true, nullable: false, api_name: "paymentData"
|
|
19
|
+
field :start_date, -> { String }, optional: false, nullable: true, api_name: "startDate"
|
|
20
|
+
field :end_date, -> { String }, optional: false, nullable: true, api_name: "endDate"
|
|
21
|
+
field :next_date, -> { String }, optional: false, nullable: true, api_name: "nextDate"
|
|
22
|
+
field :frequency, -> { String }, optional: true, nullable: false
|
|
23
|
+
field :total_cycles, -> { Integer }, optional: true, nullable: false, api_name: "totalCycles"
|
|
24
|
+
field :left_cycles, -> { Integer }, optional: true, nullable: false, api_name: "leftCycles"
|
|
25
|
+
field :last_run, -> { String }, optional: false, nullable: true, api_name: "lastRun"
|
|
26
|
+
field :entrypage_id, -> { Integer }, optional: true, nullable: false, api_name: "entrypageId"
|
|
27
|
+
field :until_cancelled, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "untilCancelled"
|
|
28
|
+
field :last_updated, -> { String }, optional: true, nullable: false, api_name: "lastUpdated"
|
|
29
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "createdAt"
|
|
30
|
+
field :paypoint_legalname, -> { String }, optional: true, nullable: false, api_name: "paypointLegalname"
|
|
31
|
+
field :paypoint_dbaname, -> { String }, optional: true, nullable: false, api_name: "paypointDbaname"
|
|
32
|
+
field :paypoint_entryname, -> { String }, optional: true, nullable: false, api_name: "paypointEntryname"
|
|
33
|
+
field :parent_org_name, -> { String }, optional: true, nullable: false, api_name: "parentOrgName"
|
|
34
|
+
field :parent_org_id, -> { Integer }, optional: true, nullable: false, api_name: "parentOrgId"
|
|
35
|
+
field :source, -> { String }, optional: true, nullable: false
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
class PayoutSubscriptionQueryRecordPascal < Internal::Types::Model
|
|
7
|
+
field :id_out_subscription, -> { Integer }, optional: true, nullable: false, api_name: "IdOutSubscription"
|
|
8
|
+
field :status, -> { Integer }, optional: true, nullable: false, api_name: "Status"
|
|
9
|
+
field :events, -> { Internal::Types::Array[Payabli::Types::GeneralEvents] }, optional: true, nullable: false, api_name: "Events"
|
|
10
|
+
field :vendor, -> { Payabli::Types::VendorQueryRecord }, optional: true, nullable: false, api_name: "Vendor"
|
|
11
|
+
field :bill_data, -> { Internal::Types::Array[Payabli::Types::BillPayOutData] }, optional: true, nullable: false, api_name: "BillData"
|
|
12
|
+
field :external_paypoint_id, -> { String }, optional: true, nullable: false, api_name: "ExternalPaypointID"
|
|
13
|
+
field :method_, -> { String }, optional: true, nullable: false, api_name: "Method"
|
|
14
|
+
field :paypoint_id, -> { Integer }, optional: true, nullable: false, api_name: "PaypointId"
|
|
15
|
+
field :total_amount, -> { Integer }, optional: true, nullable: false, api_name: "TotalAmount"
|
|
16
|
+
field :net_amount, -> { Integer }, optional: true, nullable: false, api_name: "NetAmount"
|
|
17
|
+
field :fee_amount, -> { Integer }, optional: true, nullable: false, api_name: "FeeAmount"
|
|
18
|
+
field :payment_data, -> { Payabli::Types::QueryPaymentData }, optional: true, nullable: false, api_name: "PaymentData"
|
|
19
|
+
field :start_date, -> { String }, optional: false, nullable: true, api_name: "StartDate"
|
|
20
|
+
field :end_date, -> { String }, optional: false, nullable: true, api_name: "EndDate"
|
|
21
|
+
field :next_date, -> { String }, optional: false, nullable: true, api_name: "NextDate"
|
|
22
|
+
field :frequency, -> { String }, optional: true, nullable: false, api_name: "Frequency"
|
|
23
|
+
field :total_cycles, -> { Integer }, optional: true, nullable: false, api_name: "TotalCycles"
|
|
24
|
+
field :left_cycles, -> { Integer }, optional: true, nullable: false, api_name: "LeftCycles"
|
|
25
|
+
field :last_run, -> { String }, optional: false, nullable: true, api_name: "LastRun"
|
|
26
|
+
field :entrypage_id, -> { Integer }, optional: true, nullable: false, api_name: "EntrypageId"
|
|
27
|
+
field :until_cancelled, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "UntilCancelled"
|
|
28
|
+
field :last_updated, -> { String }, optional: true, nullable: false, api_name: "LastUpdated"
|
|
29
|
+
field :created_at, -> { String }, optional: true, nullable: false, api_name: "CreatedAt"
|
|
30
|
+
field :paypoint_legalname, -> { String }, optional: true, nullable: false, api_name: "PaypointLegalname"
|
|
31
|
+
field :paypoint_dbaname, -> { String }, optional: true, nullable: false, api_name: "PaypointDbaname"
|
|
32
|
+
field :paypoint_entryname, -> { String }, optional: true, nullable: false, api_name: "PaypointEntryname"
|
|
33
|
+
field :parent_org_name, -> { String }, optional: true, nullable: false, api_name: "ParentOrgName"
|
|
34
|
+
field :parent_org_id, -> { Integer }, optional: true, nullable: false, api_name: "ParentOrgId"
|
|
35
|
+
field :source, -> { String }, optional: true, nullable: false, api_name: "Source"
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
class PayoutSubscriptionRequestBody < Internal::Types::Model
|
|
7
|
+
field :entry_point, -> { String }, optional: false, nullable: false, api_name: "entryPoint"
|
|
8
|
+
field :subdomain, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :account_id, -> { String }, optional: true, nullable: false, api_name: "accountId"
|
|
10
|
+
field :source, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :set_pause, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "setPause"
|
|
12
|
+
field :payment_method, -> { Payabli::MoneyOutTypes::Types::AuthorizePaymentMethod }, optional: false, nullable: false, api_name: "paymentMethod"
|
|
13
|
+
field :payment_details, -> { Payabli::PayoutSubscription::Types::PayoutPaymentDetail }, optional: true, nullable: false, api_name: "paymentDetails"
|
|
14
|
+
field :vendor_data, -> { Payabli::MoneyOutTypes::Types::RequestOutAuthorizeVendorData }, optional: false, nullable: false, api_name: "vendorData"
|
|
15
|
+
field :bill_data, -> { Internal::Types::Array[Payabli::Types::BillPayOutDataRequest] }, optional: true, nullable: false, api_name: "billData"
|
|
16
|
+
field :schedule_details, -> { Payabli::PayoutSubscription::Types::PayoutScheduleDetail }, optional: true, nullable: false, api_name: "scheduleDetails"
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
# Payout subscription query response body.
|
|
7
|
+
class QueryPayoutSubscriptionResponse < Internal::Types::Model
|
|
8
|
+
field :summary, -> { Payabli::Types::QuerySummary }, optional: true, nullable: false, api_name: "Summary"
|
|
9
|
+
field :records, -> { Internal::Types::Array[Payabli::PayoutSubscription::Types::PayoutSubscriptionQueryRecordPascal] }, optional: true, nullable: false, api_name: "Records"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
class RequestPayoutSchedule < Internal::Types::Model
|
|
7
|
+
field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
|
|
8
|
+
field :body, -> { Payabli::PayoutSubscription::Types::PayoutSubscriptionRequestBody }, optional: false, nullable: false
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
class UpdatePayoutSubscriptionBody < Internal::Types::Model
|
|
7
|
+
field :set_pause, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "setPause"
|
|
8
|
+
field :payment_details, -> { Payabli::PayoutSubscription::Types::PayoutPaymentDetail }, optional: true, nullable: false, api_name: "paymentDetails"
|
|
9
|
+
field :payment_method, -> { Payabli::MoneyOutTypes::Types::AuthorizePaymentMethod }, optional: true, nullable: false, api_name: "paymentMethod"
|
|
10
|
+
field :schedule_details, -> { Payabli::PayoutSubscription::Types::PayoutScheduleDetail }, optional: true, nullable: false, api_name: "scheduleDetails"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module PayoutSubscription
|
|
5
|
+
module Types
|
|
6
|
+
# Success response
|
|
7
|
+
class UpdatePayoutSubscriptionResponse < Internal::Types::Model
|
|
8
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
9
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
10
|
+
field :response_data, -> { String }, optional: true, nullable: false, api_name: "responseData"
|
|
11
|
+
field :customer_id, -> { Integer }, optional: true, nullable: false, api_name: "customerId"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|