payabli 2.2.17 → 2.2.19

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: 6cb419ebbfe2565c5142a0453bd6683ab7e042677cb5255656bf7f0683345ccd
4
- data.tar.gz: 9ba7ef36505e7c9efc0e248411a536c77296fb92ed07bd9d2af24cb93a09c9e4
3
+ metadata.gz: 2aac686457e48330b8be3e29543aceb38c8cf912a3eb082d3091bb2c4a3e086a
4
+ data.tar.gz: 313e192ddae9d4431f1d3e89998730eecc6038e8ccc28dcd969fc3f905c51f3f
5
5
  SHA512:
6
- metadata.gz: 9e1fcd2655bd59d2a9771190b05a21299a63d0f3461506b946f4c7cdeb026e884108201288e03af0302a02333a06c749872b2cf308d989e7f425aa5b3c8f0731
7
- data.tar.gz: 1acaf8d46b1552d9bddabff143eed41b7149db613a4a8e01a66c67d39de24051fabbbba48e8e7033decfcd8ccb5f198b5d8c914d08f3a8a42e92c9cdbcf04be9
6
+ metadata.gz: c52e928af87648c3f85c372ffdf1e769079f0dc363f736b295c5a7988aac72b140ddf1a9d908d7082f23439c1aecae0f233491bfe489e473ea6efa5e4331a8a8
7
+ data.tar.gz: d734422f3278fd59ef7e6cbc8550426f44e4dc564f3f7286dc76c96e987a8cce1eff8c5279e94e3881214c1a7c9d794ac8032661108b373af6469443dc3ebcd2
data/.fern/metadata.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "cliVersion": "3.79.2",
3
3
  "generatorName": "fernapi/fern-ruby-sdk",
4
- "generatorVersion": "1.0.0-rc86",
4
+ "generatorVersion": "1.1.0",
5
5
  "generatorConfig": {
6
6
  "enableWireTests": true
7
7
  },
8
- "sdkVersion": "2.2.17"
8
+ "sdkVersion": "2.2.19"
9
9
  }
data/README.md CHANGED
@@ -209,4 +209,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
209
209
  a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
210
210
  an issue first to discuss with us!
211
211
 
212
- On the other hand, contributions to the README are always very welcome!
212
+ On the other hand, contributions to the README are always very welcome!
@@ -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.17",
13
+ "User-Agent" => "payabli/2.2.19",
14
14
  "X-Fern-Language" => "Ruby",
15
15
  requestToken: api_key.to_s
16
16
  }
@@ -21,7 +21,7 @@ module Payabli
21
21
  self
22
22
  end
23
23
 
24
- def member?(type)
24
+ def type_member?(type)
25
25
  members.any? { |_key, type_fn| type == type_fn.call }
26
26
  end
27
27
 
@@ -26,7 +26,7 @@ module Payabli
26
26
  field :shipping_country, -> { String }, optional: false, nullable: false, api_name: "shippingCountry"
27
27
  field :customer_id, -> { Integer }, optional: false, nullable: false, api_name: "customerId"
28
28
  field :customer_status, -> { Integer }, optional: false, nullable: false, api_name: "customerStatus"
29
- field :additional_data, -> { String }, optional: false, nullable: true, api_name: "additionalData"
29
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "additionalData"
30
30
  end
31
31
  end
32
32
  end
@@ -36,7 +36,7 @@ module Payabli
36
36
  field :summary_commodity_code, -> { String }, optional: false, nullable: true, api_name: "summaryCommodityCode"
37
37
  field :items, -> { Internal::Types::Array[Payabli::Types::BillItem] }, optional: false, nullable: true
38
38
  field :attachments, -> { Internal::Types::Array[Payabli::Types::FileContent] }, optional: false, nullable: true
39
- field :additional_data, -> { String }, optional: false, nullable: true, api_name: "additionalData"
39
+ field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "additionalData"
40
40
  end
41
41
  end
42
42
  end
@@ -427,6 +427,59 @@ module Payabli
427
427
  raise error_class.new(response.body, code: code)
