payabli 3.0.0 → 3.0.2

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 (45) hide show
  1. checksums.yaml +4 -4
  2. data/.fern/metadata.json +4 -4
  3. data/lib/payabli/client.rb +6 -1
  4. data/lib/payabli/funding/client.rb +49 -0
  5. data/lib/payabli/funding/types/deposit_funds_request.rb +19 -0
  6. data/lib/payabli/money_in/client.rb +79 -35
  7. data/lib/payabli/money_out/client.rb +56 -1
  8. data/lib/payabli/money_out/types/renew_v_card_request.rb +13 -0
  9. data/lib/payabli/payment_link/client.rb +7 -0
  10. data/lib/payabli/payment_link/types/pay_link_data_invoice.rb +1 -1
  11. data/lib/payabli/types/auth_capture_payout_response_data.rb +2 -0
  12. data/lib/payabli/types/authorize_payment_method.rb +4 -0
  13. data/lib/payabli/types/bill_detail_response.rb +6 -2
  14. data/lib/payabli/types/cancel_payout_response_data.rb +27 -0
  15. data/lib/payabli/types/capture_all_out_response_response_data_item.rb +2 -0
  16. data/lib/payabli/types/deposit_funds_response.rb +16 -0
  17. data/lib/payabli/types/entity_id_string.rb +23 -0
  18. data/lib/payabli/types/method_element.rb +4 -0
  19. data/lib/payabli/types/methods_list.rb +6 -0
  20. data/lib/payabli/types/payabli_api_response_0000.rb +1 -1
  21. data/lib/payabli/types/query_response_settlements_records_item.rb +2 -0
  22. data/lib/payabli/types/refund_v_2_request.rb +21 -0
  23. data/lib/payabli/types/renew_v_card_response.rb +13 -0
  24. data/lib/payabli/types/renew_v_card_response_data.rb +25 -0
  25. data/lib/payabli/types/settlement_split_funding_detail.rb +23 -0
  26. data/lib/payabli/types/settlement_status_name.rb +23 -0
  27. data/lib/payabli/types/stat_basic_extended_query_record.rb +8 -0
  28. data/lib/payabli/types/transfer_out_record.rb +4 -0
  29. data/lib/payabli/types/vendor_call_status_completed.rb +20 -0
  30. data/lib/payabli/types/vendor_call_status_extracted_data.rb +12 -0
  31. data/lib/payabli/types/vendor_call_status_failed.rb +18 -0
  32. data/lib/payabli/types/vendor_call_status_response.rb +18 -0
  33. data/lib/payabli/types/vendor_call_status_scheduled.rb +14 -0
  34. data/lib/payabli/types/vendor_data.rb +1 -1
  35. data/lib/payabli/types/vendor_query_record.rb +1 -1
  36. data/lib/payabli/types/vendor_schedule_call_response.rb +20 -0
  37. data/lib/payabli/types/vendor_schedule_call_response_data.rb +16 -0
  38. data/lib/payabli/types/vendoridtrans.rb +23 -0
  39. data/lib/payabli/vendor/client.rb +79 -0
  40. data/lib/payabli/vendor/types/schedule_enrichment_call_request.rb +27 -0
  41. data/lib/payabli/version.rb +1 -1
  42. data/lib/payabli.rb +20 -0
  43. data/reference.md +456 -38
  44. data/wiremock/wiremock-mappings.json +160 -21
  45. metadata +22 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35d1d0f9c9192e9de7944d4aaa1da3c80b7f17d5eb8da38cd7ea3ec09494aa89
4
- data.tar.gz: fc0cafc8f12a715405fec705b5dad84c427dc0b0cff3c9a5c967c2438b9f052b
3
+ metadata.gz: 215e41e74ef3bd2fa5cf53366a25cce7d0d084eec1ec74067d49b05607d58271
4
+ data.tar.gz: bd0c29b5a3d830ebe2ba870fe4b13a61a91a69abeda2b56345c3608aac8c394e
5
5
  SHA512:
