payabli 3.0.5 → 3.0.7

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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/README.md +4 -1
  4. data/lib/payabli/bill/client.rb +119 -0
  5. data/lib/payabli/boarding/client.rb +209 -0
  6. data/lib/payabli/case_management/client.rb +662 -0
  7. data/lib/payabli/case_management/types/assign_case_request.rb +15 -0
  8. data/lib/payabli/case_management/types/create_bank_account_change_case_request.rb +31 -0
  9. data/lib/payabli/case_management/types/list_cases_case_management_request.rb +17 -0
  10. data/lib/payabli/case_management/types/list_messages_case_management_request.rb +15 -0
  11. data/lib/payabli/case_management/types/post_case_message_request.rb +13 -0
  12. data/lib/payabli/case_management/types/transition_case_request.rb +17 -0
  13. data/lib/payabli/case_management/types/upload_attachment_case_management_request.rb +11 -0
  14. data/lib/payabli/case_management/types/validate_bank_account_change_request.rb +23 -0
  15. data/lib/payabli/charge_backs/client.rb +20 -0
  16. data/lib/payabli/check_capture/client.rb +10 -0
  17. data/lib/payabli/client.rb +34 -5
  18. data/lib/payabli/cloud/client.rb +29 -0
  19. data/lib/payabli/customer/client.rb +54 -0
  20. data/lib/payabli/export/client.rb +321 -0
  21. data/lib/payabli/funding/client.rb +9 -0
  22. data/lib/payabli/ghost_card/client.rb +31 -0
  23. data/lib/payabli/hosted_payment_pages/client.rb +23 -0
  24. data/lib/payabli/import/client.rb +15 -0
  25. data/lib/payabli/internal/http/raw_client.rb +26 -0
  26. data/lib/payabli/internal/oauth_provider.rb +73 -0
  27. data/lib/payabli/internal/routing_auth_provider.rb +51 -0
  28. data/lib/payabli/invoice/client.rb +118 -0
  29. data/lib/payabli/line_item/client.rb +43 -0
  30. data/lib/payabli/management/client.rb +13 -0
  31. data/lib/payabli/money_in/client.rb +238 -0
  32. data/lib/payabli/money_out/client.rb +111 -3
  33. data/lib/payabli/money_out/types/capture_all_out_request.rb +2 -0
  34. data/lib/payabli/money_out/types/capture_out_request.rb +2 -0
  35. data/lib/payabli/money_out/types/request_out_authorize.rb +2 -0
  36. data/lib/payabli/notification/client.rb +46 -0
  37. data/lib/payabli/notificationlogs/client.rb +27 -0
  38. data/lib/payabli/ocr/client.rb +10 -0
  39. data/lib/payabli/organization/client.rb +91 -0
  40. data/lib/payabli/payment_link/client.rb +367 -0
  41. data/lib/payabli/payment_method_domain/client.rb +56 -0
  42. data/lib/payabli/payout_subscription/client.rb +50 -0
  43. data/lib/payabli/paypoint/client.rb +56 -0
  44. data/lib/payabli/query/client.rb +414 -0
  45. data/lib/payabli/statistic/client.rb +39 -0
  46. data/lib/payabli/subscription/client.rb +46 -0
  47. data/lib/payabli/templates/client.rb +28 -0
  48. data/lib/payabli/token/client.rb +8 -0
  49. data/lib/payabli/token_storage/client.rb +55 -0
  50. data/lib/payabli/types/attachment_response.rb +24 -0
  51. data/lib/payabli/types/available_transitions_response.rb +10 -0
  52. data/lib/payabli/types/bank_account_change_parameters.rb +30 -0
  53. data/lib/payabli/types/bank_account_change_parameters_type.rb +11 -0
  54. data/lib/payabli/types/bank_account_services.rb +12 -0
  55. data/lib/payabli/types/bank_review_decision_reason.rb +14 -0
  56. data/lib/payabli/types/bank_verification_metadata.rb +14 -0
  57. data/lib/payabli/types/case_list_response.rb +12 -0
  58. data/lib/payabli/types/case_list_summary.rb +20 -0
  59. data/lib/payabli/types/case_management_bank_account_function.rb +17 -0
  60. data/lib/payabli/types/case_metadata.rb +12 -0
  61. data/lib/payabli/types/case_response.rb +50 -0
  62. data/lib/payabli/types/case_state.rb +22 -0
  63. data/lib/payabli/types/case_trigger.rb +22 -0
  64. data/lib/payabli/types/case_type.rb +11 -0
  65. data/lib/payabli/types/message_page.rb +12 -0
  66. data/lib/payabli/types/money_in_service.rb +17 -0
  67. data/lib/payabli/types/money_out_service.rb +17 -0
  68. data/lib/payabli/types/notification_content.rb +1 -1
  69. data/lib/payabli/types/notification_content_event_type.rb +14 -80
  70. data/lib/payabli/types/notification_standard_request_content_event_type.rb +97 -111
  71. data/lib/payabli/types/org_ref.rb +12 -0
  72. data/lib/payabli/types/paypoint_ref.rb +12 -0
  73. data/lib/payabli/types/posted_message.rb +14 -0
  74. data/lib/payabli/types/pre_creation_validation_result.rb +16 -0
  75. data/lib/payabli/types/review_decision_metadata.rb +12 -0
  76. data/lib/payabli/types/room_message_view.rb +18 -0
  77. data/lib/payabli/types/state_transition_response.rb +26 -0
  78. data/lib/payabli/types/user_ref.rb +12 -0
  79. data/lib/payabli/types/verification_code.rb +14 -0
  80. data/lib/payabli/user/client.rb +67 -0
  81. data/lib/payabli/vendor/client.rb +102 -0
  82. data/lib/payabli/version.rb +1 -1
  83. data/lib/payabli/wallet/client.rb +34 -0
  84. data/lib/payabli.rb +38 -0
  85. data/reference.md +1401 -223
  86. data/wiremock/wiremock-mappings.json +450 -1303
  87. metadata +40 -2
