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 +4 -4
- data/.fern/metadata.json +2 -2
- data/lib/payabli/client.rb +1 -1
- data/lib/payabli/money_out/client.rb +50 -0
- data/lib/payabli/money_out_types/types/allowed_check_payment_status.rb +14 -0
- data/lib/payabli/query_types/types/transfer_out_detail_record.rb +0 -1
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +1 -0
- data/reference.md +84 -0
- data/wiremock/wiremock-mappings.json +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4e5570a4534220a2d2377264e01967db162cf12480b0bc7c1c3dc66d43291808
|
|
4
|
+
data.tar.gz: 14d647dfa19da2a6f973bf98416544c60016a1ab3e593ae0135a80ab1a2ed768
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 14ecdae519c81169a049294d59bcd4f2c86255e6f32b3122517b86b2b16693b0905332a8f62eabc0d8558bc5c84006655fca2314c5eeb59fb4651e64a6525e3b
|
|
7
|
+
data.tar.gz: b3bb126add655d34888c4ee569d528d1e29e36ccd85dd010f5b994581a2a3e39b7284d4edfc17253a26aa8d802d8287058bcd8c5fe037e94b7c5a9433ba67150
|
data/.fern/metadata.json
CHANGED
data/lib/payabli/client.rb
CHANGED
|
@@ -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.
|
|
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
|
|
@@ -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
|
data/lib/payabli/version.rb
CHANGED
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>
|