6
- metadata.gz: 8bde6e30de74cea3ff88293889f418da8d5fa776145051b5529f44ca72c978a33e8802b93aa0340e236332761b87563bbe805c8194597e83179b920736e86957
7
- data.tar.gz: 27848810a0c84c136cff58203388b8c2f12f97013c4cce281a5487a1b73696aafab6d88210f52fa22b418b669afe71c4c8f334ed296624fd104dc655a73f4be0
6
+ metadata.gz: a97fd769f512ef83d9ecbabfe846f91da4d1871c816d163e6ed77f067927b5260484cc425481dcac1d63d63bf5ee4adaa042220ed5ecb8002a1398c9808ced6a
7
+ data.tar.gz: aa953f69cda7ae3ec828a9149c1c24f35079bed28933a7a408f83a36085f6390658b9994be3144551f277ba62149073d5c2ef294efa4ecb4aa7975a25be88e53
data/.fern/metadata.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
- "cliVersion": "5.7.9",
2
+ "cliVersion": "5.56.0",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
4
  "generatorVersion": "1.12.7",
5
5
  "generatorConfig": {
6
6
  "enableWireTests": true,
7
7
  "rubocopVariableNumberStyle": "snake_case"
8
8
  },
9
- "originGitCommit": "212271239f0f5f12b9a4edb397ec89b34cd668e0",
9
+ "originGitCommit": "1aeb9b5f59cac476a429df4671f575ed07ab5731",
10
10
  "originGitCommitIsDirty": true,
11
11
  "invokedBy": "ci",
12
- "requestedVersion": "3.0.0",
12
+ "requestedVersion": "3.0.2",
13
13
  "ciProvider": "github",
14
- "sdkVersion": "3.0.0"
14
+ "sdkVersion": "3.0.2"
15
15
  }
@@ -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/3.0.0",
13
+ "User-Agent" => "payabli/3.0.2",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  requestToken: api_key.to_s
16
16
  }
@@ -157,6 +157,11 @@ module Payabli
157
157
  @money_out ||= Payabli::MoneyOut::Client.new(client: @raw_client)
158
158
  end
159
159
 
160
+ # @return [Payabli::Funding::Client]
161
+ def funding
162
+ @funding ||= Payabli::Funding::Client.new(client: @raw_client)
163
+ end
164
+
160
165
  # @return [Payabli::Wallet::Client]
161
166
  def wallet
162
167
  @wallet ||= Payabli::Wallet::Client.new(client: @raw_client)
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Funding
5
+ class Client
6
+ # @param client [Payabli::Internal::Http::RawClient]
7
+ #
8
+ # @return [void]
9
+ def initialize(client:)
10
+ @client = client
11
+ end
12
+
13
+ # Deposits funds into a paypoint's available payout balance. Deposited funds enter a pending state and aren't
14
+ # available for instant payouts until confirmed through FBO reconciliation.
15
+ #
16
+ # @param request_options [Hash]
17
+ # @param params [Payabli::Funding::Types::DepositFundsRequest]
18
+ # @option request_options [String] :base_url
19
+ # @option request_options [Hash{String => Object}] :additional_headers
20
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
21
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
22
+ # @option request_options [Integer] :timeout_in_seconds
23
+ #
24
+ # @return [Payabli::Types::DepositFundsResponse]
25
+ def deposit_funds(request_options: {}, **params)
26
+ params = Payabli::Internal::Types::Utils.normalize_keys(params)
27
+ request = Payabli::Internal::JSON::Request.new(
28
+ base_url: request_options[:base_url],
29
+ method: "POST",
30
+ path: "Funding/depositFunds",
31
+ body: Payabli::Funding::Types::DepositFundsRequest.new(params).to_h,
32
+ request_options: request_options
33
+ )
34
+ begin
35
+ response = @client.send(request)
36
+ rescue Net::HTTPRequestTimeout
37
+ raise Payabli::Errors::TimeoutError
38
+ end
39
+ code = response.code.to_i
40
+ if code.between?(200, 299)
41
+ Payabli::Types::DepositFundsResponse.load(response.body)
42
+ else
43
+ error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
44
+ raise error_class.new(response.body, code: code)
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Funding
5
+ module Types
6
+ class DepositFundsRequest < Internal::Types::Model
7
+ field :amount, -> { Integer }, optional: false, nullable: false
8
+
9
+ field :entrypoint, -> { String }, optional: false, nullable: false
10
+
11
+ field :account_id, -> { String }, optional: false, nullable: false, api_name: "accountId"
12
+
13
+ field :paypoint_id, -> { Integer }, optional: true, nullable: false, api_name: "paypointId"
14
+
15
+ field :same_day_ach, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "sameDayAch"
16
+ end
17
+ end
18
+ end
19
+ end
@@ -10,14 +10,19 @@ module Payabli
10
10
  @client = client