@@ -18,8 +18,8 @@ module Payabli
18
18
  # When `autoCapture` is `true`, Payabli captures the transaction asynchronously after authorization. The response
19
19
  # confirms only that the transaction was authorized; it doesn't confirm that capture succeeded. To confirm
20
20
  # capture, listen for the
21
- # [`payout_transaction_approvedcaptured`](/developers/api-reference/webhooks-overview/payout-transaction-approved-captured)
22
- # webhook event.
21
+ # [`payout_transaction_approvedcaptured`](/developers/webhooks/payout-transaction-approved-captured) webhook
22
+ # event.
23
23
  #
24
24
  # If a velocity fraud alert is triggered, the endpoint returns a `202` response with `responseCode` `9051`, and
25
25
  # the authorization is held for risk review rather than rejected. If a risk policy blocks the transaction, the
@@ -40,23 +40,46 @@ module Payabli
40
40
  # @option params [Boolean, nil] :allow_duplicated_bills
41
41
  # @option params [Boolean, nil] :do_not_create_bills
42
42
  # @option params [Boolean, nil] :force_vendor_creation
43
+ # @option params [Boolean, nil] :same_day_ach
43
44
  # @option params [String, nil] :idempotency_key
44
45
  #
46
+ # @example
47
+ # client.money_out.authorize_out(
48
+ # entry_point: "8cfec329267",
49
+ # order_description: "Window Painting",
50
+ # payment_method: {
51
+ # method_: "managed"
52
+ # },
53
+ # payment_details: {
54
+ # total_amount: 47,
55
+ # unbundled: false
56
+ # },
57
+ # vendor_data: {
58
+ # vendor_number: "VEN-123"
59
+ # },
60
+ # invoice_data: [{
61
+ # bill_id: 54323
62
+ # }],
63
+ # auto_capture: true
64
+ # )
65
+ #
45
66
  # @return [Payabli::Types::AuthCapturePayoutResponse]
46
67
  def authorize_out(request_options: {}, **params)