428
428
  end
429
429
  end
430
+
431
+ # Reissues a payout transaction with a new payment method. This creates a new transaction linked to the original
432
+ # and marks the original transaction as reissued.
433
+ #
434
+ # The original transaction must be in **Processing** or **Processed** status. The payment method in the request
435
+ # body is used directly. The endpoint doesn't fall back to vendor-managed payment methods.
436
+ #
437
+ # The new transaction goes through the standard authorize-and-capture flow automatically. Both the original and
438
+ # new transactions are linked through their event histories for audit purposes.
439
+ #
440
+ # @param request_options [Hash]
441
+ # @param params [Payabli::MoneyOutTypes::Types::ReissuePayoutBody]
442
+ # @option request_options [String] :base_url
443
+ # @option request_options [Hash{String => Object}] :additional_headers
444
+ # @option request_options [Hash{String => Object}] :additional_query_parameters
445
+ # @option request_options [Hash{String => Object}] :additional_body_parameters
446
+ # @option request_options [Integer] :timeout_in_seconds
447
+ # @option params [String] :trans_id
448
+ # @option params [String, nil] :idempotency_key
449
+ #
450
+ # @return [Payabli::MoneyOutTypes::Types::ReissuePayoutResponse]
451
+ def reissue_out(request_options: {}, **params)
452
+ params = Payabli::Internal::Types::Utils.normalize_keys(params)
453
+ query_param_names = %i[trans_id]
454
+ query_params = {}
455
+ query_params["transId"] = params[:trans_id] if params.key?(:trans_id)
456
+ params = params.except(*query_param_names)
457
+
458
+ headers = {}
459
+ headers["idempotencyKey"] = params[:idempotency_key] if params[:idempotency_key]
460
+
461
+ request = Payabli::Internal::JSON::Request.new(
462
+ base_url: request_options[:base_url],
463
+ method: "POST",
464
+ path: "MoneyOut/reissue",
465
+ headers: headers,
466
+ query: query_params,
467
+ body: Payabli::MoneyOutTypes::Types::ReissuePayoutBody.new(params).to_h,
468
+ request_options: request_options
469
+ )
470
+ begin
471
+ response = @client.send(request)
472
+ rescue Net::HTTPRequestTimeout
473
+ raise Payabli::Errors::TimeoutError
474
+ end
475
+ code = response.code.to_i
476
+ if code.between?(200, 299)
477
+ Payabli::MoneyOutTypes::Types::ReissuePayoutResponse.load(response.body)
478
+ else
479
+ error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
480
+ raise error_class.new(response.body, code: code)
481
+ end
482
+ end
430
483
  end
431
484
  end