11
11
  end
12
12
 
13
+ # <Warning>
14
+ # This endpoint is deprecated. New integrations should use the [Authorize
15
+ # endpoint](/developers/api-reference/moneyinV2/authorize-a-transaction), then capture, void, or refund the
16
+ # resulting transaction with the corresponding endpoints. Transactions created with this legacy endpoint must be
17
+ # managed with the legacy lifecycle endpoints — they aren't interchangeable with the current ones.
18
+ # </Warning>
19
+ #
20
+ #
13
21
  # Authorize a card transaction. This returns an authorization code and reserves funds for the merchant. Authorized
14
22
  # transactions aren't flagged for settlement until
15
23
  # [captured](/developers/api-reference/moneyin/capture-an-authorized-transaction).
24
+ #
16
25
  # Only card transactions can be authorized. This endpoint can't be used for ACH transactions.
17
- # <Tip>
18
- # Consider migrating to the [v2 Authorize endpoint](/developers/api-reference/moneyinV2/authorize-a-transaction)
19
- # to take advantage of unified response codes and improved response consistency.
20
- # </Tip>
21
26
  #
22
27
  # @param request_options [Hash]
23
28
  # @param params [Payabli::Types::TransRequestBody]
@@ -64,8 +69,9 @@ module Payabli
64
69
  end
65
70
 
66
71
  # <Warning>
67
- # This endpoint is deprecated and will be sunset on November 24, 2025. Migrate to [POST
68
- # `/capture/{transId}`](/developers/api-reference/moneyin/capture-an-authorized-transaction)`.
72
+ # This endpoint is deprecated. Use [POST
73
+ # `/capture/{transId}`](/developers/api-reference/moneyin/capture-an-authorized-transaction) instead, which
74
+ # supports partial captures and service fee adjustments.
69
75
  # </Warning>
70
76
  #
71
77
  # Capture an [authorized
@@ -105,6 +111,14 @@ module Payabli
105
111
  end
106
112
  end
107
113
 
114
+ # <Warning>
115
+ # This endpoint is deprecated. Use it only to capture transactions originally authorized with the legacy
116
+ # [Authorize endpoint](/developers/api-reference/moneyin/authorize-a-transaction). New integrations should use the
117
+ # [Capture endpoint](/developers/api-reference/moneyinV2/capture-an-authorized-transaction), which only works on
118
+ # transactions authorized with the current [Authorize
119
+ # endpoint](/developers/api-reference/moneyinV2/authorize-a-transaction).
120
+ # </Warning>
121
+ #
108
122
  # Capture an [authorized transaction](/developers/api-reference/moneyin/authorize-a-transaction) to complete the
109
123
  # transaction and move funds from the customer to merchant account.
110
124
  #
@@ -112,12 +126,6 @@ module Payabli
112
126
  # [Capture an authorized transaction](/developers/developer-guides/pay-in-auth-and-capture) for more information
113
127
  # about this endpoint.
114
128
  #
115
- # <Tip>
116
- # Consider migrating to the [v2 Capture
117
- # endpoint](/developers/api-reference/moneyinV2/capture-an-authorized-transaction) to take advantage of unified
118
- # response codes and improved response consistency.
119
- # </Tip>
120
- #
121
129
  # @param request_options [Hash]
122
130
  # @param params [Payabli::Types::CaptureRequest]
123
131
  # @option request_options [String] :base_url
@@ -237,13 +245,14 @@ module Payabli
237
245
  end
238
246
  end
239
247
 
240
- # Make a single transaction. This method authorizes and captures a payment in one step.
248
+ # <Warning>
249
+ # This endpoint is deprecated. New integrations should use the [Make a transaction
250
+ # endpoint](/developers/api-reference/moneyinV2/make-a-transaction) and manage the resulting transaction with the
251
+ # corresponding void or refund endpoints. Transactions created with this legacy endpoint must be managed with the
252
+ # legacy lifecycle endpoints — they aren't interchangeable with the current ones.
253
+ # </Warning>
241
254
  #