47
68
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
48
69
  request_data = Payabli::MoneyOut::Types::RequestOutAuthorize.new(params).to_h
49
- non_body_param_names = %w[allowDuplicatedBills doNotCreateBills forceVendorCreation idempotencyKey]
70
+ non_body_param_names = %w[allowDuplicatedBills doNotCreateBills forceVendorCreation sameDayACH idempotencyKey]
50
71
  body = request_data.except(*non_body_param_names)
51
72
 
52
73
  query_params = {}
53
74
  query_params["allowDuplicatedBills"] = params[:allow_duplicated_bills] if params.key?(:allow_duplicated_bills)
54
75
  query_params["doNotCreateBills"] = params[:do_not_create_bills] if params.key?(:do_not_create_bills)
55
76
  query_params["forceVendorCreation"] = params[:force_vendor_creation] if params.key?(:force_vendor_creation)
77
+ query_params["sameDayACH"] = params[:same_day_ach] if params.key?(:same_day_ach)
56
78
 
57
79
  headers = {}
58
80
  headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
59
81
 
82
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
60
83
  request = Payabli::Internal::JSON::Request.new(
61
84
  base_url: request_options[:base_url],
62
85
  method: "POST",
@@ -90,13 +113,18 @@ module Payabli
90
113
  # @option request_options [Hash{String => Object}] :additional_body_parameters
91
114
  # @option request_options [Integer] :timeout_in_seconds
92
115
  #
116
+ # @example
117
+ # client.money_out.cancel_all_out(request: %w[2-29 2-28 2-27])
118
+ #
93
119
  # @return [Payabli::Types::CaptureAllOutResponse]
94
120
  def cancel_all_out(request_options: {}, **params)
95
121
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
122
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
96
123
  request = Payabli::Internal::JSON::Request.new(
97
124
  base_url: request_options[:base_url],
98
125
  method: "POST",
99
126
  path: "MoneyOut/cancelAll",
127
+ headers: headers,
100
128
  body: params,
101
129
  request_options: request_options
102
130
  )
@@ -125,13 +153,18 @@ module Payabli
125
153
  # @option request_options [Integer] :timeout_in_seconds
126
154
  # @option params [String] :reference_id
127
155
  #
156
+ # @example
157
+ # client.money_out.cancel_out_get(reference_id: "129-219")
158
+ #
128
159
  # @return [Payabli::Types::PayabliApiResponse0000]
129
160
  def cancel_out_get(request_options: {}, **params)
130
161
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
162
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
131
163
  request = Payabli::Internal::JSON::Request.new(
132
164
  base_url: request_options[:base_url],
133
165
  method: "GET",
134
166
  path: "MoneyOut/cancel/#{URI.encode_uri_component(params[:reference_id].to_s)}",
167
+ headers: headers,
135
168
  request_options: request_options
136
169
  )
137
170
  begin
@@ -159,13 +192,18 @@ module Payabli
159
192
  # @option request_options [Integer] :timeout_in_seconds
160
193
  # @option params [String] :reference_id
161
194
  #
195
+ # @example
196
+ # client.money_out.cancel_out_delete(reference_id: "129-219")
197
+ #
162
198
  # @return [Payabli::Types::PayabliApiResponse0000]
163
199
  def cancel_out_delete(request_options: {}, **params)
164
200
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
201
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
165
202
  request = Payabli::Internal::JSON::Request.new(
166
203
  base_url: request_options[:base_url],
167
204
  method: "DELETE",
168
205
  path: "MoneyOut/cancel/#{URI.encode_uri_component(params[:reference_id].to_s)}",
206
+ headers: headers,
169
207
  request_options: request_options
170
208
  )
171
209
  begin
@@ -192,19 +230,30 @@ module Payabli
192
230
  # @option request_options [Hash{String => Object}] :additional_query_parameters
193
231
  # @option request_options [Hash{String => Object}] :additional_body_parameters
194
232
  # @option request_options [Integer] :timeout_in_seconds
233
+ # @option params [Boolean, nil] :auto_convert_same_day_ach
195
234
  # @option params [String, nil] :idempotency_key
196
235
  #
236
+ # @example
237
+ # client.money_out.capture_all_out(body: %w[2-29 2-28 2-27])
238
+ #
197
239
  # @return [Payabli::Types::CaptureAllOutResponse]
198
240
  def capture_all_out(request_options: {}, **params)
199
241
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
242
+ query_param_names = %i[auto_convert_same_day_ach]
243
+ query_params = {}
244
+ query_params["autoConvertSameDayAch"] = params[:auto_convert_same_day_ach] if params.key?(:auto_convert_same_day_ach)
245
+ params = params.except(*query_param_names)
246
+
200
247
  headers = {}
201
248
  headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
202
249
 
250
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
203
251
  request = Payabli::Internal::JSON::Request.new(
204
252
  base_url: request_options[:base_url],
205
253
  method: "POST",
206
254
  path: "MoneyOut/captureAll",
207
255
  headers: headers,
256
+ query: query_params,
208
257
  body: params,
209
258
  request_options: request_options
210
259
  )
@@ -237,19 +286,28 @@ module Payabli
237
286
  # @option request_options [Hash{String => Object}] :additional_body_parameters
238
287
  # @option request_options [Integer] :timeout_in_seconds
239
288
  # @option params [String] :reference_id
289
+ # @option params [Boolean, nil] :auto_convert_same_day_ach
240
290
  # @option params [String, nil] :idempotency_key
241
291
  #
292
+ # @example
293
+ # client.money_out.capture_out(reference_id: "129-219")
294
+ #
242
295
  # @return [Payabli::Types::AuthCapturePayoutResponse]
243
296
  def capture_out(request_options: {}, **params)
244
297
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
298
+ query_params = {}
299
+ query_params["autoConvertSameDayAch"] = params[:auto_convert_same_day_ach] if params.key?(:auto_convert_same_day_ach)
300
+
245
301
  headers = {}
246
302
  headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
247
303
 
304
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
248
305
  request = Payabli::Internal::JSON::Request.new(
249
306
  base_url: request_options[:base_url],
250
307
  method: "GET",
251
308
  path: "MoneyOut/capture/#{URI.encode_uri_component(params[:reference_id].to_s)}",
252
309
  headers: headers,
310
+ query: query_params,
253
311
  request_options: request_options
254
312
  )
255
313
  begin
@@ -277,13 +335,18 @@ module Payabli
277
335
  # @option request_options [Integer] :timeout_in_seconds
278
336
  # @option params [String] :trans_id
279
337
  #
338
+ # @example
339
+ # client.money_out.payout_details(trans_id: "45-as456777hhhhhhhhhh77777777-324")
340
+ #
280
341
  # @return [Payabli::Types::BillDetailResponse]
281
342
  def payout_details(request_options: {}, **params)
282
343
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
344
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
283
345
  request = Payabli::Internal::JSON::Request.new(
284
346
  base_url: request_options[:base_url],
285
347
  method: "GET",
286
348
  path: "MoneyOut/details/#{URI.encode_uri_component(params[:trans_id].to_s)}",
349
+ headers: headers,
287
350
  request_options: request_options
288
351
  )
289
352
  begin
@@ -311,13 +374,18 @@ module Payabli
311
374
  # @option request_options [Integer] :timeout_in_seconds
312
375
  # @option params [String] :card_token
313
376
  #
377
+ # @example
378
+ # client.money_out.v_card_get(card_token: "20230403315245421165")
379
+ #
314
380
  # @return [Payabli::Types::VCardGetResponse]
315
381
  def v_card_get(request_options: {}, **params)
316
382
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
383
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
317
384
  request = Payabli::Internal::JSON::Request.new(
318
385
  base_url: request_options[:base_url],
319
386
  method: "GET",
320
387
  path: "MoneyOut/vcard/#{URI.encode_uri_component(params[:card_token].to_s)}",
388
+ headers: headers,
321
389
  request_options: request_options
322
390
  )
323
391
  begin
@@ -353,6 +421,12 @@ module Payabli
353
421
  # @option request_options [Integer] :timeout_in_seconds
354
422
  # @option params [String] :card_token
355
423
  #
424
+ # @example
425
+ # client.money_out.renew_v_card(
426
+ # card_token: "20231206142225226104",
427
+ # expiration_date: "12-2027"
428
+ # )
429
+ #
356
430
  # @return [Payabli::Types::RenewVCardResponse]
357
431
  def renew_v_card(request_options: {}, **params)
358
432
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
@@ -360,10 +434,12 @@ module Payabli
360
434
  non_body_param_names = %w[cardToken]
361
435
  body = request_data.except(*non_body_param_names)
362
436
 
437
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
363
438
  request = Payabli::Internal::JSON::Request.new(
364
439
  base_url: request_options[:base_url],
365
440
  method: "PUT",
366
441
  path: "MoneyOutCard/vcard/#{URI.encode_uri_component(params[:card_token].to_s)}/renew",
442
+ headers: headers,
367
443
  body: body,
368
444
  request_options: request_options
369
445
  )
@@ -391,13 +467,18 @@ module Payabli
391
467
  # @option request_options [Hash{String => Object}] :additional_body_parameters
392
468
  # @option request_options [Integer] :timeout_in_seconds
393
469
  #
470
+ # @example
471
+ # client.money_out.send_v_card_link(trans_id: "01K33Z6YQZ6GD5QVKZ856MJBSC")
472
+ #
394
473
  # @return [Payabli::Types::OperationResult]
395
474
  def send_v_card_link(request_options: {}, **params)
396
475
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
476
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
397
477
  request = Payabli::Internal::JSON::Request.new(
398
478
  base_url: request_options[:base_url],
399
479
  method: "POST",
400
480
  path: "vcard/send-card-link",
481
+ headers: headers,
401
482
  body: Payabli::MoneyOut::Types::SendVCardLinkRequest.new(params).to_h,
402
483
  request_options: request_options
403
484
  )
@@ -428,13 +509,18 @@ module Payabli
428
509
  # @option request_options [Integer] :timeout_in_seconds
429
510
  # @option params [String] :asset_name
430
511
  #
512
+ # @example
513
+ # client.money_out.get_check_image(asset_name: "check133832686289732320_01JKBNZ5P32JPTZY8XXXX000000.pdf")
514
+ #
431
515
  # @return [String]
432
516
  def get_check_image(request_options: {}, **params)
433
517
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
518
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
434
519
  request = Payabli::Internal::JSON::Request.new(
435
520
  base_url: request_options[:base_url],
436
521
  method: "GET",
437
522
  path: "MoneyOut/checkimage/#{URI.encode_uri_component(params[:asset_name].to_s)}",
523
+ headers: headers,
438
524
  request_options: request_options
439
525
  )
440
526
  begin
@@ -476,13 +562,21 @@ module Payabli
476
562
  # @option params [String] :trans_id
477
563
  # @option params [Payabli::Types::AllowedCheckPaymentStatus] :check_payment_status
478
564
  #
565
+ # @example
566
+ # client.money_out.update_check_payment_status(
567
+ # trans_id: "TRANS123456",
568
+ # check_payment_status: "5"
569
+ # )
570
+ #
479
571
  # @return [Payabli::Types::PayabliApiResponse00Responsedatanonobject]
480
572
  def update_check_payment_status(request_options: {}, **params)
481
573
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
574
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
482
575
  request = Payabli::Internal::JSON::Request.new(
483
576
  base_url: request_options[:base_url],
484
577
  method: "PATCH",
485
578
  path: "MoneyOut/status/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:check_payment_status].to_s)}",
579
+ headers: headers,
486
580
  request_options: request_options
487
581
  )
488
582
  begin
@@ -518,6 +612,19 @@ module Payabli
518
612
  # @option params [String] :trans_id
519
613
  # @option params [String, nil] :idempotency_key
520
614
  #
615
+ # @example
616
+ # client.money_out.reissue_out(
617
+ # trans_id: "129-219",
618
+ # payment_method: {
619
+ # method_: "ach",
620
+ # ach_account: "9876543210",
621
+ # ach_account_type: "savings",
622
+ # ach_routing: "021000021",
623
+ # ach_holder: "Acme Corp",
624
+ # ach_holder_type: "business"
625
+ # }
626
+ # )
627
+ #
521
628
  # @return [Payabli::Types::ReissuePayoutResponse]
522
629
  def reissue_out(request_options: {}, **params)
523
630
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
@@ -531,6 +638,7 @@ module Payabli
531
638
  headers = {}
532
639
  headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
533
640
 
641
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }]).merge(headers)
534
642
  request = Payabli::Internal::JSON::Request.new(
535
643
  base_url: request_options[:base_url],
536
644
  method: "POST",
@@ -4,6 +4,8 @@ module Payabli
4
4
  module MoneyOut
5
5
  module Types
6
6
  class CaptureAllOutRequest < Internal::Types::Model
7
+ field :auto_convert_same_day_ach, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "autoConvertSameDayAch"
8
+
7
9
  field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
8
10
 
9
11
  field :body, -> { Internal::Types::Array[String] }, optional: false, nullable: false
@@ -6,6 +6,8 @@ module Payabli
6
6
  class CaptureOutRequest < Internal::Types::Model
7
7
  field :reference_id, -> { String }, optional: false, nullable: false, api_name: "referenceId"
8
8
 
9
+ field :auto_convert_same_day_ach, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "autoConvertSameDayAch"
10
+
9
11
  field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
10
12
  end
11
13
  end
@@ -10,6 +10,8 @@ module Payabli
10
10
 
11
11
  field :force_vendor_creation, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "forceVendorCreation"
12
12
 
13
+ field :same_day_ach, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "sameDayACH"
14
+
13
15
  field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
14
16
 
15
17
  field :entry_point, -> { String }, optional: false, nullable: false, api_name: "entryPoint"
@@ -20,13 +20,28 @@ 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.notification.add_notification(
25
+ # content: {
26
+ # event_type: "createdapplication"
27
+ # },
28
+ # frequency: "untilcancelled",
29
+ # method_: "web",
30
+ # owner_id: 236,
31
+ # owner_type: 0,
32
+ # status: 1,
33
+ # target: "https://webhook.site/2871b8f8-edc7-441a-b376-98d8c8e33275"
34
+ # )
35
+ #
23
36
  # @return [Payabli::Types::PayabliApiResponseNotifications]
24
37
  def add_notification(request_options: {}, **params)
25
38
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
39
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
26
40
  request = Payabli::Internal::JSON::Request.new(
27
41
  base_url: request_options[:base_url],
28
42
  method: "POST",
29
43
  path: "Notification",
44
+ headers: headers,
30
45
  body: Payabli::Types::AddNotificationRequest.new(params).to_h,
31
46
  request_options: request_options
32
47
  )
@@ -55,13 +70,18 @@ module Payabli
55
70
  # @option request_options [Integer] :timeout_in_seconds
56
71
  # @option params [String] :n_id
57
72
  #
73
+ # @example
74
+ # client.notification.get_notification(n_id: "1717")
75
+ #
58
76
  # @return [Payabli::Types::NotificationQueryRecord]
59
77
  def get_notification(request_options: {}, **params)
60
78
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
79
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
61
80
  request = Payabli::Internal::JSON::Request.new(
62
81
  base_url: request_options[:base_url],
63
82
  method: "GET",
64
83
  path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
84
+ headers: headers,
65
85
  request_options: request_options
66
86
  )
67
87
  begin
@@ -89,13 +109,29 @@ module Payabli
89
109
  # @option request_options [Integer] :timeout_in_seconds
90
110
  # @option params [String] :n_id
91
111
  #
112
+ # @example
113
+ # client.notification.update_notification(
114
+ # n_id: "1717",
115
+ # content: {
116
+ # event_type: "approvedpayment"
117
+ # },
118
+ # frequency: "untilcancelled",
119
+ # method_: "email",
120
+ # owner_id: 136,
121
+ # owner_type: 0,
122
+ # status: 1,
123
+ # target: "newemail@email.com"
124
+ # )
125
+ #
92
126
  # @return [Payabli::Types::PayabliApiResponseNotifications]
93
127
  def update_notification(request_options: {}, **params)
94
128
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
129
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
95
130
  request = Payabli::Internal::JSON::Request.new(
96
131
  base_url: request_options[:base_url],
97
132
  method: "PUT",
98
133
  path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
134
+ headers: headers,
99
135
  body: Payabli::Types::UpdateNotificationRequest.new(params).to_h,
100
136
  request_options: request_options
101
137
  )
@@ -124,13 +160,18 @@ module Payabli
124
160
  # @option request_options [Integer] :timeout_in_seconds
125
161
  # @option params [String] :n_id
126
162
  #
163
+ # @example
164
+ # client.notification.delete_notification(n_id: "1717")
165
+ #
127
166
  # @return [Payabli::Types::PayabliApiResponseNotifications]
128
167
  def delete_notification(request_options: {}, **params)
129
168
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
169
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
130
170
  request = Payabli::Internal::JSON::Request.new(
131
171
  base_url: request_options[:base_url],
132
172
  method: "DELETE",
133
173
  path: "Notification/#{URI.encode_uri_component(params[:n_id].to_s)}",
174
+ headers: headers,
134
175
  request_options: request_options
135
176
  )
136
177
  begin
@@ -158,13 +199,18 @@ module Payabli
158
199
  # @option request_options [Integer] :timeout_in_seconds
159
200
  # @option params [Integer] :id
160
201
  #
202
+ # @example
203
+ # client.notification.get_report_file(id: 1000000)
204
+ #
161
205
  # @return [Hash[String, Object]]
162
206
  def get_report_file(request_options: {}, **params)
163
207
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
208
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
164
209
  request = Payabli::Internal::JSON::Request.new(
165
210
  base_url: request_options[:base_url],
166
211
  method: "GET",
167
212
  path: "Export/notificationReport/#{URI.encode_uri_component(params[:id].to_s)}",
213
+ headers: headers,
168
214
  request_options: request_options
169
215
  )
170
216
  begin
@@ -26,6 +26,16 @@ module Payabli
26
26
  # @option params [Integer, nil] :page_size
27
27
  # @option params [Integer, nil] :page
28
28
  #
29
+ # @example
30
+ # client.notificationlogs.search_notification_logs(
31
+ # page_size: 20,
32
+ # start_date: "2024-01-01T00:00:00Z",
33
+ # end_date: "2024-01-31T23:59:59Z",
34
+ # notification_event: "ActivatedMerchant",
35
+ # succeeded: true,
36
+ # org_id: 123
37
+ # )
38
+ #
29
39
  # @return [Array[Payabli::Types::NotificationLog]]
30
40
  def search_notification_logs(request_options: {}, **params)
31
41
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
@@ -37,10 +47,12 @@ module Payabli
37
47
  query_params["PageSize"] = params[:page_size] if params.key?(:page_size)
38
48
  query_params["Page"] = params[:page] if params.key?(:page)
39
49
 
50
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
40
51
  request = Payabli::Internal::JSON::Request.new(
41
52
  base_url: request_options[:base_url],
42
53
  method: "POST",
43
54
  path: "v2/notificationlogs",
55
+ headers: headers,
44
56
  query: query_params,
45
57
  body: body,
46
58
  request_options: request_options
@@ -69,13 +81,18 @@ module Payabli
69
81
  # @option request_options [Integer] :timeout_in_seconds
70
82
  # @option params [String] :uuid
71
83
  #
84
+ # @example
85
+ # client.notificationlogs.get_notification_log(uuid: "550e8400-e29b-41d4-a716-446655440000")
86
+ #
72
87
  # @return [Payabli::Types::NotificationLogDetail]
73
88
  def get_notification_log(request_options: {}, **params)
74
89
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
90
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
75
91
  request = Payabli::Internal::JSON::Request.new(
76
92
  base_url: request_options[:base_url],
77
93
  method: "GET",
78
94
  path: "v2/notificationlogs/#{URI.encode_uri_component(params[:uuid].to_s)}",
95
+ headers: headers,
79
96
  request_options: request_options
80
97
  )
81
98
  begin
@@ -105,13 +122,18 @@ module Payabli
105
122
  # @option request_options [Integer] :timeout_in_seconds
106
123
  # @option params [String] :uuid
107
124
  #
125
+ # @example
126
+ # client.notificationlogs.retry_notification_log(uuid: "550e8400-e29b-41d4-a716-446655440000")
127
+ #
108
128
  # @return [Payabli::Types::NotificationLogDetail]
109
129
  def retry_notification_log(request_options: {}, **params)
110
130
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
131
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
111
132
  request = Payabli::Internal::JSON::Request.new(
112
133
  base_url: request_options[:base_url],
113
134
  method: "GET",
114
135
  path: "v2/notificationlogs/#{URI.encode_uri_component(params[:uuid].to_s)}/retry",
136
+ headers: headers,
115
137
  request_options: request_options
116
138
  )
117
139
  begin
@@ -141,13 +163,18 @@ module Payabli
141
163
  # @option request_options [Hash{String => Object}] :additional_body_parameters
142
164
  # @option request_options [Integer] :timeout_in_seconds
143
165
  #
166
+ # @example
167
+ # client.notificationlogs.bulk_retry_notification_logs(request: %w[550e8400-e29b-41d4-a716-446655440000 550e8400-e29b-41d4-a716-446655440001 550e8400-e29b-41d4-a716-446655440002])
168
+ #
144
169
  # @return [untyped]
145
170
  def bulk_retry_notification_logs(request_options: {}, **params)
146
171
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
172
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
147
173
  request = Payabli::Internal::JSON::Request.new(
148
174
  base_url: request_options[:base_url],
149
175
  method: "POST",
150
176
  path: "v2/notificationlogs/retry",
177
+ headers: headers,
151
178
  body: params,
152
179
  request_options: request_options
153
180
  )
@@ -24,13 +24,18 @@ module Payabli
24
24
  # @option request_options [Integer] :timeout_in_seconds
25
25
  # @option params [Payabli::Types::TypeResult] :type_result
26
26
  #
27
+ # @example
28
+ # client.ocr.ocr_document_form(type_result: "typeResult")
29
+ #
27
30
  # @return [Payabli::Types::PayabliApiResponseOcr]
28
31
  def ocr_document_form(request_options: {}, **params)
29
32
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
33
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
30
34
  request = Payabli::Internal::JSON::Request.new(
31
35
  base_url: request_options[:base_url],
32
36
  method: "POST",
33
37
  path: "Import/ocrDocumentForm/#{URI.encode_uri_component(params[:type_result].to_s)}",
38
+ headers: headers,
34
39
  body: Payabli::Types::FileContentImageOnly.new(params).to_h,
35
40
  request_options: request_options
36
41
  )
@@ -62,13 +67,18 @@ module Payabli
62
67
  # @option request_options [Integer] :timeout_in_seconds
63
68
  # @option params [Payabli::Types::TypeResult] :type_result
64
69
  #
70
+ # @example
71
+ # client.ocr.ocr_document_json(type_result: "typeResult")
72
+ #
65
73
  # @return [Payabli::Types::PayabliApiResponseOcr]
66
74
  def ocr_document_json(request_options: {}, **params)
67
75
  params = Payabli::Internal::Types::Utils.normalize_keys(params)
76
+ headers = @client.auth_headers_for_endpoint(security: [{ "BearerAuth" => [] }, { "APIKeyAuth" => [] }])
68
77
  request = Payabli::Internal::JSON::Request.new(
69
78
  base_url: request_options[:base_url],
70
79
  method: "POST",
71
80
  path: "Import/ocrDocumentJson/#{URI.encode_uri_component(params[:type_result].to_s)}",
81
+ headers: headers,
72
82
  body: Payabli::Types::FileContentImageOnly.new(params).to_h,
73
83
  request_options: request_options
74
84
  )