432
485
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOut
5
+ module Types
6
+ class ReissueOutRequest < Internal::Types::Model
7
+ field :trans_id, -> { String }, optional: false, nullable: false, api_name: "transId"
8
+ field :idempotency_key, -> { String }, optional: true, nullable: false, api_name: "idempotencyKey"
9
+ field :body, -> { Payabli::MoneyOutTypes::Types::ReissuePayoutBody }, optional: false, nullable: false
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOutTypes
5
+ module Types
6
+ # Payment method for reissuing a payout transaction. The reissue endpoint uses the payment method details
7
+ # directly. It doesn't fall back to the vendor's managed payment method.
8
+ # - `{ method: "vcard" }` - Reissue as a virtual card
9
+ # - `{ method: "check" }` - Reissue as a paper check
10
+ # - `{ method: "ach", achHolder: "...", achRouting: "...", achAccount: "...", achAccountType: "...",
11
+ # achHolderType: "..." }` - Reissue as ACH with bank details
12
+ class ReissuePaymentMethod < Internal::Types::Model
13
+ field :method_, -> { String }, optional: false, nullable: false, api_name: "method"
14
+ field :ach_holder, -> { String }, optional: true, nullable: false, api_name: "achHolder"
15
+ field :ach_routing, -> { String }, optional: true, nullable: false, api_name: "achRouting"
16
+ field :ach_account, -> { String }, optional: true, nullable: false, api_name: "achAccount"
17
+ field :ach_account_type, -> { String }, optional: true, nullable: false, api_name: "achAccountType"
18
+ field :ach_holder_type, -> { Payabli::Types::AchHolderType }, optional: true, nullable: false, api_name: "achHolderType"
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOutTypes
5
+ module Types
6
+ # Request body for reissuing a payout transaction.
7
+ class ReissuePayoutBody < Internal::Types::Model
8
+ field :payment_method, -> { Payabli::MoneyOutTypes::Types::ReissuePaymentMethod }, optional: false, nullable: false, api_name: "paymentMethod"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOutTypes
5
+ module Types
6
+ class ReissuePayoutResponse < Internal::Types::Model
7
+ field :is_success, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isSuccess"
8
+ field :response_code, -> { Integer }, optional: false, nullable: false, api_name: "responseCode"
9
+ field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
10
+ field :response_data, -> { Payabli::MoneyOutTypes::Types::ReissuePayoutResponseData }, optional: false, nullable: false, api_name: "responseData"
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module MoneyOutTypes
5
+ module Types
6
+ class ReissuePayoutResponseData < Internal::Types::Model
7
+ field :transaction_id, -> { String }, optional: false, nullable: false, api_name: "transactionId"
8
+ field :status, -> { String }, optional: false, nullable: false
9
+ field :original_transaction_id, -> { String }, optional: true, nullable: false, api_name: "originalTransactionId"
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ module AbsorbDifference
6
+ # AbsorbDifference is an alias for Boolean
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
@@ -2,8 +2,8 @@
2
2
 
3
3
  module Payabli
4
4
  module Types
5
- module Accountid
6
- # Accountid is an alias for String
5
+ module AccountId
6
+ # AccountId is an alias for String
7
7
 
8
8
  # @option str [String]
9
9
  #
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ module AllowOverride
6
+ # AllowOverride is an alias for Boolean
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
@@ -4,7 +4,7 @@ module Payabli
4
4
  module Types
5
5
  class BillingDataResponse < Internal::Types::Model
6
6
  field :id, -> { Integer }, optional: false, nullable: false
7
- field :account_id, -> { Object }, optional: true, nullable: false, api_name: "accountId"
7
+ field :account_id, -> { String }, optional: true, nullable: false, api_name: "accountId"
8
8
  field :nickname, -> { String }, optional: false, nullable: false
9
9
  field :bank_name, -> { String }, optional: false, nullable: false, api_name: "bankName"
10
10
  field :routing_account, -> { String }, optional: false, nullable: false, api_name: "routingAccount"
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ module GreaterValueAllowed
6
+ # GreaterValueAllowed is an alias for Boolean
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,6 +13,9 @@ module Payabli
13
13
  field :mode, -> { Integer }, optional: true, nullable: false
14
14
  field :reference_id, -> { Integer }, optional: true, nullable: false, api_name: "referenceId"
15
15
  field :service, -> { String }, optional: true, nullable: false
16
+ field :greater_value_allowed, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "greaterValueAllowed"
17
+ field :absorb_difference, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "absorbDifference"
18
+ field :allow_override, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "allowOverride"
16
19
  end
17
20
  end
18
21
  end
@@ -15,6 +15,9 @@ module Payabli
15
15
  field :reference_id, -> { Integer }, optional: true, nullable: false, api_name: "ReferenceId"
16
16
  field :accept_same_day_ach, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "acceptSameDayACH"
17
17
  field :currency, -> { String }, optional: true, nullable: false, api_name: "Currency"
18
+ field :greater_value_allowed, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "GreaterValueAllowed"
19
+ field :absorb_difference, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "AbsorbDifference"
20
+ field :allow_override, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "AllowOverride"
18
21
  end
19
22
  end
20
23
  end
@@ -25,6 +25,7 @@ module Payabli
25
25
  field :time_zone, -> { Integer }, optional: true, nullable: false, api_name: "timeZone"