242
- # <Tip>
243
- # Consider migrating to the [v2 Make a transaction
244
- # endpoint](/developers/api-reference/moneyinV2/make-a-transaction) to take advantage of unified response codes
245
- # and improved response consistency.
246
- # </Tip>
255
+ # Make a single transaction. This method authorizes and captures a payment in one step.
247
256
  #
248
257
  # @param request_options [Hash]
249
258
  # @param params [Payabli::Types::TransRequestBody]
@@ -295,11 +304,20 @@ module Payabli
295
304
  end
296
305
  end
297
306
 
307
+ # <Warning>
308
+ # This endpoint is deprecated and only works on transactions created with the legacy endpoints. There's no
309
+ # equivalent in the current endpoints. For transactions created with [Make a
310
+ # transaction](/developers/api-reference/moneyinV2/make-a-transaction) or
311
+ # [Authorize](/developers/api-reference/moneyinV2/authorize-a-transaction), check the transaction's settlement
312
+ # status and call [Void](/developers/api-reference/moneyinV2/void-a-transaction) or
313
+ # [Refund](/developers/api-reference/moneyinV2/refund-a-settled-transaction) based on the result.
314
+ # </Warning>
315
+ #
298
316
  # A reversal either refunds or voids a transaction independent of the transaction's settlement status. Send a
299
317
  # reversal request for a transaction, and Payabli automatically determines whether it's a refund or void. You
300
318
  # don't need to know whether the transaction is settled or not. This endpoint only works on transactions made with
301
- # the v1 API. For v2 transactions, check the transaction's settlement status and call v2 void or v2 refund based
302
- # on the result.
319
+ # the legacy endpoints. For transactions made with the current endpoints, check the transaction's settlement
320
+ # status and call void or refund based on the result.
303
321
  #
304
322
  # @param request_options [Hash]
305
323
  # @param params [Hash]
@@ -334,14 +352,17 @@ module Payabli
334
352
  end
335
353
  end
336
354
 
355
+ # <Warning>
356
+ # This endpoint is deprecated. Use it only to refund transactions originally created with the legacy endpoints.
357
+ # New integrations should use the [Refund
358
+ # endpoint](/developers/api-reference/moneyinV2/refund-a-settled-transaction), which only works on transactions
359
+ # created with [Make a transaction](/developers/api-reference/moneyinV2/make-a-transaction) or
360
+ # [Authorize](/developers/api-reference/moneyinV2/authorize-a-transaction).
361
+ # </Warning>
362
+ #
337
363
  # Refund a transaction that has settled and send money back to the account holder. If a transaction hasn't been
338
364
  # settled, void it instead.
339
365
  #
340
- # <Tip>
341
- # Consider migrating to the [v2 Refund endpoint](/developers/api-reference/moneyinV2/refund-a-settled-transaction)
342
- # to take advantage of unified response codes and improved response consistency.
343
- # </Tip>
344
- #
345
366
  # @param request_options [Hash]
346
367
  # @param params [Hash]
347
368
  # @option request_options [String] :base_url
@@ -375,6 +396,15 @@ module Payabli
375
396
  end
376
397
  end
377
398
 
399
+ # <Warning>
400
+ # This endpoint is deprecated. Use it only to refund transactions originally created with the legacy endpoints. To
401
+ # refund a split-funded transaction created with [Make a
402
+ # transaction](/developers/api-reference/moneyinV2/make-a-transaction) or
403
+ # [Authorize](/developers/api-reference/moneyinV2/authorize-a-transaction), use the [Refund
404
+ # endpoint](/developers/api-reference/moneyinV2/refund-a-settled-transaction) with split instructions in the
405
+ # request body.
406
+ # </Warning>
407
+ #
378
408
  # Refunds a settled transaction with split instructions.
379
409
  #
380
410
  # @param request_options [Hash]
@@ -536,14 +566,16 @@ module Payabli
536
566
  end
537
567
  end
538
568
 
569
+ # <Warning>
570
+ # This endpoint is deprecated. Use it only to void transactions originally created with the legacy endpoints. New
571
+ # integrations should use the [Void endpoint](/developers/api-reference/moneyinV2/void-a-transaction), which only
572
+ # works on transactions created with [Make a transaction](/developers/api-reference/moneyinV2/make-a-transaction)
573
+ # or [Authorize](/developers/api-reference/moneyinV2/authorize-a-transaction).
574
+ # </Warning>
575
+ #
539
576
  # Cancel a transaction that hasn't been settled yet. Voiding non-captured authorizations prevents future captures.
