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
|
@@ -20,13 +20,139 @@ 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.boarding.add_application(
|
|
25
|
+
# services: {
|
|
26
|
+
# ach: {},
|
|
27
|
+
# card: {
|
|
28
|
+
# accept_amex: true,
|
|
29
|
+
# accept_discover: true,
|
|
30
|
+
# accept_mastercard: true,
|
|
31
|
+
# accept_visa: true
|
|
32
|
+
# }
|
|
33
|
+
# },
|
|
34
|
+
# annual_revenue: 1000,
|
|
35
|
+
# average_bill_size: "500",
|
|
36
|
+
# average_monthly_bill: "5650",
|
|
37
|
+
# avgmonthly: 1000,
|
|
38
|
+
# baddress: "123 Walnut Street",
|
|
39
|
+
# baddress_1: "Suite 103",
|
|
40
|
+
# bank_data: [{
|
|
41
|
+
# account_number: "123123100",
|
|
42
|
+
# bank_account_function: 1,
|
|
43
|
+
# bank_account_holder_name: "Gruzya Adventure Outfitters LLC",
|
|
44
|
+
# bank_account_holder_type: "Business",
|
|
45
|
+
# bank_name: "Test Bank 1",
|
|
46
|
+
# nickname: "Withdrawal Account",
|
|
47
|
+
# routing_account: "123123123",
|
|
48
|
+
# type_account: "Checking",
|
|
49
|
+
# account_id: "123-456"
|
|
50
|
+
# }, {
|
|
51
|
+
# account_number: "123123200",
|
|
52
|
+
# bank_account_function: 0,
|
|
53
|
+
# bank_account_holder_name: "Gruzya Adventure Outfitters LLC",
|
|
54
|
+
# bank_account_holder_type: "Business",
|
|
55
|
+
# bank_name: "Test Bank 2",
|
|
56
|
+
# nickname: "Deposit Account",
|
|
57
|
+
# routing_account: "321321321",
|
|
58
|
+
# type_account: "Checking",
|
|
59
|
+
# account_id: "123-789"
|
|
60
|
+
# }],
|
|
61
|
+
# bcity: "New Vegas",
|
|
62
|
+
# bcountry: "US",
|
|
63
|
+
# binperson: 60,
|
|
64
|
+
# binphone: 20,
|
|
65
|
+
# binweb: 20,
|
|
66
|
+
# bstate: "FL",
|
|
67
|
+
# bsummary: "Brick and mortar store that sells office supplies",
|
|
68
|
+
# btype: "Limited Liability Company",
|
|
69
|
+
# bzip: "33000",
|
|
70
|
+
# contacts: [{
|
|
71
|
+
# contact_email: "herman@hermanscoatings.com",
|
|
72
|
+
# contact_name: "Herman Martinez",
|
|
73
|
+
# contact_phone: "3055550000",
|
|
74
|
+
# contact_title: "Owner"
|
|
75
|
+
# }],
|
|
76
|
+
# credit_limit: "creditLimit",
|
|
77
|
+
# dba_name: "Sunshine Gutters",
|
|
78
|
+
# ein: "123456789",
|
|
79
|
+
# faxnumber: "1234567890",
|
|
80
|
+
# highticketamt: 1000,
|
|
81
|
+
# legal_name: "Sunshine Services, LLC",
|
|
82
|
+
# license: "2222222FFG",
|
|
83
|
+
# licstate: "CA",
|
|
84
|
+
# maddress: "123 Walnut Street",
|
|
85
|
+
# maddress_1: "STE 900",
|
|
86
|
+
# mcc: "7777",
|
|
87
|
+
# mcity: "Johnson City",
|
|
88
|
+
# mcountry: "US",
|
|
89
|
+
# mstate: "TN",
|
|
90
|
+
# mzip: "37615",
|
|
91
|
+
# org_id: 123,
|
|
92
|
+
# ownership: [{
|
|
93
|
+
# oaddress: "33 North St",
|
|
94
|
+
# ocity: "Any City",
|
|
95
|
+
# ocountry: "US",
|
|
96
|
+
# odriverstate: "CA",
|
|
97
|
+
# ostate: "CA",
|
|
98
|
+
# ownerdob: "01/01/1990",
|
|
99
|
+
# ownerdriver: "CA6677778",
|
|
100
|
+
# owneremail: "test@email.com",
|
|
101
|
+
# ownername: "John Smith",
|
|
102
|
+
# ownerpercent: 100,
|
|
103
|
+
# ownerphone_1: "555888111",
|
|
104
|
+
# ownerphone_2: "555888111",
|
|
105
|
+
# ownerssn: "123456789",
|
|
106
|
+
# ownertitle: "CEO",
|
|
107
|
+
# ozip: "55555"
|
|
108
|
+
# }],
|
|
109
|
+
# phonenumber: "1234567890",
|
|
110
|
+
# processing_region: "US",
|
|
111
|
+
# recipient_email: "josephray@example.com",
|
|
112
|
+
# recipient_email_notification: true,
|
|
113
|
+
# resumable: true,
|
|
114
|
+
# signer: {
|
|
115
|
+
# address: "33 North St",
|
|
116
|
+
# address_1: "STE 900",
|
|
117
|
+
# city: "Bristol",
|
|
118
|
+
# country: "US",
|
|
119
|
+
# dob: "01/01/1976",
|
|
120
|
+
# email: "test@email.com",
|
|
121
|
+
# name: "John Smith",
|
|
122
|
+
# phone: "555888111",
|
|
123
|
+
# ssn: "123456789",
|
|
124
|
+
# state: "TN",
|
|
125
|
+
# zip: "55555",
|
|
126
|
+
# pci_attestation: true,
|
|
127
|
+
# signed_document_reference: "https://example.com/signed-document.pdf",
|
|
128
|
+
# attestation_date: "04/20/2025",
|
|
129
|
+
# sign_date: "04/20/2025",
|
|
130
|
+
# additional_data: {
|
|
131
|
+
# deviceId: "499585-389fj484-3jcj8hj3",
|
|
132
|
+
# session: "fifji4-fiu443-fn4843",
|
|
133
|
+
# timeWithCompany: "6 Years"
|
|
134
|
+
# }
|
|
135
|
+
# },
|
|
136
|
+
# startdate: "01/01/1990",
|
|
137
|
+
# tax_fill_name: "Sunshine LLC",
|
|
138
|
+
# template_id: 22,
|
|
139
|
+
# ticketamt: 1000,
|
|
140
|
+
# website: "www.example.com",
|
|
141
|
+
# when_charged: "When Service Provided",
|
|
142
|
+
# when_delivered: "Over 30 Days",
|
|
143
|
+
# when_provided: "30 Days or Less",
|
|
144
|
+
# when_refunded: "30 Days or Less"
|
|
145
|
+
# )
|
|
146
|
+
#
|
|
23
147
|
# @return [Payabli::Types::PayabliApiResponse00Responsedatanonobject]
|
|
24
148
|
def add_application(request_options: {}, **params)
|
|
25
149
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
150
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
26
151
|
request = Payabli::Internal::JSON::Request.new(
|
|
27
152
|
base_url: request_options[:base_url],
|
|
28
153
|
method: "POST",
|
|
29
154
|
path: "Boarding/app",
|
|
155
|
+
headers: headers,
|
|
30
156
|
body: Payabli::Types::AddApplicationRequest.new(params).to_h,
|
|
31
157
|
request_options: request_options
|
|
32
158
|
)
|
|
@@ -55,13 +181,18 @@ module Payabli
|
|
|
55
181
|
# @option request_options [Integer] :timeout_in_seconds
|
|
56
182
|
# @option params [Integer] :app_id
|
|
57
183
|
#
|
|
184
|
+
# @example
|
|
185
|
+
# client.boarding.update_application(app_id: 352)
|
|
186
|
+
#
|
|
58
187
|
# @return [Payabli::Types::PayabliApiResponse00Responsedatanonobject]
|
|
59
188
|
def update_application(request_options: {}, **params)
|
|
60
189
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
190
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
61
191
|
request = Payabli::Internal::JSON::Request.new(
|
|
62
192
|
base_url: request_options[:base_url],
|
|
63
193
|
method: "PUT",
|
|
64
194
|
path: "Boarding/app/#{URI.encode_uri_component(params[:app_id].to_s)}",
|
|
195
|
+
headers: headers,
|
|
65
196
|
body: Payabli::Types::ApplicationData.new(params).to_h,
|
|
66
197
|
request_options: request_options
|
|
67
198
|
)
|
|
@@ -90,13 +221,18 @@ module Payabli
|
|
|
90
221
|
# @option request_options [Integer] :timeout_in_seconds
|
|
91
222
|
# @option params [Integer] :app_id
|
|
92
223
|
#
|
|
224
|
+
# @example
|
|
225
|
+
# client.boarding.delete_application(app_id: 352)
|
|
226
|
+
#
|
|
93
227
|
# @return [Payabli::Types::PayabliApiResponse00Responsedatanonobject]
|
|
94
228
|
def delete_application(request_options: {}, **params)
|
|
95
229
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
230
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
96
231
|
request = Payabli::Internal::JSON::Request.new(
|
|
97
232
|
base_url: request_options[:base_url],
|
|
98
233
|
method: "DELETE",
|
|
99
234
|
path: "Boarding/app/#{URI.encode_uri_component(params[:app_id].to_s)}",
|
|
235
|
+
headers: headers,
|
|
100
236
|
request_options: request_options
|
|
101
237
|
)
|
|
102
238
|
begin
|
|
@@ -124,13 +260,18 @@ module Payabli
|
|
|
124
260
|
# @option request_options [Integer] :timeout_in_seconds
|
|
125
261
|
# @option params [Integer] :app_id
|
|
126
262
|
#
|
|
263
|
+
# @example
|
|
264
|
+
# client.boarding.get_application(app_id: 352)
|
|
265
|
+
#
|
|
127
266
|
# @return [Payabli::Types::ApplicationDetailsRecord]
|
|
128
267
|
def get_application(request_options: {}, **params)
|
|
129
268
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
269
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
130
270
|
request = Payabli::Internal::JSON::Request.new(
|
|
131
271
|
base_url: request_options[:base_url],
|
|
132
272
|
method: "GET",
|
|
133
273
|
path: "Boarding/read/#{URI.encode_uri_component(params[:app_id].to_s)}",
|
|
274
|
+
headers: headers,
|
|
134
275
|
request_options: request_options
|
|
135
276
|
)
|
|
136
277
|
begin
|
|
@@ -158,6 +299,13 @@ module Payabli
|
|
|
158
299
|
# @option request_options [Integer] :timeout_in_seconds
|
|
159
300
|
# @option params [String] :x_id
|
|
160
301
|
#
|
|
302
|
+
# @example
|
|
303
|
+
# client.boarding.get_application_by_auth(
|
|
304
|
+
# x_id: "17E",
|
|
305
|
+
# email: "admin@email.com",
|
|
306
|
+
# reference_id: "129-219"
|
|
307
|
+
# )
|
|
308
|
+
#
|
|
161
309
|
# @return [Payabli::Types::ApplicationQueryRecord]
|
|
162
310
|
def get_application_by_auth(request_options: {}, **params)
|
|
163
311
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -165,10 +313,12 @@ module Payabli
|
|
|
165
313
|
non_body_param_names = %w[xId]
|
|
166
314
|
body = request_data.except(*non_body_param_names)
|
|
167
315
|
|
|
316
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
168
317
|
request = Payabli::Internal::JSON::Request.new(
|
|
169
318
|
base_url: request_options[:base_url],
|
|
170
319
|
method: "POST",
|
|
171
320
|
path: "Boarding/read/#{URI.encode_uri_component(params[:x_id].to_s)}",
|
|
321
|
+
headers: headers,
|
|
172
322
|
body: body,
|
|
173
323
|
request_options: request_options
|
|
174
324
|
)
|
|
@@ -197,13 +347,18 @@ module Payabli
|
|
|
197
347
|
# @option request_options [Integer] :timeout_in_seconds
|
|
198
348
|
# @option params [Integer] :boarding_link_id
|
|
199
349
|
#
|
|
350
|
+
# @example
|
|
351
|
+
# client.boarding.get_by_id_link_application(boarding_link_id: 91)
|
|
352
|
+
#
|
|
200
353
|
# @return [Payabli::Types::BoardingLinkQueryRecord]
|
|
201
354
|
def get_by_id_link_application(request_options: {}, **params)
|
|
202
355
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
356
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
203
357
|
request = Payabli::Internal::JSON::Request.new(
|
|
204
358
|
base_url: request_options[:base_url],
|
|
205
359
|
method: "GET",
|
|
206
360
|
path: "Boarding/linkbyId/#{URI.encode_uri_component(params[:boarding_link_id].to_s)}",
|
|
361
|
+
headers: headers,
|
|
207
362
|
request_options: request_options
|
|
208
363
|
)
|
|
209
364
|
begin
|
|
@@ -231,13 +386,18 @@ module Payabli
|
|
|
231
386
|
# @option request_options [Integer] :timeout_in_seconds
|
|
232
387
|
# @option params [Integer] :template_id
|
|
233
388
|
#
|
|
389
|
+
# @example
|
|
390
|
+
# client.boarding.get_by_template_id_link_application(template_id: 80)
|
|
391
|
+
#
|
|
234
392
|
# @return [Payabli::Types::BoardingLinkQueryRecord]
|
|
235
393
|
def get_by_template_id_link_application(request_options: {}, **params)
|
|
236
394
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
395
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
237
396
|
request = Payabli::Internal::JSON::Request.new(
|
|
238
397
|
base_url: request_options[:base_url],
|
|
239
398
|
method: "GET",
|
|
240
399
|
path: "Boarding/linkbyTemplate/#{URI.encode_uri_component(params[:template_id].to_s)}",
|
|
400
|
+
headers: headers,
|
|
241
401
|
request_options: request_options
|
|
242
402
|
)
|
|
243
403
|
begin
|
|
@@ -269,16 +429,24 @@ module Payabli
|
|
|
269
429
|
# @option params [String] :mail_2
|
|
270
430
|
# @option params [Boolean, nil] :send_email
|
|
271
431
|
#
|
|
432
|
+
# @example
|
|
433
|
+
# client.boarding.get_external_application(
|
|
434
|
+
# app_id: 352,
|
|
435
|
+
# mail_2: "mail2"
|
|
436
|
+
# )
|
|
437
|
+
#
|
|
272
438
|
# @return [Payabli::Types::PayabliApiResponse00]
|
|
273
439
|
def get_external_application(request_options: {}, **params)
|
|
274
440
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
275
441
|
query_params = {}
|
|
276
442
|
query_params["sendEmail"] = params[:send_email] if params.key?(:send_email)
|
|
277
443
|
|
|
444
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
278
445
|
request = Payabli::Internal::JSON::Request.new(
|
|
279
446
|
base_url: request_options[:base_url],
|
|
280
447
|
method: "PUT",
|
|
281
448
|
path: "Boarding/applink/#{URI.encode_uri_component(params[:app_id].to_s)}/#{URI.encode_uri_component(params[:mail_2].to_s)}",
|
|
449
|
+
headers: headers,
|
|
282
450
|
query: query_params,
|
|
283
451
|
request_options: request_options
|
|
284
452
|
)
|
|
@@ -307,13 +475,18 @@ module Payabli
|
|
|
307
475
|
# @option request_options [Integer] :timeout_in_seconds
|
|
308
476
|
# @option params [String] :boarding_link_reference
|
|
309
477
|
#
|
|
478
|
+
# @example
|
|
479
|
+
# client.boarding.get_link_application(boarding_link_reference: "myorgaccountname-00091")
|
|
480
|
+
#
|
|
310
481
|
# @return [Payabli::Types::BoardingLinkQueryRecord]
|
|
311
482
|
def get_link_application(request_options: {}, **params)
|
|
312
483
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
484
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
313
485
|
request = Payabli::Internal::JSON::Request.new(
|
|
314
486
|
base_url: request_options[:base_url],
|
|
315
487
|
method: "GET",
|
|
316
488
|
path: "Boarding/link/#{URI.encode_uri_component(params[:boarding_link_reference].to_s)}",
|
|
489
|
+
headers: headers,
|
|
317
490
|
request_options: request_options
|
|
318
491
|
)
|
|
319
492
|
begin
|
|
@@ -347,6 +520,14 @@ module Payabli
|
|
|
347
520
|
# @option params [Hash[String, String, nil], nil] :parameters
|
|
348
521
|
# @option params [String, nil] :sort_by
|
|
349
522
|
#
|
|
523
|
+
# @example
|
|
524
|
+
# client.boarding.list_applications(
|
|
525
|
+
# org_id: 123,
|
|
526
|
+
# from_record: 251,
|
|
527
|
+
# limit_record: 0,
|
|
528
|
+
# sort_by: "desc(field_name)"
|
|
529
|
+
# )
|
|
530
|
+
#
|
|
350
531
|
# @return [Payabli::Types::QueryBoardingAppsListResponse]
|
|
351
532
|
def list_applications(request_options: {}, **params)
|
|
352
533
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -357,10 +538,12 @@ module Payabli
|
|
|
357
538
|
query_params["parameters"] = params[:parameters] if params.key?(:parameters)
|
|
358
539
|
query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
|
|
359
540
|
|
|
541
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
360
542
|
request = Payabli::Internal::JSON::Request.new(
|
|
361
543
|
base_url: request_options[:base_url],
|
|
362
544
|
method: "GET",
|
|
363
545
|
path: "Query/boarding/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
546
|
+
headers: headers,
|
|
364
547
|
query: query_params,
|
|
365
548
|
request_options: request_options
|
|
366
549
|
)
|
|
@@ -393,6 +576,14 @@ module Payabli
|
|
|
393
576
|
# @option params [Hash[String, String, nil], nil] :parameters
|
|
394
577
|
# @option params [String, nil] :sort_by
|
|
395
578
|
#
|
|
579
|
+
# @example
|
|
580
|
+
# client.boarding.list_boarding_links(
|
|
581
|
+
# org_id: 123,
|
|
582
|
+
# from_record: 251,
|
|
583
|
+
# limit_record: 0,
|
|
584
|
+
# sort_by: "desc(field_name)"
|
|
585
|
+
# )
|
|
586
|
+
#
|
|
396
587
|
# @return [Payabli::Types::QueryBoardingLinksResponse]
|
|
397
588
|
def list_boarding_links(request_options: {}, **params)
|
|
398
589
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -402,10 +593,12 @@ module Payabli
|
|
|
402
593
|
query_params["parameters"] = params[:parameters] if params.key?(:parameters)
|
|
403
594
|
query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
|
|
404
595
|
|
|
596
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
405
597
|
request = Payabli::Internal::JSON::Request.new(
|
|
406
598
|
base_url: request_options[:base_url],
|
|
407
599
|
method: "GET",
|
|
408
600
|
path: "Query/boardinglinks/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
601
|
+
headers: headers,
|
|
409
602
|
query: query_params,
|
|
410
603
|
request_options: request_options
|
|
411
604
|
)
|
|
@@ -437,13 +630,24 @@ module Payabli
|
|
|
437
630
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
438
631
|
# @option request_options [Integer] :timeout_in_seconds
|
|
439
632
|
#
|
|
633
|
+
# @example
|
|
634
|
+
# client.boarding.add_service_to_paypoint_from_app(
|
|
635
|
+
# paypoint_id: 3040,
|
|
636
|
+
# template_id: 456,
|
|
637
|
+
# recipient_email: "merchant@example.com",
|
|
638
|
+
# return_boarding_access_info_in_line: true,
|
|
639
|
+
# on_create: ["submitApplication"]
|
|
640
|
+
# )
|
|
641
|
+
#
|
|
440
642
|
# @return [Payabli::Types::CreateApplicationFromPaypointResponse]
|
|
441
643
|
def add_service_to_paypoint_from_app(request_options: {}, **params)
|
|
442
644
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
645
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
443
646
|
request = Payabli::Internal::JSON::Request.new(
|
|
444
647
|
base_url: request_options[:base_url],
|
|
445
648
|
method: "POST",
|
|
446
649
|
path: "Boarding/applications",
|
|
650
|
+
headers: headers,
|
|
447
651
|
body: Payabli::Boarding::Types::CreateApplicationFromPaypointRequest.new(params).to_h,
|
|
448
652
|
request_options: request_options
|
|
449
653
|
)
|
|
@@ -475,13 +679,18 @@ module Payabli
|
|
|
475
679
|
# @option request_options [Integer] :timeout_in_seconds
|
|
476
680
|
# @option params [Integer] :paypoint_id
|
|
477
681
|
#
|
|
682
|
+
# @example
|
|
683
|
+
# client.boarding.get_applications_by_paypoint_id(paypoint_id: 3040)
|
|
684
|
+
#
|
|
478
685
|
# @return [Payabli::Types::QueryBoardingAppsListResponse]
|
|
479
686
|
def get_applications_by_paypoint_id(request_options: {}, **params)
|
|
480
687
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
688
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
481
689
|
request = Payabli::Internal::JSON::Request.new(
|
|
482
690
|
base_url: request_options[:base_url],
|
|
483
691
|
method: "GET",
|
|
484
692
|
path: "Boarding/applications/#{URI.encode_uri_component(params[:paypoint_id].to_s)}",
|
|
693
|
+
headers: headers,
|
|
485
694
|
request_options: request_options
|
|
486
695
|
)
|
|
487
696
|
begin
|
|
@@ -22,6 +22,12 @@ module Payabli
|
|
|
22
22
|
# @option params [Integer] :id
|
|
23
23
|
# @option params [String, nil] :idempotency_key
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.charge_backs.add_response(
|
|
27
|
+
# id: 1000000,
|
|
28
|
+
# idempotency_key: "6B29FC40-CA47-1067-B31D-00DD010662DA"
|
|
29
|
+
# )
|
|
30
|
+
#
|
|
25
31
|
# @return [Payabli::Types::AddResponseResponse]
|
|
26
32
|
def add_response(request_options: {}, **params)
|
|
27
33
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -32,6 +38,7 @@ module Payabli
|
|
|
32
38
|
headers = {}
|
|
33
39
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
34
40
|
|
|
41
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
35
42
|
request = Payabli::Internal::JSON::Request.new(
|
|
36
43
|
base_url: request_options[:base_url],
|
|
37
44
|
method: "POST",
|
|
@@ -65,13 +72,18 @@ module Payabli
|
|
|
65
72
|
# @option request_options [Integer] :timeout_in_seconds
|
|
66
73
|
# @option params [Integer] :id
|
|
67
74
|
#
|
|
75
|
+
# @example
|
|
76
|
+
# client.charge_backs.get_chargeback(id: 1000000)
|
|
77
|
+
#
|
|
68
78
|
# @return [Payabli::Types::ChargebackQueryRecords]
|
|
69
79
|
def get_chargeback(request_options: {}, **params)
|
|
70
80
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
81
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
71
82
|
request = Payabli::Internal::JSON::Request.new(
|
|
72
83
|
base_url: request_options[:base_url],
|
|
73
84
|
method: "GET",
|
|
74
85
|
path: "ChargeBacks/read/#{URI.encode_uri_component(params[:id].to_s)}",
|
|
86
|
+
headers: headers,
|
|
75
87
|
request_options: request_options
|
|
76
88
|
)
|
|
77
89
|
begin
|
|
@@ -100,13 +112,21 @@ module Payabli
|
|
|
100
112
|
# @option params [Integer] :id
|
|
101
113
|
# @option params [String] :file_name
|
|
102
114
|
#
|
|
115
|
+
# @example
|
|
116
|
+
# client.charge_backs.get_chargeback_attachment(
|
|
117
|
+
# id: 1000000,
|
|
118
|
+
# file_name: "fileName"
|
|
119
|
+
# )
|
|
120
|
+
#
|
|
103
121
|
# @return [String]
|
|
104
122
|
def get_chargeback_attachment(request_options: {}, **params)
|
|
105
123
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
124
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
106
125
|
request = Payabli::Internal::JSON::Request.new(
|
|
107
126
|
base_url: request_options[:base_url],
|
|
108
127
|
method: "GET",
|
|
109
128
|
path: "ChargeBacks/getChargebackAttachments/#{URI.encode_uri_component(params[:id].to_s)}/#{URI.encode_uri_component(params[:file_name].to_s)}",
|
|
129
|
+
headers: headers,
|
|
110
130
|
request_options: request_options
|
|
111
131
|
)
|
|
112
132
|
begin
|
|
@@ -22,13 +22,23 @@ module Payabli
|
|
|
22
22
|
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
23
23
|
# @option request_options [Integer] :timeout_in_seconds
|
|
24
24
|
#
|
|
25
|
+
# @example
|
|
26
|
+
# client.check_capture.check_processing(
|
|
27
|
+
# entry_point: "8cfec329267",
|
|
28
|
+
# front_image: "/9j/4AAQSkZJRgABAQEASABIAAD...",
|
|
29
|
+
# rear_image: "/9j/4AAQSkZJRgABAQEASABIAAD...",
|
|
30
|
+
# check_amount: 12550
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
25
33
|
# @return [Payabli::Types::CheckCaptureResponse]
|
|
26
34
|
def check_processing(request_options: {}, **params)
|
|
27
35
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
36
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
28
37
|
request = Payabli::Internal::JSON::Request.new(
|
|
29
38
|
base_url: request_options[:base_url],
|
|
30
39
|
method: "POST",
|
|
31
40
|
path: "CheckCapture/CheckProcessing",
|
|
41
|
+
headers: headers,
|
|
32
42
|
body: Payabli::CheckCapture::Types::CheckCaptureRequestBody.new(params).to_h,
|
|
33
43
|
request_options: request_options
|
|
34
44
|
)
|
data/lib/payabli/client.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Payabli
|
|
|
5
5
|
# @param base_url [String, nil]
|
|
6
6
|
# @param client_id [String, nil]
|
|
7
7
|
# @param client_secret [String, nil]
|
|
8
|
-
# @param api_key [String
|
|
8
|
+
# @param api_key [String]
|
|
9
9
|
# @param max_retries [Integer]
|
|
10
10
|
#
|
|
11
11
|
# @return [void]
|
|
@@ -23,7 +23,7 @@ module Payabli
|
|
|
23
23
|
auth_client = Payabli::Token::Client.new(client: auth_raw_client)
|
|
24
24
|
|
|
25
25
|
# Create the OAuth provider with the auth client and credentials
|
|
26
|
-
@
|
|
26
|
+
@oauth_provider = Payabli::Internal::OAuthProvider.new(
|
|
27
27
|
auth_client: auth_client,
|
|
28
28
|
options: { base_url: base_url, client_id: client_id, client_secret: client_secret }
|
|
29
29
|
)
|
|
@@ -32,11 +32,13 @@ module Payabli
|
|
|
32
32
|
@raw_client = Payabli::Internal::Http::RawClient.new(
|
|
33
33
|
base_url: base_url || Payabli::Environment::SANDBOX,
|
|
34
34
|
headers: {
|
|
35
|
-
"User-Agent" => "payabli/3.0.
|
|
36
|
-
"X-Fern-Language" => "Ruby"
|
|
37
|
-
requestToken: api_key.to_s
|
|
35
|
+
"User-Agent" => "payabli/3.0.6",
|
|
36
|
+
"X-Fern-Language" => "Ruby"
|
|
38
37
|
},
|
|
39
|
-
auth_provider:
|
|
38
|
+
auth_provider: Payabli::Internal::RoutingAuthProvider.new(
|
|
39
|
+
api_key: api_key,
|
|
40
|
+
oauth_provider: @oauth_provider
|
|
41
|
+
),
|
|
40
42
|
max_retries: max_retries
|
|
41
43
|
)
|
|
42
44
|
end
|
data/lib/payabli/cloud/client.rb
CHANGED
|
@@ -23,6 +23,13 @@ module Payabli
|
|
|
23
23
|
# @option params [String] :entry
|
|
24
24
|
# @option params [String, nil] :idempotency_key
|
|
25
25
|
#
|
|
26
|
+
# @example
|
|
27
|
+
# client.cloud.add_device(
|
|
28
|
+
# entry: "8cfec329267",
|
|
29
|
+
# description: "Front Desk POS",
|
|
30
|
+
# registration_code: "YS7DS5"
|
|
31
|
+
# )
|
|
32
|
+
#
|
|
26
33
|
# @return [Payabli::Types::AddDeviceResponse]
|
|
27
34
|
def add_device(request_options: {}, **params)
|
|
28
35
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
@@ -33,6 +40,7 @@ module Payabli
|
|
|
33
40
|
headers = {}
|
|
34
41
|
headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
|
|
35
42
|
|
|
43
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
|
|
36
44
|
request = Payabli::Internal::JSON::Request.new(
|
|
37
45
|
base_url: request_options[:base_url],
|
|
38
46
|
method: "POST",
|
|
@@ -67,13 +75,21 @@ module Payabli
|
|
|
67
75
|
# @option params [String] :entry
|
|
68
76
|
# @option params [String] :device_id
|
|
69
77
|
#
|
|
78
|
+
# @example
|
|
79
|
+
# client.cloud.remove_device(
|
|
80
|
+
# entry: "8cfec329267",
|
|
81
|
+
# device_id: "499585-389fj484-3jcj8hj3"
|
|
82
|
+
# )
|
|
83
|
+
#
|
|
70
84
|
# @return [Payabli::Types::RemoveDeviceResponse]
|
|
71
85
|
def remove_device(request_options: {}, **params)
|
|
72
86
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
87
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
73
88
|
request = Payabli::Internal::JSON::Request.new(
|
|
74
89
|
base_url: request_options[:base_url],
|
|
75
90
|
method: "DELETE",
|
|
76
91
|
path: "Cloud/register/#{URI.encode_uri_component(params[:entry].to_s)}/#{URI.encode_uri_component(params[:device_id].to_s)}",
|
|
92
|
+
headers: headers,
|
|
77
93
|
request_options: request_options
|
|
78
94
|
)
|
|
79
95
|
begin
|
|
@@ -102,13 +118,21 @@ module Payabli
|
|
|
102
118
|
# @option params [String] :entry
|
|
103
119
|
# @option params [String] :device_id
|
|
104
120
|
#
|
|
121
|
+
# @example
|
|
122
|
+
# client.cloud.history_device(
|
|
123
|
+
# entry: "8cfec329267",
|
|
124
|
+
# device_id: "499585-389fj484-3jcj8hj3"
|
|
125
|
+
# )
|
|
126
|
+
#
|
|
105
127
|
# @return [Payabli::Types::CloudQueryApiResponse]
|
|
106
128
|
def history_device(request_options: {}, **params)
|
|
107
129
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
130
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
108
131
|
request = Payabli::Internal::JSON::Request.new(
|
|
109
132
|
base_url: request_options[:base_url],
|
|
110
133
|
method: "GET",
|
|
111
134
|
path: "Cloud/history/#{URI.encode_uri_component(params[:entry].to_s)}/#{URI.encode_uri_component(params[:device_id].to_s)}",
|
|
135
|
+
headers: headers,
|
|
112
136
|
request_options: request_options
|
|
113
137
|
)
|
|
114
138
|
begin
|
|
@@ -140,16 +164,21 @@ module Payabli
|
|
|
140
164
|
# @option params [String] :entry
|
|
141
165
|
# @option params [Boolean, nil] :force_refresh
|
|
142
166
|
#
|
|
167
|
+
# @example
|
|
168
|
+
# client.cloud.list_device(entry: "8cfec329267")
|
|
169
|
+
#
|
|
143
170
|
# @return [Payabli::Types::CloudQueryApiResponse]
|
|
144
171
|
def list_device(request_options: {}, **params)
|
|
145
172
|
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
146
173
|
query_params = {}
|
|
147
174
|
query_params["forceRefresh"] = params[:force_refresh] if params.key?(:force_refresh)
|
|
148
175
|
|
|
176
|
+
headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
|
|
149
177
|
request = Payabli::Internal::JSON::Request.new(
|
|
150
178
|
base_url: request_options[:base_url],
|
|
151
179
|
method: "GET",
|
|
152
180
|
path: "Cloud/list/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
181
|
+
headers: headers,
|
|
153
182
|
query: query_params,
|
|
154
183
|
request_options: request_options
|
|
155
184
|
)
|