26
26
  field :website_address, -> { String }, optional: true, nullable: false, api_name: "websiteAddress"
27
27
  field :zip, -> { String }, optional: true, nullable: false
28
+ field :statement_email, -> { Payabli::Types::StatementEmailConfig }, optional: true, nullable: false, api_name: "statementEmail"
28
29
  end
29
30
  end
30
31
  end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Payabli
4
+ module Types
5
+ # Configuration for statement email recipients and the sender address.
6
+ class StatementEmailConfig < Internal::Types::Model
7
+ field :sender, -> { String }, optional: true, nullable: false
8
+ field :recipients, -> { Internal::Types::Array[String] }, optional: true, nullable: false
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Payabli
4
- VERSION = "2.2.17"
4
+ VERSION = "2.2.19"
5
5
  end
data/lib/payabli.rb CHANGED
@@ -40,7 +40,7 @@ require_relative "payabli/types/ach_validation"
40
40
  require_relative "payabli/types/accept_oauth"
41
41
  require_relative "payabli/types/accept_register"
42
42
  require_relative "payabli/types/accountexp"
43
- require_relative "payabli/types/accountid"
43
+ require_relative "payabli/types/account_id"
44
44
  require_relative "payabli/types/accounting_field"
45
45
  require_relative "payabli/types/account_number"
46
46
  require_relative "payabli/types/accounttype"
@@ -489,6 +489,9 @@ require_relative "payabli/types/language"
489
489
  require_relative "payabli/types/line_item"
490
490
  require_relative "payabli/types/line_item_query_record"
491
491
  require_relative "payabli/types/max_ticket"
492
+ require_relative "payabli/types/greater_value_allowed"
493
+ require_relative "payabli/types/absorb_difference"
494
+ require_relative "payabli/types/allow_override"
492
495
  require_relative "payabli/types/methodall"
493
496
  require_relative "payabli/types/method_element_settings_apple_pay_button_style"
494
497
  require_relative "payabli/types/method_element_settings_apple_pay_button_type"
@@ -600,6 +603,7 @@ require_relative "payabli/types/payment_method_domain_general_response"
600
603
  require_relative "payabli/types/payor_data_request"
601
604
  require_relative "payabli/types/payor_data_response"
602
605
  require_relative "payabli/types/payout_gateway_connector"
606
+ require_relative "payabli/types/statement_email_config"
603
607
  require_relative "payabli/types/payabli_credentials_pascal"
604
608
  require_relative "payabli/types/paypointstatus"
605
609
  require_relative "payabli/types/paypoint_summary"
@@ -703,6 +707,10 @@ require_relative "payabli/money_out_types/types/v_card_get_response_associated_v
703
707
  require_relative "payabli/money_out_types/types/v_card_get_response_associated_vendor_summary"
704
708
  require_relative "payabli/money_out_types/types/v_card_get_response_associated_vendor"
705
709
  require_relative "payabli/money_out_types/types/v_card_get_response"
710
+ require_relative "payabli/money_out_types/types/reissue_payment_method"
711
+ require_relative "payabli/money_out_types/types/reissue_payout_body"
712
+ require_relative "payabli/money_out_types/types/reissue_payout_response_data"
713
+ require_relative "payabli/money_out_types/types/reissue_payout_response"
706
714
  require_relative "payabli/money_out_types/types/operation_result"
707
715
  require_relative "payabli/money_out_types/types/methods_list_out"
708
716
  require_relative "payabli/money_out_types/types/method_element_out"
@@ -959,6 +967,7 @@ require_relative "payabli/money_out/types/money_out_types_request_out_authorize"
959
967
  require_relative "payabli/money_out/types/capture_all_out_request"
960
968
  require_relative "payabli/money_out/types/capture_out_request"
961
969
  require_relative "payabli/money_out/types/send_v_card_link_request"
970
+ require_relative "payabli/money_out/types/reissue_out_request"
962
971
  require_relative "payabli/notification/client"