540
577
  # If a transaction has been settled, refund it instead.
541
578
  #
542
- # <Tip>
543
- # Consider migrating to the [v2 Void endpoint](/developers/api-reference/moneyinV2/void-a-transaction) to take
544
- # advantage of unified response codes and improved response consistency.
545
- # </Tip>
546
- #
547
579
  # @param request_options [Hash]
548
580
  # @param params [Hash]
549
581
  # @option request_options [String] :base_url
@@ -719,13 +751,18 @@ module Payabli
719
751
 
720
752
  # Give a full refund for a transaction that has settled and send money back to the account holder. To perform a
721
753
  # partial refund, see [Partially refund a
722
- # transaction](developers/api-reference/moneyinV2/partial-refund-a-settled-transaction).
754
+ # transaction](/developers/api-reference/moneyinV2/partial-refund-a-settled-transaction).
723
755
  #
724
756
  # This is the v2 version of the refund endpoint, and returns the unified response format. See [Pay In unified
725
757
  # response codes reference](/guides/pay-in-unified-response-codes-reference) for more information.
726
758
  #
759
+ # <Note>
760
+ # To refund a split-funded transaction, include split instructions in the request body. Omit the body for a
761
+ # standard refund.
762
+ # </Note>
763
+ #
727
764
  # @param request_options [Hash]
728
- # @param params [Hash]
765
+ # @param params [Payabli::Types::RefundV2Request]
729
766
  # @option request_options [String] :base_url
730
767
  # @option request_options [Hash{String => Object}] :additional_headers
731
768
  # @option request_options [Hash{String => Object}] :additional_query_parameters
@@ -740,6 +777,7 @@ module Payabli
740
777
  base_url: request_options[:base_url],
741
778
  method: "POST",
742
779
  path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}",
780
+ body: Payabli::Types::RefundV2Request.new(params).to_h,
743
781
  request_options: request_options
744
782
  )
745
783
  begin
@@ -756,14 +794,19 @@ module Payabli
756
794
  end
757
795
  end
758
796
 
759
- # Refund a transaction that has settled and send money back to the account holder. If `amount` is omitted or set
760
- # to 0, performs a full refund. When a non-zero `amount` is provided, this endpoint performs a partial refund.
797
+ # Refund a transaction that has settled and send money back to the account holder. If `amount` is set to 0,
798
+ # performs a full refund. When a non-zero `amount` is provided, this endpoint performs a partial refund.
761
799
  #
762
800
  # This is the v2 version of the refund endpoint, and returns the unified response format. See [Pay In unified
763
801
  # response codes reference](/guides/pay-in-unified-response-codes-reference) for more information.
764
802
  #
803
+ # <Note>
804
+ # To refund a split-funded transaction, include split instructions in the request body. Omit the body for a
805
+ # standard refund.
806
+ # </Note>
807
+ #
765
808
  # @param request_options [Hash]
766
- # @param params [Hash]
809
+ # @param params [Payabli::Types::RefundV2Request]
767
810
  # @option request_options [String] :base_url
768
811
  # @option request_options [Hash{String => Object}] :additional_headers
769
812
  # @option request_options [Hash{String => Object}] :additional_query_parameters
@@ -779,6 +822,7 @@ module Payabli
779
822
  base_url: request_options[:base_url],
780
823
  method: "POST",
781
824
  path: "v2/MoneyIn/refund/#{URI.encode_uri_component(params[:trans_id].to_s)}/#{URI.encode_uri_component(params[:amount].to_s)}",
825
+ body: Payabli::Types::RefundV2Request.new(params).to_h,
782
826
  request_options: request_options
783
827
  )
784
828
  begin
@@ -21,6 +21,10 @@ module Payabli
21
21
  # [`payout_transaction_approvedcaptured`](/developers/webhooks/payout-transaction-approved-captured) webhook
22
22
  # event.
23
23
  #
24
+ # If a velocity fraud alert is triggered, the endpoint returns a `202` response with `responseCode` `9051`, and
25
+ # the authorization is held for risk review rather than rejected. If a risk policy blocks the transaction, the
26
+ # endpoint returns a `422` response with `responseCode` `9005`, a terminal rejection.
27
+ #
24
28
  # @param request_options [Hash]
