payabli 2.2.14 → 2.2.15

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c26b5153988401c77aa801347a9048487e89019dd9d58bf459c3d95dce29896
4
- data.tar.gz: bb2810a10f507f337d7816018d250deb2875bcf35279d88f17a711c4f488c65f
3
+ metadata.gz: 4e5570a4534220a2d2377264e01967db162cf12480b0bc7c1c3dc66d43291808
4
+ data.tar.gz: 14d647dfa19da2a6f973bf98416544c60016a1ab3e593ae0135a80ab1a2ed768
5
5
  SHA512:
6
- metadata.gz: 975ebf7ca566db3eb3fa88f22a104ba3c692e7567c73bf7a1042d3abc3ce6ffe338cdfded122da65c3777279d5783d04fab7bad32c3165fad008e39652af4f65
7
- data.tar.gz: 91617a635216b2c28fcfcd2079b2bfe6aad527355946fb915320c29dc00965d22e355e5ee52d28c176e2b2dcf43026dfd4197c21c654f3d820ab4e6abb1b2c7c
6
+ metadata.gz: 14ecdae519c81169a049294d59bcd4f2c86255e6f32b3122517b86b2b16693b0905332a8f62eabc0d8558bc5c84006655fca2314c5eeb59fb4651e64a6525e3b
7
+ data.tar.gz: b3bb126add655d34888c4ee569d528d1e29e36ccd85dd010f5b994581a2a3e39b7284d4edfc17253a26aa8d802d8287058bcd8c5fe037e94b7c5a9433ba67150
data/.fern/metadata.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
- "cliVersion": "3.32.0",
2
+ "cliVersion": "3.68.1",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
4
  "generatorVersion": "1.0.0-rc83",
5
5
  "generatorConfig": {
6
6
  "enableWireTests": true
7
7
  },
8
- "sdkVersion": "2.2.14"
8
+ "sdkVersion": "2.2.15"
9
9
  }