963
972
  require_relative "payabli/notificationlogs/client"
964
973
  require_relative "payabli/notificationlogs/types/search_notification_logs_request"
data/reference.md CHANGED
@@ -12469,6 +12469,98 @@ client.money_out.update_check_payment_status(
12469
12469
  </dl>
12470
12470
 
12471
12471
 
12472
+ </dd>
12473
+ </dl>
12474
+ </details>
12475
+
12476
+ <details><summary><code>client.money_out.<a href="/lib/payabli/money_out/client.rb">reissue_out</a>(request) -> Payabli::MoneyOutTypes::Types::ReissuePayoutResponse</code></summary>
12477
+ <dl>
12478
+ <dd>
12479
+
12480
+ #### 📝 Description
12481
+
12482
+ <dl>
12483
+ <dd>
12484
+
12485
+ <dl>
12486
+ <dd>
12487
+
12488
+ Reissues a payout transaction with a new payment method. This creates a new transaction linked to the original and marks the original transaction as reissued.
12489
+
12490
+ The original transaction must be in **Processing** or **Processed** status. The payment method in the request body is used directly. The endpoint doesn't fall back to vendor-managed payment methods.
12491
+
12492
+ The new transaction goes through the standard authorize-and-capture flow automatically. Both the original and new transactions are linked through their event histories for audit purposes.
12493
+ </dd>
12494
+ </dl>
12495
+ </dd>
12496
+ </dl>
12497
+
12498
+ #### 🔌 Usage
12499
+
12500
+ <dl>
12501
+ <dd>
12502
+
12503
+ <dl>
12504
+ <dd>
12505
+
12506
+ ```ruby
12507
+ client.money_out.reissue_out(
12508
+ trans_id: "129-219",
12509
+ payment_method: {
12510
+ method_: "ach",
12511
+ ach_account: "9876543210",
12512
+ ach_account_type: "savings",
12513
+ ach_routing: "021000021",
12514
+ ach_holder: "Acme Corp",
12515
+ ach_holder_type: "business"
12516
+ }
12517
+ )
12518
+ ```
12519
+ </dd>
12520
+ </dl>
12521
+ </dd>
12522
+ </dl>
12523
+
12524
+ #### ⚙️ Parameters
12525
+
12526
+ <dl>
12527
+ <dd>
12528
+
12529
+ <dl>
12530
+ <dd>
12531
+
12532
+ **trans_id:** `String` — The transaction ID of the payout to reissue.
12533
+
12534
+ </dd>
12535
+ </dl>
12536
+
12537
+ <dl>
12538
+ <dd>
12539
+
12540
+ **idempotency_key:** `String`
12541
+
12542
+ </dd>
12543
+ </dl>
12544
+
12545
+ <dl>
12546
+ <dd>
12547
+
12548
+ **request:** `Payabli::MoneyOutTypes::Types::ReissuePayoutBody`
12549
+
12550
+ </dd>
12551
+ </dl>
12552
+
12553
+ <dl>
12554
+ <dd>
12555
+
12556
+ **request_options:** `Payabli::MoneyOut::RequestOptions`
12557
+
12558
+ </dd>
12559
+ </dl>
12560
+ </dd>
12561
+ </dl>
12562
+
12563
+
12472
12564
  </dd>
12473
12565
  </dl>
12474
12566
  </details>
@@ -25118,3 +25210,4 @@ client.wallet.configure_google_pay_paypoint(
25118
25210
  </dd>
25119
25211
  </dl>
25120
25212
  </details>
25213
+
@@ -2,7 +2,7 @@ services:
2
2
  wiremock:
3
3
  image: wiremock/wiremock:3.9.1
4
4
  ports:
5
- - "8080:8080"
5
+ - "0:8080" # Use dynamic port to avoid conflicts with concurrent tests
6
6
  volumes:
7
7
  - ./wiremock-mappings.json:/home/wiremock/mappings/wiremock-mappings.json
8
8
  command: ["--global-response-templating", "--verbose"]