25
29
  # @param params [Payabli::MoneyOut::Types::RequestOutAuthorize]
26
30
  # @option request_options [String] :base_url
@@ -214,7 +218,11 @@ module Payabli
214
218
  end
215
219
 
216
220
  # Captures a single authorized payout transaction by ID. If the transaction was authorized with `autoCapture` set
217
- # to `true`, you don't need to call this endpoint to capture the transaction for processing.
221
+ # to `true`, you don't need to call this endpoint to capture the transaction for processing.
222
+ #
223
+ # If a velocity fraud alert is triggered, the endpoint returns a `202` response with `responseCode` `9051`, and
224
+ # the capture is held for risk review rather than rejected. If a risk policy blocks the transaction, the endpoint
225
+ # returns a `422` response with `responseCode` `9005`, a terminal rejection.
218
226
  #
219
227
  # @param request_options [Hash]
220
228
  # @param params [Hash]
@@ -321,6 +329,53 @@ module Payabli
321
329
  end
322
330
  end
323
331
 
332
+ # Renews an expired or expiring virtual card by extending its expiration date to a future month.
333
+ #
334
+ # The card must be a virtual card that hasn't been fully used. The new expiration date must be in `MM-YYYY` or
335
+ # `MM/YYYY` format and no more than 2 years and 363 days in the future. The card expires on the last day of the
336
+ # month you specify.
337
+ #
338
+ # On success, `referenceId` holds the renewed card's token (the card processor may issue a new token). The
339
+ # response reuses the standard payout result object, so the payment-transaction fields it carries don't apply to
340
+ # renewal and always return `null`.
341
+ #
342
+ # @param request_options [Hash]
343
+ # @param params [Payabli::MoneyOut::Types::RenewVCardRequest]
344
+ # @option request_options [String] :base_url
345
+ # @option request_options [Hash{String => Object}] :additional_headers
346
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
347
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
348
+ # @option request_options [Integer] :timeout_in_seconds
349
+ # @option params [String] :card_token
350
+ #
351
+ # @return [Payabli::Types::RenewVCardResponse]
352
+ def renew_v_card(request_options: {}, **params)
353
+ params = Payabli::Internal::Types::Utils.normalize_keys(params)
354
+ request_data = Payabli::MoneyOut::Types::RenewVCardRequest.new(params).to_h
355
+ non_body_param_names = %w[cardToken]
356
+ body = request_data.except(*non_body_param_names)
357
+
358
+ request = Payabli::Internal::JSON::Request.new(
359
+ base_url: request_options[:base_url],
360
+ method: "PUT",
361
+ path: "MoneyOutCard/vcard/#{URI.encode_uri_component(params[:card_token].to_s)}/renew",
362
+ body: body,
363
+ request_options: request_options
364
+ )
365
+ begin
366
+ response = @client.send(request)
367
+ rescue Net::HTTPRequestTimeout
368
+ raise Payabli::Errors::TimeoutError
369
+ end
370
+ code = response.code.to_i
371
+ if code.between?(200, 299)
372
+ Payabli::Types::RenewVCardResponse.load(response.body)
373
+ else
374
+ error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
375
+ raise error_class.new(response.body, code: code)
376
+ end
377
+ end
378
+
324
379
  # Sends a virtual card link via email to the vendor associated with the `transId`.
325
380
  #
326
381
  # @param request_options [Hash]
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOut
5
+ module Types
6
+ class RenewVCardRequest < Internal::Types::Model
7
+ field :card_token, -> { String }, optional: false, nullable: false, api_name: "cardToken"
8
+
9
+ field :expiration_date, -> { String }, optional: false, nullable: false, api_name: "expirationDate"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -12,6 +12,13 @@ module Payabli
12
12
 
13
13
  # Generates a payment link for an invoice from the invoice ID.
14
14
  #
15
+ # The payment page configuration blocks (`logo`, `page`, `paymentMethods`, `review`, `messageBeforePaying`,
16
+ # `paymentButton`, `notes`, `contactUs`, and `settings`) are optional. When you omit a block, Payabli applies a
17
+ # default rather than hiding it. The block is enabled at a fixed display order, so the generated page stays
18
+ # complete and branded. To hide a section, send the block explicitly with `enabled` set to `false`. An explicit
19
+ # value is always honored and is never replaced by a default. For each block's default, see its description in the
20
+ # request body.
21
+ #
15
22
  # @param request_options [Hash]