@@ -10,7 +10,7 @@ module Payabli
10
10
  @raw_client = Payabli::Internal::Http::RawClient.new(
11
11
  base_url: base_url || Payabli::Environment::SANDBOX,
12
12
  headers: {
13
- "User-Agent" => "payabli/2.2.14",
13
+ "User-Agent" => "payabli/2.2.15",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  requestToken: api_key.to_s
16
16
  }
@@ -377,6 +377,56 @@ module Payabli
377
377
  error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
378
378
  raise error_class.new(response.body, code: code)
379
379
  end
380
+
381
+ # Updates the status of a processed check payment transaction. This endpoint handles the status transition,
382
+ # updates related bills, creates audit events, and triggers notifications.
383
+ #
384
+ # The transaction must meet all of the following criteria:
385
+ # - **Status**: Must be in Processing or Processed status.
386
+ # - **Payment method**: Must be a check payment method.
387
+ #
388
+ # ### Allowed status values
389
+ #
390
+ # | Value | Status | Description |
391
+ # |-------|--------|-------------|
392
+ # | `0` | Cancelled/Voided | Cancels the check transaction. Reverts associated bills to their previous state
393
+ # (Approved or Active), creates "Cancelled" events, and sends a `payout_transaction_voidedcancelled` notification
394
+ # if the notification is enabled. |
395
+ # | `5` | Paid | Marks the check transaction as paid. Updates associated bills to "Paid" status, creates "Paid"
396
+ # events, and sends a `payout_transaction_paid` notification if the notification is enabled. |
397
+ #
398
+ # @param request_options [Hash]
399
+ # @param params [Hash]
400
+ # @option request_options [String] :base_url
401
+ # @option request_options [Hash{String => Object}] :additional_headers
402
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
403
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
404
+ # @option request_options [Integer] :timeout_in_seconds
405
+ # @option params [String] :trans_id
406
+ # @option params [Payabli::MoneyOutTypes::Types::AllowedCheckPaymentStatus] :check_payment_status
407
+ #
408
+ # @return [Payabli::Types::PayabliApiResponse00Responsedatanonobject]
409
+ def update_check_payment_status(request_options: {}, **params)
410
+ params = Payabli::Internal::Types::Utils.normalize_keys(params)
411
+ request = Payabli::Internal::JSON::Request.new(
412
+ base_url: request_options[:base_url],
413
+ method: "PATCH",
414
+ path: "MoneyOut/status/#{params[:trans_id]}/#{params[:check_payment_status]}",
415
+ request_options: request_options
416
+ )
417
+ begin
418
+ response = @client.send(request)
419
+ rescue Net::HTTPRequestTimeout
420
+ raise Payabli::Errors::TimeoutError
421
+ end
422
+ code = response.code.to_i
423
+ if code.between?(200, 299)
424
+ Payabli::Types::PayabliApiResponse00Responsedatanonobject.load(response.body)
425
+ else
426
+ error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
427
+ raise error_class.new(response.body, code: code)
428
+ end
429
+ end
380
430
  end
381
431
  end
382
432
  end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOutTypes
5
+ module Types
6
+ module AllowedCheckPaymentStatus
7
+ extend Payabli::Internal::Types::Enum
8
+
9
+ CANCELLED = "0"
10
+ PAID = "5"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -8,7 +8,6 @@ module Payabli
8
8
  field :transfer_detail_id, -> { Integer }, optional: false, nullable: true, api_name: "transferDetailId"
9
9
  field :transfer_id, -> { Integer }, optional: false, nullable: true, api_name: "transferId"
10
10
  field :transaction_id, -> { String }, optional: false, nullable: true, api_name: "transactionId"
11
- field :id_out, -> { Integer }, optional: false, nullable: true, api_name: "idOut"
12
11
  field :id_out, -> { Integer }, optional: false, nullable: true, api_name: "IdOut"
13
12
  field :method_, -> { String }, optional: false, nullable: true, api_name: "method"
14
13
  field :type, -> { String }, optional: false, nullable: true
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Payabli
4
- VERSION = "2.2.14"
4
+ VERSION = "2.2.15"
5
5
  end
data/lib/payabli.rb CHANGED
@@ -688,6 +688,7 @@ require_relative "payabli/types/vendor_response_billing_data"
688
688
  require_relative "payabli/types/vendor_data_response_payment_method"
689
689
  require_relative "payabli/types/vendor_data_response"
690
690
  require_relative "payabli/types/ach_payment_method"
691
+ require_relative "payabli/money_out_types/types/allowed_check_payment_status"
691
692
  require_relative "payabli/money_out_types/types/lot_number"
692
693
  require_relative "payabli/money_out_types/types/authorize_payment_method"
693
694
  require_relative "payabli/money_out_types/types/request_out_authorize_vendor_billing_data"
data/reference.md CHANGED
@@ -12361,6 +12361,90 @@ in the response when you make a GET request to `/MoneyOut/details/{transId}`.
12361
12361
  </dl>
12362
12362
 
12363
12363
 
12364
+ </dd>
12365
+ </dl>
12366
+ </details>
12367
+
12368
+ <details><summary><code>client.money_out.<a href="/lib/payabli/money_out/client.rb">update_check_payment_status</a>(trans_id, check_payment_status) -> Payabli::Types::PayabliApiResponse00Responsedatanonobject</code></summary>
12369
+ <dl>
12370
+ <dd>
12371
+
12372
+ #### 📝 Description
12373
+
12374
+ <dl>
12375
+ <dd>
12376
+
12377
+ <dl>
12378
+ <dd>
12379
+
12380
+ Updates the status of a processed check payment transaction. This endpoint handles the status transition, updates related bills, creates audit events, and triggers notifications.
12381
+
12382
+ The transaction must meet all of the following criteria:
12383
+ - **Status**: Must be in Processing or Processed status.
12384
+ - **Payment method**: Must be a check payment method.
12385
+
12386
+ ### Allowed status values
12387
+
12388
+ | Value | Status | Description |
12389
+ |-------|--------|-------------|
12390
+ | `0` | Cancelled/Voided | Cancels the check transaction. Reverts associated bills to their previous state (Approved or Active), creates "Cancelled" events, and sends a `payout_transaction_voidedcancelled` notification if the notification is enabled. |
12391
+ | `5` | Paid | Marks the check transaction as paid. Updates associated bills to "Paid" status, creates "Paid" events, and sends a `payout_transaction_paid` notification if the notification is enabled. |
12392
+ </dd>
12393
+ </dl>
12394
+ </dd>
12395
+ </dl>
12396
+
12397
+ #### 🔌 Usage
12398
+
12399
+ <dl>
12400
+ <dd>
12401
+
12402
+ <dl>
12403
+ <dd>
12404
+
12405
+ ```ruby
12406
+ client.money_out.update_check_payment_status(
12407
+ trans_id: 'TRANS123456',
12408
+ check_payment_status: '5'
12409
+ );
12410
+ ```
12411
+ </dd>
12412
+ </dl>
12413
+ </dd>
12414
+ </dl>
12415
+
12416
+ #### ⚙️ Parameters
12417
+
12418
+ <dl>
12419
+ <dd>
12420
+
12421
+ <dl>
12422
+ <dd>
12423
+
12424
+ **trans_id:** `String` — The Payabli transaction ID for the check payment.
12425
+
12426
+ </dd>
12427
+ </dl>
12428
+
12429
+ <dl>
12430
+ <dd>
12431
+
12432
+ **check_payment_status:** `Payabli::MoneyOutTypes::Types::AllowedCheckPaymentStatus` — The new status to apply to the check transaction. To mark a check as `Paid`, send 5. To mark a check as `Cancelled`, send 0.
12433
+
12434
+ </dd>
12435
+ </dl>
12436
+
12437
+ <dl>
12438
+ <dd>
12439
+
12440
+ **request_options:** `Payabli::MoneyOut::RequestOptions`
12441
+
12442
+ </dd>
12443
+ </dl>
12444
+ </dd>
12445
+ </dl>
12446
+
12447
+
12364
12448
  </dd>
12365
12449
  </dl>
12366
12450
  </details>