payabli 3.0.4 → 3.0.6
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 -4
- data/lib/payabli/bill/client.rb +119 -0
- data/lib/payabli/boarding/client.rb +209 -0
- data/lib/payabli/charge_backs/client.rb +20 -0
- data/lib/payabli/check_capture/client.rb +10 -0
- data/lib/payabli/client.rb +8 -6
- data/lib/payabli/cloud/client.rb +29 -0
- data/lib/payabli/customer/client.rb +54 -0
- data/lib/payabli/export/client.rb +321 -0
- data/lib/payabli/funding/client.rb +9 -0
- data/lib/payabli/ghost_card/client.rb +31 -0
- data/lib/payabli/hosted_payment_pages/client.rb +23 -0
- data/lib/payabli/import/client.rb +15 -0
- data/lib/payabli/internal/http/raw_client.rb +26 -0
- data/lib/payabli/internal/oauth_provider.rb +8 -2
- data/lib/payabli/internal/routing_auth_provider.rb +51 -0
- data/lib/payabli/invoice/client.rb +118 -0
- data/lib/payabli/line_item/client.rb +43 -0
- data/lib/payabli/management/client.rb +13 -0
- data/lib/payabli/money_in/client.rb +238 -0
- data/lib/payabli/money_out/client.rb +94 -0
- data/lib/payabli/notification/client.rb +46 -0
- data/lib/payabli/notificationlogs/client.rb +27 -0
- data/lib/payabli/ocr/client.rb +10 -0
- data/lib/payabli/organization/client.rb +91 -0
- data/lib/payabli/payment_link/client.rb +367 -0
- data/lib/payabli/payment_method_domain/client.rb +56 -0
- data/lib/payabli/payout_subscription/client.rb +50 -0
- data/lib/payabli/paypoint/client.rb +56 -0
- data/lib/payabli/query/client.rb +414 -0
- data/lib/payabli/statistic/client.rb +39 -0
- data/lib/payabli/subscription/client.rb +46 -0
- data/lib/payabli/templates/client.rb +28 -0
- data/lib/payabli/token/client.rb +8 -0
- data/lib/payabli/token_storage/client.rb +55 -0
- data/lib/payabli/types/application_data.rb +1 -1
- data/lib/payabli/types/application_data_managed.rb +1 -1
- data/lib/payabli/types/application_data_odp.rb +1 -1
- data/lib/payabli/types/application_data_pay_in.rb +1 -1
- data/lib/payabli/types/on_create.rb +1 -1
- data/lib/payabli/types/pay_method_body_all_fields.rb +1 -1
- data/lib/payabli/user/client.rb +67 -0
- data/lib/payabli/vendor/client.rb +102 -0
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli/wallet/client.rb +34 -0
- data/lib/payabli.rb +1 -0
- data/reference.md +219 -219
- data/wiremock/wiremock-mappings.json +32 -1302
- metadata +3 -2
data/lib/payabli/user/client.rb
CHANGED
|
@@ -20,13 +20,18 @@ module Payabli
|
|
|
20
20
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
21
21
|
# @option request_options [Integer] :timeout_in_seconds
|
|
22
22
|
#
|
|
23
|
+
# @example
|
|
24
|
+
# client.user.add_user
|
|
25
|
+
#
|
|
23
26
|
# @return [Payabli::Types::AddUserResponse]
|
|
24
27
|
def add_user(request_options: {}, **params)
|
|
25
28
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
29
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
26
30
|
request = Payabli::Internal::JSON::Request.new(
|
|
27
31
|
base_url: request_options[:base_url],
|
|
28
32
|
method: "POST",
|
|
29
33
|
path: "User",
|
|
34
|
+
headers: headers,
|
|
30
35
|
body: Payabli::Types::UserData.new(params).to_h,
|
|
31
36
|
request_options: request_options
|
|
32
37
|
)
|
|
@@ -57,6 +62,12 @@ module Payabli
|
|
|
57
62
|
# @option params [String, nil] :entry
|
|
58
63
|
# @option params [Integer, nil] :level
|
|
59
64
|
#
|
|
65
|
+
# @example
|
|
66
|
+
# client.user.get_user(
|
|
67
|
+
# user_id: 1000000,
|
|
68
|
+
# entry: "8cfec329267"
|
|
69
|
+
# )
|
|
70
|
+
#
|
|
60
71
|
# @return [Payabli::Types::UserQueryRecord]
|
|
61
72
|
def get_user(request_options: {}, **params)
|
|
62
73
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -64,10 +75,12 @@ module Payabli
|
|
|
64
75
|
query_params["entry"] = params[:entry] if params.key?(:entry)
|
|
65
76
|
query_params["level"] = params[:level] if params.key?(:level)
|
|
66
77
|
|
|
78
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
67
79
|
request = Payabli::Internal::JSON::Request.new(
|
|
68
80
|
base_url: request_options[:base_url],
|
|
69
81
|
method: "GET",
|
|
70
82
|
path: "User/#{URI.encode_uri_component(params[:user_id].to_s)}",
|
|
83
|
+
headers: headers,
|
|
71
84
|
query: query_params,
|
|
72
85
|
request_options: request_options
|
|
73
86
|
)
|
|
@@ -96,13 +109,18 @@ module Payabli
|
|
|
96
109
|
# @option request_options [Integer] :timeout_in_seconds
|
|
97
110
|
# @option params [Integer] :user_id
|
|
98
111
|
#
|
|
112
|
+
# @example
|
|
113
|
+
# client.user.edit_user(user_id: 1000000)
|
|
114
|
+
#
|
|
99
115
|
# @return [Payabli::Types::PayabliApiResponse]
|
|
100
116
|
def edit_user(request_options: {}, **params)
|
|
101
117
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
118
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
102
119
|
request = Payabli::Internal::JSON::Request.new(
|
|
103
120
|
base_url: request_options[:base_url],
|
|
104
121
|
method: "PUT",
|
|
105
122
|
path: "User/#{URI.encode_uri_component(params[:user_id].to_s)}",
|
|
123
|
+
headers: headers,
|
|
106
124
|
body: Payabli::Types::UserData.new(params).to_h,
|
|
107
125
|
request_options: request_options
|
|
108
126
|
)
|
|
@@ -131,13 +149,18 @@ module Payabli
|
|
|
131
149
|
# @option request_options [Integer] :timeout_in_seconds
|
|
132
150
|
# @option params [Integer] :user_id
|
|
133
151
|
#
|
|
152
|
+
# @example
|
|
153
|
+
# client.user.delete_user(user_id: 1000000)
|
|
154
|
+
#
|
|
134
155
|
# @return [Payabli::Types::DeleteUserResponse]
|
|
135
156
|
def delete_user(request_options: {}, **params)
|
|
136
157
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
158
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
137
159
|
request = Payabli::Internal::JSON::Request.new(
|
|
138
160
|
base_url: request_options[:base_url],
|
|
139
161
|
method: "DELETE",
|
|
140
162
|
path: "User/#{URI.encode_uri_component(params[:user_id].to_s)}",
|
|
163
|
+
headers: headers,
|
|
141
164
|
request_options: request_options
|
|
142
165
|
)
|
|
143
166
|
begin
|
|
@@ -165,6 +188,9 @@ module Payabli
|
|
|
165
188
|
# @option request_options [Integer] :timeout_in_seconds
|
|
166
189
|
# @option params [String] :provider
|
|
167
190
|
#
|
|
191
|
+
# @example
|
|
192
|
+
# client.user.auth_user(provider: "provider")
|
|
193
|
+
#
|
|
168
194
|
# @return [Payabli::Types::PayabliApiResponseMfaBasic]
|
|
169
195
|
def auth_user(request_options: {}, **params)
|
|
170
196
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -172,10 +198,12 @@ module Payabli
|
|
|
172
198
|
non_body_param_names = %w[provider]
|
|
173
199
|
body = request_data.except(*non_body_param_names)
|
|
174
200
|
|
|
201
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
175
202
|
request = Payabli::Internal::JSON::Request.new(
|
|
176
203
|
base_url: request_options[:base_url],
|
|
177
204
|
method: "POST",
|
|
178
205
|
path: "User/auth/#{URI.encode_uri_component(params[:provider].to_s)}",
|
|
206
|
+
headers: headers,
|
|
179
207
|
body: body,
|
|
180
208
|
request_options: request_options
|
|
181
209
|
)
|
|
@@ -203,12 +231,17 @@ module Payabli
|
|
|
203
231
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
204
232
|
# @option request_options [Integer] :timeout_in_seconds
|
|
205
233
|
#
|
|
234
|
+
# @example
|
|
235
|
+
# client.user.auth_refresh_user
|
|
236
|
+
#
|
|
206
237
|
# @return [Payabli::Types::PayabliApiResponseUserMfa]
|
|
207
238
|
def auth_refresh_user(request_options: {}, **_params)
|
|
239
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
208
240
|
request = Payabli::Internal::JSON::Request.new(
|
|
209
241
|
base_url: request_options[:base_url],
|
|
210
242
|
method: "POST",
|
|
211
243
|
path: "User/authrefresh",
|
|
244
|
+
headers: headers,
|
|
212
245
|
request_options: request_options
|
|
213
246
|
)
|
|
214
247
|
begin
|
|
@@ -235,13 +268,18 @@ module Payabli
|
|
|
235
268
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
236
269
|
# @option request_options [Integer] :timeout_in_seconds
|
|
237
270
|
#
|
|
271
|
+
# @example
|
|
272
|
+
# client.user.auth_reset_user
|
|
273
|
+
#
|
|
238
274
|
# @return [Payabli::Types::AuthResetUserResponse]
|
|
239
275
|
def auth_reset_user(request_options: {}, **params)
|
|
240
276
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
277
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
241
278
|
request = Payabli::Internal::JSON::Request.new(
|
|
242
279
|
base_url: request_options[:base_url],
|
|
243
280
|
method: "POST",
|
|
244
281
|
path: "User/authreset",
|
|
282
|
+
headers: headers,
|
|
245
283
|
body: Payabli::User::Types::UserAuthResetRequest.new(params).to_h,
|
|
246
284
|
request_options: request_options
|
|
247
285
|
)
|
|
@@ -269,13 +307,18 @@ module Payabli
|
|
|
269
307
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
270
308
|
# @option request_options [Integer] :timeout_in_seconds
|
|
271
309
|
#
|
|
310
|
+
# @example
|
|
311
|
+
# client.user.change_psw_user
|
|
312
|
+
#
|
|
272
313
|
# @return [Payabli::Types::ChangePswUserResponse]
|
|
273
314
|
def change_psw_user(request_options: {}, **params)
|
|
274
315
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
316
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
275
317
|
request = Payabli::Internal::JSON::Request.new(
|
|
276
318
|
base_url: request_options[:base_url],
|
|
277
319
|
method: "PUT",
|
|
278
320
|
path: "User/authpsw",
|
|
321
|
+
headers: headers,
|
|
279
322
|
body: Payabli::User::Types::UserAuthPswResetRequest.new(params).to_h,
|
|
280
323
|
request_options: request_options
|
|
281
324
|
)
|
|
@@ -303,12 +346,17 @@ module Payabli
|
|
|
303
346
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
304
347
|
# @option request_options [Integer] :timeout_in_seconds
|
|
305
348
|
#
|
|
349
|
+
# @example
|
|
350
|
+
# client.user.logout_user
|
|
351
|
+
#
|
|
306
352
|
# @return [Payabli::Types::LogoutUserResponse]
|
|
307
353
|
def logout_user(request_options: {}, **_params)
|
|
354
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
308
355
|
request = Payabli::Internal::JSON::Request.new(
|
|
309
356
|
base_url: request_options[:base_url],
|
|
310
357
|
method: "GET",
|
|
311
358
|
path: "User/authlogout",
|
|
359
|
+
headers: headers,
|
|
312
360
|
request_options: request_options
|
|
313
361
|
)
|
|
314
362
|
begin
|
|
@@ -335,13 +383,18 @@ module Payabli
|
|
|
335
383
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
336
384
|
# @option request_options [Integer] :timeout_in_seconds
|
|
337
385
|
#
|
|
386
|
+
# @example
|
|
387
|
+
# client.user.validate_mfa_user
|
|
388
|
+
#
|
|
338
389
|
# @return [Payabli::Types::PayabliApiResponseUserMfa]
|
|
339
390
|
def validate_mfa_user(request_options: {}, **params)
|
|
340
391
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
392
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
341
393
|
request = Payabli::Internal::JSON::Request.new(
|
|
342
394
|
base_url: request_options[:base_url],
|
|
343
395
|
method: "POST",
|
|
344
396
|
path: "User/mfa",
|
|
397
|
+
headers: headers,
|
|
345
398
|
body: Payabli::User::Types::MfaValidationData.new(params).to_h,
|
|
346
399
|
request_options: request_options
|
|
347
400
|
)
|
|
@@ -370,13 +423,18 @@ module Payabli
|
|
|
370
423
|
# @option request_options [Integer] :timeout_in_seconds
|
|
371
424
|
# @option params [Integer] :user_id
|
|
372
425
|
#
|
|
426
|
+
# @example
|
|
427
|
+
# client.user.edit_mfa_user(user_id: 1000000)
|
|
428
|
+
#
|
|
373
429
|
# @return [Payabli::Types::EditMfaUserResponse]
|
|
374
430
|
def edit_mfa_user(request_options: {}, **params)
|
|
375
431
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
432
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
376
433
|
request = Payabli::Internal::JSON::Request.new(
|
|
377
434
|
base_url: request_options[:base_url],
|
|
378
435
|
method: "PUT",
|
|
379
436
|
path: "User/mfa/#{URI.encode_uri_component(params[:user_id].to_s)}",
|
|
437
|
+
headers: headers,
|
|
380
438
|
body: Payabli::Types::MfaData.new(params).to_h,
|
|
381
439
|
request_options: request_options
|
|
382
440
|
)
|
|
@@ -407,13 +465,22 @@ module Payabli
|
|
|
407
465
|
# @option params [String] :entry
|
|
408
466
|
# @option params [Integer] :entry_type
|
|
409
467
|
#
|
|
468
|
+
# @example
|
|
469
|
+
# client.user.resend_mfa_code(
|
|
470
|
+
# usrname: "usrname",
|
|
471
|
+
# entry: "8cfec329267",
|
|
472
|
+
# entry_type: 1
|
|
473
|
+
# )
|
|
474
|
+
#
|
|
410
475
|
# @return [Payabli::Types::PayabliApiResponseMfaBasic]
|
|
411
476
|
def resend_mfa_code(request_options: {}, **params)
|
|
412
477
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
478
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
413
479
|
request = Payabli::Internal::JSON::Request.new(
|
|
414
480
|
base_url: request_options[:base_url],
|
|
415
481
|
method: "POST",
|
|
416
482
|
path: "User/resendmfa/#{URI.encode_uri_component(params[:usrname].to_s)}/#{URI.encode_uri_component(params[:entry].to_s)}/#{URI.encode_uri_component(params[:entry_type].to_s)}",
|
|
483
|
+
headers: headers,
|
|
417
484
|
request_options: request_options
|
|
418
485
|
)
|
|
419
486
|
begin
|
|
@@ -21,13 +21,62 @@ module Payabli
|
|
|
21
21
|
# @option request_options [Integer] :timeout_in_seconds
|
|
22
22
|
# @option params [String] :entry
|
|
23
23
|
#
|
|
24
|
+
# @example
|
|
25
|
+
# client.vendor.add_vendor(
|
|
26
|
+
# entry: "8cfec329267",
|
|
27
|
+
# vendor_number: "VEN-123",
|
|
28
|
+
# address_1: "123 Ocean Drive",
|
|
29
|
+
# address_2: "Suite 400",
|
|
30
|
+
# billing_data: {
|
|
31
|
+
# id: 123,
|
|
32
|
+
# bank_name: "Country Bank",
|
|
33
|
+
# routing_account: "123123123",
|
|
34
|
+
# account_number: "123123123",
|
|
35
|
+
# type_account: "Checking",
|
|
36
|
+
# bank_account_holder_name: "Gruzya Adventure Outfitters LLC",
|
|
37
|
+
# bank_account_holder_type: "Business",
|
|
38
|
+
# bank_account_function: 0
|
|
39
|
+
# },
|
|
40
|
+
# city: "Miami",
|
|
41
|
+
# contacts: [{
|
|
42
|
+
# contact_name: "Herman Martinez",
|
|
43
|
+
# contact_email: "example@email.com",
|
|
44
|
+
# contact_title: "Owner",
|
|
45
|
+
# contact_phone: "3055550000"
|
|
46
|
+
# }],
|
|
47
|
+
# country: "US",
|
|
48
|
+
# customer_vendor_account: "A-37622",
|
|
49
|
+
# ein: "12-3456789",
|
|
50
|
+
# email: "example@email.com",
|
|
51
|
+
# internal_reference_id: 123,
|
|
52
|
+
# location_code: "MIA123",
|
|
53
|
+
# mcc: "7777",
|
|
54
|
+
# name_1: "Herman's Coatings and Masonry",
|
|
55
|
+
# name_2: "<string>",
|
|
56
|
+
# payee_name_1: "<string>",
|
|
57
|
+
# payee_name_2: "<string>",
|
|
58
|
+
# payment_method: "managed",
|
|
59
|
+
# phone: "5555555555",
|
|
60
|
+
# remit_address_1: "123 Walnut Street",
|
|
61
|
+
# remit_address_2: "Suite 900",
|
|
62
|
+
# remit_city: "Miami",
|
|
63
|
+
# remit_country: "US",
|
|
64
|
+
# remit_state: "FL",
|
|
65
|
+
# remit_zip: "31113",
|
|
66
|
+
# state: "FL",
|
|
67
|
+
# vendor_status: 1,
|
|
68
|
+
# zip: "33139"
|
|
69
|
+
# )
|
|
70
|
+
#
|
|
24
71
|
# @return [Payabli::Types::PayabliApiResponseVendors]
|
|
25
72
|
def add_vendor(request_options: {}, **params)
|
|
26
73
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
74
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
27
75
|
request = Payabli::Internal::JSON::Request.new(
|
|
28
76
|
base_url: request_options[:base_url],
|
|
29
77
|
method: "POST",
|
|
30
78
|
path: "Vendor/single/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
79
|
+
headers: headers,
|
|
31
80
|
body: Payabli::Types::VendorData.new(params).to_h,
|
|
32
81
|
request_options: request_options
|
|
33
82
|
)
|
|
@@ -56,13 +105,18 @@ module Payabli
|
|
|
56
105
|
# @option request_options [Integer] :timeout_in_seconds
|
|
57
106
|
# @option params [Integer] :id_vendor
|
|
58
107
|
#
|
|
108
|
+
# @example
|
|
109
|
+
# client.vendor.get_vendor(id_vendor: 1)
|
|
110
|
+
#
|
|
59
111
|
# @return [Payabli::Types::VendorQueryRecord]
|
|
60
112
|
def get_vendor(request_options: {}, **params)
|
|
61
113
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
114
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
62
115
|
request = Payabli::Internal::JSON::Request.new(
|
|
63
116
|
base_url: request_options[:base_url],
|
|
64
117
|
method: "GET",
|
|
65
118
|
path: "Vendor/#{URI.encode_uri_component(params[:id_vendor].to_s)}",
|
|
119
|
+
headers: headers,
|
|
66
120
|
request_options: request_options
|
|
67
121
|
)
|
|
68
122
|
begin
|
|
@@ -90,13 +144,21 @@ module Payabli
|
|
|
90
144
|
# @option request_options [Integer] :timeout_in_seconds
|
|
91
145
|
# @option params [Integer] :id_vendor
|
|
92
146
|
#
|
|
147
|
+
# @example
|
|
148
|
+
# client.vendor.edit_vendor(
|
|
149
|
+
# id_vendor: 1,
|
|
150
|
+
# name_1: "Theodore's Janitorial"
|
|
151
|
+
# )
|
|
152
|
+
#
|
|
93
153
|
# @return [Payabli::Types::PayabliApiResponseVendors]
|
|
94
154
|
def edit_vendor(request_options: {}, **params)
|
|
95
155
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
156
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
96
157
|
request = Payabli::Internal::JSON::Request.new(
|
|
97
158
|
base_url: request_options[:base_url],
|
|
98
159
|
method: "PUT",
|
|
99
160
|
path: "Vendor/#{URI.encode_uri_component(params[:id_vendor].to_s)}",
|
|
161
|
+
headers: headers,
|
|
100
162
|
body: Payabli::Types::VendorData.new(params).to_h,
|
|
101
163
|
request_options: request_options
|
|
102
164
|
)
|
|
@@ -125,13 +187,18 @@ module Payabli
|
|
|
125
187
|
# @option request_options [Integer] :timeout_in_seconds
|
|
126
188
|
# @option params [Integer] :id_vendor
|
|
127
189
|
#
|
|
190
|
+
# @example
|
|
191
|
+
# client.vendor.delete_vendor(id_vendor: 1)
|
|
192
|
+
#
|
|
128
193
|
# @return [Payabli::Types::PayabliApiResponseVendors]
|
|
129
194
|
def delete_vendor(request_options: {}, **params)
|
|
130
195
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
196
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
131
197
|
request = Payabli::Internal::JSON::Request.new(
|
|
132
198
|
base_url: request_options[:base_url],
|
|
133
199
|
method: "DELETE",
|
|
134
200
|
path: "Vendor/#{URI.encode_uri_component(params[:id_vendor].to_s)}",
|
|
201
|
+
headers: headers,
|
|
135
202
|
request_options: request_options
|
|
136
203
|
)
|
|
137
204
|
begin
|
|
@@ -162,6 +229,20 @@ module Payabli
|
|
|
162
229
|
# @option request_options [Integer] :timeout_in_seconds
|
|
163
230
|
# @option params [String] :entry
|
|
164
231
|
#
|
|
232
|
+
# @example
|
|
233
|
+
# client.vendor.enrich_vendor(
|
|
234
|
+
# entry: "8cfec329267",
|
|
235
|
+
# vendor_id: 456,
|
|
236
|
+
# scope: ["invoice_scan"],
|
|
237
|
+
# apply_enrichment_data: false,
|
|
238
|
+
# invoice_file: {
|
|
239
|
+
# ftype: "pdf",
|
|
240
|
+
# filename: "invoice-2026-001.pdf",
|
|
241
|
+
# f_content: "<base64-encoded-pdf>"
|
|
242
|
+
# },
|
|
243
|
+
# fallback_method: "check"
|
|
244
|
+
# )
|
|
245
|
+
#
|
|
165
246
|
# @return [Payabli::Types::VendorEnrichResponse]
|
|
166
247
|
def enrich_vendor(request_options: {}, **params)
|
|
167
248
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -169,10 +250,12 @@ module Payabli
|
|
|
169
250
|
non_body_param_names = %w[entry]
|
|
170
251
|
body = request_data.except(*non_body_param_names)
|
|
171
252
|
|
|
253
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
172
254
|
request = Payabli::Internal::JSON::Request.new(
|
|
173
255
|
base_url: request_options[:base_url],
|
|
174
256
|
method: "POST",
|
|
175
257
|
path: "Vendor/enrich/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
258
|
+
headers: headers,
|
|
176
259
|
body: body,
|
|
177
260
|
request_options: request_options
|
|
178
261
|
)
|
|
@@ -205,6 +288,18 @@ module Payabli
|
|
|
205
288
|
# @option request_options [Integer] :timeout_in_seconds
|
|
206
289
|
# @option params [String] :entry
|
|
207
290
|
#
|
|
291
|
+
# @example
|
|
292
|
+
# client.vendor.schedule_enrichment_call(
|
|
293
|
+
# entry: "8cfec329267",
|
|
294
|
+
# vendor_id: 456,
|
|
295
|
+
# phone: "5555550200",
|
|
296
|
+
# enrichment_id: "enrich-3890-a1b2c3d4",
|
|
297
|
+
# bill_id: 54323,
|
|
298
|
+
# fallback_method: "check",
|
|
299
|
+
# max_retries: 3,
|
|
300
|
+
# timezone: "America/New_York"
|
|
301
|
+
# )
|
|
302
|
+
#
|
|
208
303
|
# @return [Payabli::Types::VendorScheduleCallResponse]
|
|
209
304
|
def schedule_enrichment_call(request_options: {}, **params)
|
|
210
305
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -212,10 +307,12 @@ module Payabli
|
|
|
212
307
|
non_body_param_names = %w[entry]
|
|
213
308
|
body = request_data.except(*non_body_param_names)
|
|
214
309
|
|
|
310
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
215
311
|
request = Payabli::Internal::JSON::Request.new(
|
|
216
312
|
base_url: request_options[:base_url],
|
|
217
313
|
method: "POST",
|
|
218
314
|
path: "Vendor/enrich/schedule_call/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
315
|
+
headers: headers,
|
|
219
316
|
body: body,
|
|
220
317
|
request_options: request_options
|
|
221
318
|
)
|
|
@@ -246,13 +343,18 @@ module Payabli
|
|
|
246
343
|
# @option request_options [Integer] :timeout_in_seconds
|
|
247
344
|
# @option params [Integer] :id_vendor
|
|
248
345
|
#
|
|
346
|
+
# @example
|
|
347
|
+
# client.vendor.get_enrichment_call_status(id_vendor: 456)
|
|
348
|
+
#
|
|
249
349
|
# @return [Payabli::Types::VendorCallStatusResponse]
|
|
250
350
|
def get_enrichment_call_status(request_options: {}, **params)
|
|
251
351
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
352
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
252
353
|
request = Payabli::Internal::JSON::Request.new(
|
|
253
354
|
base_url: request_options[:base_url],
|
|
254
355
|
method: "GET",
|
|
255
356
|
path: "Vendor/#{URI.encode_uri_component(params[:id_vendor].to_s)}/enrichment/call-status",
|
|
357
|
+
headers: headers,
|
|
256
358
|
request_options: request_options
|
|
257
359
|
)
|
|
258
360
|
begin
|
data/lib/payabli/version.rb
CHANGED
|
@@ -20,13 +20,22 @@ module Payabli
|
|
|
20
20
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
21
21
|
# @option request_options [Integer] :timeout_in_seconds
|
|
22
22
|
#
|
|
23
|
+
# @example
|
|
24
|
+
# client.wallet.configure_apple_pay_organization(
|
|
25
|
+
# cascade: true,
|
|
26
|
+
# is_enabled: true,
|
|
27
|
+
# org_id: 123
|
|
28
|
+
# )
|
|
29
|
+
#
|
|
23
30
|
# @return [Payabli::Types::ConfigureApplePayOrganizationApiResponse]
|
|
24
31
|
def configure_apple_pay_organization(request_options: {}, **params)
|
|
25
32
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
33
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
26
34
|
request = Payabli::Internal::JSON::Request.new(
|
|
27
35
|
base_url: request_options[:base_url],
|
|
28
36
|
method: "POST",
|
|
29
37
|
path: "Wallet/applepay/configure-organization",
|
|
38
|
+
headers: headers,
|
|
30
39
|
body: Payabli::Wallet::Types::ConfigureOrganizationRequestApplePay.new(params).to_h,
|
|
31
40
|
request_options: request_options
|
|
32
41
|
)
|
|
@@ -54,13 +63,21 @@ module Payabli
|
|
|
54
63
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
55
64
|
# @option request_options [Integer] :timeout_in_seconds
|
|
56
65
|
#
|
|
66
|
+
# @example
|
|
67
|
+
# client.wallet.configure_apple_pay_paypoint(
|
|
68
|
+
# entry: "8cfec329267",
|
|
69
|
+
# is_enabled: true
|
|
70
|
+
# )
|
|
71
|
+
#
|
|
57
72
|
# @return [Payabli::Types::ConfigureApplePaypointApiResponse]
|
|
58
73
|
def configure_apple_pay_paypoint(request_options: {}, **params)
|
|
59
74
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
75
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
60
76
|
request = Payabli::Internal::JSON::Request.new(
|
|
61
77
|
base_url: request_options[:base_url],
|
|
62
78
|
method: "POST",
|
|
63
79
|
path: "Wallet/applepay/configure-paypoint",
|
|
80
|
+
headers: headers,
|
|
64
81
|
body: Payabli::Wallet::Types::ConfigurePaypointRequestApplePay.new(params).to_h,
|
|
65
82
|
request_options: request_options
|
|
66
83
|
)
|
|
@@ -88,13 +105,22 @@ module Payabli
|
|
|
88
105
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
89
106
|
# @option request_options [Integer] :timeout_in_seconds
|
|
90
107
|
#
|
|
108
|
+
# @example
|
|
109
|
+
# client.wallet.configure_google_pay_organization(
|
|
110
|
+
# cascade: true,
|
|
111
|
+
# is_enabled: true,
|
|
112
|
+
# org_id: 123
|
|
113
|
+
# )
|
|
114
|
+
#
|
|
91
115
|
# @return [Payabli::Types::ConfigureApplePayOrganizationApiResponse]
|
|
92
116
|
def configure_google_pay_organization(request_options: {}, **params)
|
|
93
117
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
118
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
94
119
|
request = Payabli::Internal::JSON::Request.new(
|
|
95
120
|
base_url: request_options[:base_url],
|
|
96
121
|
method: "POST",
|
|
97
122
|
path: "Wallet/googlepay/configure-organization",
|
|
123
|
+
headers: headers,
|
|
98
124
|
body: Payabli::Wallet::Types::ConfigureOrganizationRequestGooglePay.new(params).to_h,
|
|
99
125
|
request_options: request_options
|
|
100
126
|
)
|
|
@@ -122,13 +148,21 @@ module Payabli
|
|
|
122
148
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
123
149
|
# @option request_options [Integer] :timeout_in_seconds
|
|
124
150
|
#
|
|
151
|
+
# @example
|
|
152
|
+
# client.wallet.configure_google_pay_paypoint(
|
|
153
|
+
# entry: "8cfec329267",
|
|
154
|
+
# is_enabled: true
|
|
155
|
+
# )
|
|
156
|
+
#
|
|
125
157
|
# @return [Payabli::Types::ConfigureGooglePaypointApiResponse]
|
|
126
158
|
def configure_google_pay_paypoint(request_options: {}, **params)
|
|
127
159
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
160
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
128
161
|
request = Payabli::Internal::JSON::Request.new(
|
|
129
162
|
base_url: request_options[:base_url],
|
|
130
163
|
method: "POST",
|
|
131
164
|
path: "Wallet/googlepay/configure-paypoint",
|
|
165
|
+
headers: headers,
|
|
132
166
|
body: Payabli::Wallet::Types::ConfigurePaypointRequestGooglePay.new(params).to_h,
|
|
133
167
|
request_options: request_options
|
|
134
168
|
)
|
data/lib/payabli.rb
CHANGED
|
@@ -1111,3 +1111,4 @@ require_relative "payabli/charge_backs/client"
|
|
|
1111
1111
|
require_relative "payabli/charge_backs/types/response_charge_back"
|
|
1112
1112
|
require_relative "payabli/environment"
|
|
1113
1113
|
require_relative "payabli/internal/oauth_provider"
|
|
1114
|
+
require_relative "payabli/internal/routing_auth_provider"
|