16
23
  # @param params [Payabli::PaymentLink::Types::PayLinkDataInvoice]
17
24
  # @option request_options [String] :base_url
@@ -14,7 +14,7 @@ module Payabli
14
14
 
15
15
  field :contact_us, -> { Payabli::Types::ContactElement }, optional: true, nullable: false, api_name: "contactUs"
16
16
 
17
- field :invoices, -> { Payabli::Types::InvoiceElement }, optional: true, nullable: false
17
+ field :invoices, -> { Payabli::Types::InvoiceElement }, optional: false, nullable: false
18
18
 
19
19
  field :logo, -> { Payabli::Types::Element }, optional: true, nullable: false
20
20
 
@@ -17,6 +17,8 @@ module Payabli
17
17
 
18
18
  field :customer_id, -> { Integer }, optional: false, nullable: false, api_name: "customerId"
19
19
 
20
+ field :vendor_id, -> { Integer }, optional: false, nullable: false, api_name: "vendorId"
21
+
20
22
  field :method_reference_id, -> { String }, optional: false, nullable: true, api_name: "methodReferenceId"
21
23
  end
22
24
  end
@@ -9,6 +9,10 @@ module Payabli
9
9
  # - `{ method: "ach", achHolder: "...", achRouting: "...", achAccount: "...", achAccountType: "..." }` - ACH payment
10
10
  # method with bank details
11
11
  # - `{ method: "ach", storedMethodId: "..." }` - ACH payment method using stored method ID
12
+ # - `{ method: "wire", achHolder: "...", achRouting: "...", achAccount: "...", achAccountType: "..." }` - Wire
13
+ # transfer payment method (US only, irrevocable)
14
+ # - `{ method: "rtp", achHolder: "...", achRouting: "...", achAccount: "...", achAccountType: "..." }` - Real-Time
15
+ # Payments method (US only, irrevocable)
12
16
  class AuthorizePaymentMethod < Internal::Types::Model
13
17
  field :method_, -> { String }, optional: false, nullable: false, api_name: "method"
14
18
 
@@ -59,7 +59,7 @@ module Payabli
59
59
 
60
60
  field :entry_name, -> { String }, optional: true, nullable: false, api_name: "EntryName"
61
61
 
62
- field :batch_id, -> { String }, optional: true, nullable: false, api_name: "BatchId"
62
+ field :batch_id, -> { Integer }, optional: true, nullable: false, api_name: "BatchId"
63
63
 
64
64
  field :has_vcard_transactions, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "HasVcardTransactions"
65
65
 
@@ -67,7 +67,9 @@ module Payabli
67
67
 
68
68
  field :schedule_id, -> { Integer }, optional: true, nullable: false, api_name: "ScheduleId"
69
69
 
70
- field :settlement_status, -> { Integer }, optional: true, nullable: false, api_name: "SettlementStatus"
70
+ field :settlement_status, -> { String }, optional: true, nullable: false, api_name: "SettlementStatus"
71
+
72
+ field :settlement_status_name, -> { String }, optional: true, nullable: false, api_name: "SettlementStatusName"
71
73
 
72
74
  field :risk_flagged, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "RiskFlagged"
73
75
 
@@ -80,6 +82,8 @@ module Payabli
80
82
  field :risk_action, -> { String }, optional: true, nullable: false, api_name: "RiskAction"
81
83
 
82
84
  field :risk_action_code, -> { Integer }, optional: true, nullable: false, api_name: "RiskActionCode"
85
+
86
+ field :entity_id, -> { String }, optional: true, nullable: false, api_name: "EntityId"
83
87
  end
84
88
  end
85
89
  end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ # Response data for canceling a single payout transaction. Mirrors the general response data, with `VendorId` added
6
+ # alongside `CustomerId`.
7
+ class CancelPayoutResponseData < Internal::Types::Model
8
+ field :auth_code, -> { String }, optional: true, nullable: false, api_name: "AuthCode"
9
+
10
+ field :avs_response_text, -> { String }, optional: true, nullable: false, api_name: "avsResponseText"
11
+
12
+ field :customer_id, -> { Integer }, optional: true, nullable: false, api_name: "CustomerId"
13
+
14
+ field :vendor_id, -> { Integer }, optional: true, nullable: false, api_name: "VendorId"
15
+
16
+ field :cvv_response_text, -> { String }, optional: true, nullable: false, api_name: "cvvResponseText"
17
+
18
+ field :method_reference_id, -> { String }, optional: true, nullable: false, api_name: "methodReferenceId"
19
+
20
+ field :reference_id, -> { String }, optional: true, nullable: false, api_name: "ReferenceId"
21
+
22
+ field :result_code, -> { Integer }, optional: true, nullable: false, api_name: "ResultCode"
23
+
24
+ field :result_text, -> { String }, optional: true, nullable: false, api_name: "ResultText"
25
+ end
26
+ end
27
+ end
@@ -5,6 +5,8 @@ module Payabli
5
5
  class CaptureAllOutResponseResponseDataItem < Internal::Types::Model
6
6
  field :customer_id, -> { Integer }, optional: true, nullable: false, api_name: "CustomerId"
7
7
 
8
+ field :vendor_id, -> { Integer }, optional: true, nullable: false, api_name: "VendorId"
9
+
8
10
  field :reference_id, -> { String }, optional: true, nullable: false, api_name: "ReferenceId"
9
11
 
10
12
  field :result_code, -> { Integer }, optional: true, nullable: false, api_name: "ResultCode"
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ # Response for a deposit funds request.
6
+ class DepositFundsResponse < Internal::Types::Model
7
+ field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
8
+
9
+ field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
10
+
11
+ field :response_data, -> { Internal::Types::Hash[String, Object] }, optional: false, nullable: true, api_name: "responseData"
12
+
13
+ field :page_identifier, -> { String }, optional: false, nullable: true, api_name: "pageIdentifier"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ module EntityIdString
6
+ # EntityIdString is an alias for String
7
+
8
+ # @option str [String]
9
+ #
10
+ # @return [untyped]
11
+ def self.load(str)
12
+ ::JSON.parse(str)
13
+ end
14
+
15
+ # @option value [untyped]
16
+ #
17
+ # @return [String]
18
+ def self.dump(value)
19
+ ::JSON.generate(value)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -13,7 +13,11 @@ module Payabli
13
13
 
14
14
  field :order, -> { Integer }, optional: true, nullable: false
15
15
 
16
+ field :payment_description, -> { String }, optional: true, nullable: false, api_name: "paymentDescription"
17
+
16
18
  field :settings, -> { Payabli::Types::MethodElementSettings }, optional: true, nullable: false
19
+
20
+ field :show_save_method, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "showSaveMethod"
17
21
  end
18
22
  end
19
23
  end
@@ -16,6 +16,12 @@ module Payabli
16
16
  field :mastercard, -> { Internal::Types::Boolean }, optional: true, nullable: false
17
17
 
18
18
  field :visa, -> { Internal::Types::Boolean }, optional: true, nullable: false
19
+
20
+ field :diners, -> { Internal::Types::Boolean }, optional: true, nullable: false
21
+
22
+ field :jcb, -> { Internal::Types::Boolean }, optional: true, nullable: false
23
+
24
+ field :rdc, -> { Internal::Types::Boolean }, optional: true, nullable: false
19
25
  end
20
26
  end
21
27
  end
@@ -12,7 +12,7 @@ module Payabli
12
12
 
13
13
  field :response_code, -> { Integer }, optional: true, nullable: false, api_name: "responseCode"
14
14
 
15
- field :response_data, -> { Payabli::Types::PayabliApiResponse0ResponseData }, optional: true, nullable: false, api_name: "responseData"
15
+ field :response_data, -> { Payabli::Types::CancelPayoutResponseData }, optional: true, nullable: false, api_name: "responseData"
16
16
  end
17
17
  end
18
18
  end
@@ -61,6 +61,8 @@ module Payabli
61
61
 
62
62
  field :source, -> { String }, optional: true, nullable: false, api_name: "Source"
63
63
 
64
+ field :split_funding_instructions, -> { Internal::Types::Array[Payabli::Types::SettlementSplitFundingDetail] }, optional: true, nullable: false, api_name: "splitFundingInstructions"
65
+
64
66
  field :status, -> { Integer }, optional: true, nullable: false, api_name: "Status"
65
67
 
66
68
  field :transaction_events, -> { Internal::Types::Array[Payabli::Types::QueryTransactionEvents] }, optional: true, nullable: false, api_name: "TransactionEvents"