payabli 2.2.22 → 2.2.24
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 +5 -4
- data/.fernignore +1 -2
- data/.rubocop.yml +1 -1
- data/CONTRIBUTING.md +33 -0
- data/lib/payabli/client.rb +1 -1
- data/lib/payabli/internal/http/base_request.rb +14 -0
- data/lib/payabli/internal/http/raw_client.rb +21 -3
- data/lib/payabli/internal/json/request.rb +6 -4
- data/lib/payabli/internal/multipart/multipart_request.rb +6 -4
- data/lib/payabli/internal/types/boolean.rb +1 -1
- data/lib/payabli/internal/types/utils.rb +2 -2
- data/lib/payabli/money_out/client.rb +5 -3
- data/lib/payabli/money_out_types/types/authorize_payout_body.rb +1 -0
- data/lib/payabli/types/auto_capture.rb +23 -0
- data/lib/payabli/types/notification_content_event_type.rb +0 -1
- data/lib/payabli/types/notification_standard_request_content_event_type.rb +0 -1
- data/lib/payabli/types/vendor_data.rb +2 -0
- data/lib/payabli/types/vendor_query_record.rb +7 -0
- data/lib/payabli/vendor/client.rb +39 -1
- data/lib/payabli/vendor/types/vendor_enrich_request.rb +18 -0
- data/lib/payabli/vendor/types/vendor_enrich_response.rb +17 -0
- data/lib/payabli/vendor/types/vendor_enrich_response_data.rb +16 -0
- data/lib/payabli/vendor/types/vendor_enrichment_data.rb +13 -0
- data/lib/payabli/vendor/types/vendor_enrichment_invoice_scan.rb +26 -0
- data/lib/payabli/vendor/types/vendor_enrichment_web_search.rb +26 -0
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +7 -0
- data/reference.md +86 -4
- data/wiremock/wiremock-mappings.json +8454 -1
- metadata +16 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de062fa0901b2dfa78fb15fbf0a644540e0c3ff94f3ba4f2b29c076bc255562e
|
|
4
|
+
data.tar.gz: b41515b72b1d6402350e1e0869c9913f00a99cafdfcaa6e6f55bebf98c2a9655
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a29ece4d976460972d75af028a43f39939d1ab1875f973e141ba57119f5ee852d90eeff2cae037480160057468dd7568346c4e739202abcfadb0943783fe59fc
|
|
7
|
+
data.tar.gz: 0c706759c474ee2e00be694d37529f3dbd7591f6086c3889c8b034f4b916655bc8710d35e0a83be211e59493e8c0b126bbd168ed2fd4c3e9e3e3b667b7b3d756
|
data/.fern/metadata.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"cliVersion": "4.60.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
|
-
"generatorVersion": "1.1.
|
|
4
|
+
"generatorVersion": "1.1.13",
|
|
5
5
|
"generatorConfig": {
|
|
6
|
-
"enableWireTests": true
|
|
6
|
+
"enableWireTests": true,
|
|
7
|
+
"rubocopVariableNumberStyle": "snake_case"
|
|
7
8
|
},
|
|
8
|
-
"originGitCommit": "
|
|
9
|
-
"sdkVersion": "2.2.
|
|
9
|
+
"originGitCommit": "40d54862289655c4197b92ae1ef9bbfce21b4b1c",
|
|
10
|
+
"sdkVersion": "2.2.24"
|
|
10
11
|
}
|
data/.fernignore
CHANGED
data/.rubocop.yml
CHANGED
data/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to the Payabli SDKs!
|
|
4
|
+
We welcome contributions from the community and appreciate your help in improving our SDKs.
|
|
5
|
+
|
|
6
|
+
## Feature requests
|
|
7
|
+
|
|
8
|
+
If you would like to request a new feature, please create a new GitHub issue on this repository.
|
|
9
|
+
See the [Issues](../../issues) page and click **New issue** to get started.
|
|
10
|
+
|
|
11
|
+
Please provide the following information in your feature request:
|
|
12
|
+
- A clear description of the feature
|
|
13
|
+
- The use case for the feature
|
|
14
|
+
- Code examples that demonstrate how the feature would be used (if applicable)
|
|
15
|
+
|
|
16
|
+
## Bug reports
|
|
17
|
+
|
|
18
|
+
If you have found a bug in the SDK, please create a new GitHub issue on this repository.
|
|
19
|
+
See the [Issues](../../issues) page and click **New issue** to get started.
|
|
20
|
+
|
|
21
|
+
Please provide the following information in your bug report:
|
|
22
|
+
- A clear description of the bug
|
|
23
|
+
- Steps to reproduce the bug
|
|
24
|
+
- Expected behavior
|
|
25
|
+
- Actual behavior
|
|
26
|
+
- Code examples that demonstrate the bug (if applicable)
|
|
27
|
+
|
|
28
|
+
## Pull requests
|
|
29
|
+
|
|
30
|
+
Pull requests are welcome; however, Payabli implements all code changes.
|
|
31
|
+
We'll review your pull request and close it.
|
|
32
|
+
If we have any questions about your pull request, we'll ask you in the comments of the pull request.
|
|
33
|
+
|
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.24",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
requestToken: api_key.to_s
|
|
16
16
|
}
|
|
@@ -31,6 +31,20 @@ module Payabli
|
|
|
31
31
|
# Child classes should implement:
|
|
32
32
|
# - encode_headers: Returns the encoded HTTP request headers.
|
|
33
33
|
# - encode_body: Returns the encoded HTTP request body.
|
|
34
|
+
|
|
35
|
+
private
|
|
36
|
+
|
|
37
|
+
# Merges additional_headers from request_options into sdk_headers, filtering out
|
|
38
|
+
# any keys that collide with SDK-set or client-protected headers (case-insensitive).
|
|
39
|
+
# @param sdk_headers [Hash] Headers set by the SDK for this request type.
|
|
40
|
+
# @param protected_keys [Array<String>] Additional header keys that must not be overridden.
|
|
41
|
+
# @return [Hash] The merged headers.
|
|
42
|
+
def merge_additional_headers(sdk_headers, protected_keys: [])
|
|
43
|
+
additional_headers = @request_options&.dig(:additional_headers) || @request_options&.dig("additional_headers") || {}
|
|
44
|
+
all_protected = (sdk_headers.keys + protected_keys).to_set { |k| k.to_s.downcase }
|
|
45
|
+
filtered = additional_headers.reject { |key, _| all_protected.include?(key.to_s.downcase) }
|
|
46
|
+
sdk_headers.merge(filtered)
|
|
47
|
+
end
|
|
34
48
|
end
|
|
35
49
|
end
|
|
36
50
|
end
|
|
@@ -43,7 +43,7 @@ module Payabli
|
|
|
43
43
|
http_request = build_http_request(
|
|
44
44
|
url:,
|
|
45
45
|
method: request.method,
|
|
46
|
-
headers: request.encode_headers,
|
|
46
|
+
headers: request.encode_headers(protected_keys: @default_headers.keys),
|
|
47
47
|
body: request.encode_body
|
|
48
48
|
)
|
|
49
49
|
|
|
@@ -120,6 +120,8 @@ module Payabli
|
|
|
120
120
|
[delay + jitter, 0].max
|
|
121
121
|
end
|
|
122
122
|
|
|
123
|
+
LOCALHOST_HOSTS = %w[localhost 127.0.0.1 [::1]].freeze
|
|
124
|
+
|
|
123
125
|
# @param request [Payabli::Internal::Http::BaseRequest] The HTTP request.
|
|
124
126
|
# @return [URI::Generic] The URL.
|
|
125
127
|
def build_url(request)
|
|
@@ -129,14 +131,29 @@ module Payabli
|
|
|
129
131
|
if request.path.start_with?("http://", "https://")
|
|
130
132
|
url = request.path
|
|
131
133
|
url = "#{url}?#{encode_query(encoded_query)}" if encoded_query&.any?
|
|
132
|
-
|
|
134
|
+
parsed = URI.parse(url)
|
|
135
|
+
validate_https!(parsed)
|
|
136
|
+
return parsed
|
|
133
137
|
end
|
|
134
138
|
|
|
135
139
|
path = request.path.start_with?("/") ? request.path[1..] : request.path
|
|
136
140
|
base = request.base_url || @base_url
|
|
137
141
|
url = "#{base.chomp("/")}/#{path}"
|
|
138
142
|
url = "#{url}?#{encode_query(encoded_query)}" if encoded_query&.any?
|
|
139
|
-
URI.parse(url)
|
|
143
|
+
parsed = URI.parse(url)
|
|
144
|
+
validate_https!(parsed)
|
|
145
|
+
parsed
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Raises if the URL uses http:// for a non-localhost host, which would
|
|
149
|
+
# send authentication credentials in plaintext.
|
|
150
|
+
# @param url [URI::Generic] The parsed URL.
|
|
151
|
+
def validate_https!(url)
|
|
152
|
+
return if url.scheme != "http"
|
|
153
|
+
return if LOCALHOST_HOSTS.include?(url.host)
|
|
154
|
+
|
|
155
|
+
raise ArgumentError, "Refusing to send request to non-HTTPS URL: #{url}. " \
|
|
156
|
+
"HTTP is only allowed for localhost. Use HTTPS or pass a localhost URL."
|
|
140
157
|
end
|
|
141
158
|
|
|
142
159
|
# @param url [URI::Generic] The url to the resource.
|
|
@@ -180,6 +197,7 @@ module Payabli
|
|
|
180
197
|
|
|
181
198
|
http = Net::HTTP.new(url.host, port)
|
|
182
199
|
http.use_ssl = is_https
|
|
200
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_PEER if is_https
|
|
183
201
|
# NOTE: We handle retries at the application level with HTTP status code awareness,
|
|
184
202
|
# so we set max_retries to 0 to disable Net::HTTP's built-in network-level retries.
|
|
185
203
|
http.max_retries = 0
|
|
@@ -21,12 +21,14 @@ module Payabli
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# @return [Hash] The encoded HTTP request headers.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
# @param protected_keys [Array<String>] Header keys set by the SDK client (e.g. auth, metadata)
|
|
25
|
+
# that must not be overridden by additional_headers from request_options.
|
|
26
|
+
def encode_headers(protected_keys: [])
|
|
27
|
+
sdk_headers = {
|
|
27
28
|
"Content-Type" => "application/json",
|
|
28
29
|
"Accept" => "application/json"
|
|
29
|
-
}.merge(@headers)
|
|
30
|
+
}.merge(@headers)
|
|
31
|
+
merge_additional_headers(sdk_headers, protected_keys:)
|
|
30
32
|
end
|
|
31
33
|
|
|
32
34
|
# @return [String, nil] The encoded HTTP request body.
|
|
@@ -21,11 +21,13 @@ module Payabli
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
# @return [Hash] The encoded HTTP request headers.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
# @param protected_keys [Array<String>] Header keys set by the SDK client (e.g. auth, metadata)
|
|
25
|
+
# that must not be overridden by additional_headers from request_options.
|
|
26
|
+
def encode_headers(protected_keys: [])
|
|
27
|
+
sdk_headers = {
|
|
27
28
|
"Content-Type" => @body.content_type
|
|
28
|
-
}.merge(@headers)
|
|
29
|
+
}.merge(@headers)
|
|
30
|
+
merge_additional_headers(sdk_headers, protected_keys:)
|
|
29
31
|
end
|
|
30
32
|
|
|
31
33
|
# @return [String, nil] The encoded HTTP request body.
|
|
@@ -81,10 +81,10 @@ module Payabli
|
|
|
81
81
|
}
|
|
82
82
|
return type.coerce(value, strict: strict)
|
|
83
83
|
else
|
|
84
|
-
value
|
|
84
|
+
value # rubocop:disable Lint/Void
|
|
85
85
|
end
|
|
86
86
|
else
|
|
87
|
-
value
|
|
87
|
+
value # rubocop:disable Lint/Void
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
raise Errors::TypeError, "cannot coerce value of type `#{value.class}` to `#{target}`" if strict
|
|
@@ -10,8 +10,9 @@ module Payabli
|
|
|
10
10
|
@client = client
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
# Authorizes transaction for payout.
|
|
14
|
-
# `referenceId` returned in the response to
|
|
13
|
+
# Authorizes transaction for payout. If you don't pass the `autoCapture` field with a value of `true`, authorized
|
|
14
|
+
# transactions aren't flagged for settlement until captured. Use `referenceId` returned in the response to
|
|
15
|
+
# capture the transaction.
|
|
15
16
|
#
|
|
16
17
|
# @param request_options [Hash]
|
|
17
18
|
# @param params [Payabli::MoneyOutTypes::Types::AuthorizePayoutBody]
|
|
@@ -203,7 +204,8 @@ module Payabli
|
|
|
203
204
|
end
|
|
204
205
|
end
|
|
205
206
|
|
|
206
|
-
# Captures a single authorized payout transaction by ID.
|
|
207
|
+
# Captures a single authorized payout transaction by ID. If the transaction was authorized with `autoCapture` set
|
|
208
|
+
# to `true`, you don't need to call this endpoint to capture the transaction for processing.
|
|
207
209
|
#
|
|
208
210
|
# @param request_options [Hash]
|
|
209
211
|
# @param params [Hash]
|
|
@@ -15,6 +15,7 @@ module Payabli
|
|
|
15
15
|
field :account_id, -> { String }, optional: true, nullable: false, api_name: "accountId"
|
|
16
16
|
field :subdomain, -> { String }, optional: true, nullable: false
|
|
17
17
|
field :subscription_id, -> { Integer }, optional: true, nullable: false, api_name: "subscriptionId"
|
|
18
|
+
field :auto_capture, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "autoCapture"
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
module AutoCapture
|
|
6
|
+
# AutoCapture 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
|
|
@@ -34,7 +34,6 @@ module Payabli
|
|
|
34
34
|
APPROVED_APPLICATION = "ApprovedApplication"
|
|
35
35
|
FAILED_BOARDING_APPLICATION = "FailedBoardingApplication"
|
|
36
36
|
SUBMITTED_APPLICATION = "SubmittedApplication"
|
|
37
|
-
UNDER_WRITING_APPLICATION = "UnderWritingApplication"
|
|
38
37
|
ACTIVATED_MERCHANT = "ActivatedMerchant"
|
|
39
38
|
RECEIVED_CHARGE_BACK = "ReceivedChargeBack"
|
|
40
39
|
CHARGEBACK_UPDATED = "ChargebackUpdated"
|
|
@@ -80,7 +80,6 @@ module Payabli
|
|
|
80
80
|
APPROVED_APPLICATION = "ApprovedApplication"
|
|
81
81
|
FAILED_BOARDING_APPLICATION = "FailedBoardingApplication"
|
|
82
82
|
SUBMITTED_APPLICATION = "SubmittedApplication"
|
|
83
|
-
UNDER_WRITING_APPLICATION = "UnderWritingApplication"
|
|
84
83
|
ACTIVATED_MERCHANT = "ActivatedMerchant"
|
|
85
84
|
RECEIVED_CHARGE_BACK = "ReceivedChargeBack"
|
|
86
85
|
CHARGEBACK_UPDATED = "ChargebackUpdated"
|
|
@@ -35,6 +35,8 @@ module Payabli
|
|
|
35
35
|
field :state, -> { String }, optional: true, nullable: false
|
|
36
36
|
field :vendor_status, -> { Integer }, optional: true, nullable: false, api_name: "vendorStatus"
|
|
37
37
|
field :zip, -> { String }, optional: true, nullable: false
|
|
38
|
+
field :default_method_id, -> { String }, optional: true, nullable: false, api_name: "defaultMethodId"
|
|
39
|
+
field :attachment, -> { Payabli::Types::FileContent }, optional: true, nullable: false
|
|
38
40
|
end
|
|
39
41
|
end
|
|
40
42
|
end
|
|
@@ -47,6 +47,13 @@ module Payabli
|
|
|
47
47
|
field :vendor_number, -> { String }, optional: true, nullable: false, api_name: "VendorNumber"
|
|
48
48
|
field :vendor_status, -> { Integer }, optional: true, nullable: false, api_name: "VendorStatus"
|
|
49
49
|
field :zip, -> { String }, optional: true, nullable: false, api_name: "Zip"
|
|
50
|
+
field :payment_portal_url, -> { String }, optional: true, nullable: false, api_name: "PaymentPortalUrl"
|
|
51
|
+
field :card_accepted, -> { String }, optional: true, nullable: false, api_name: "CardAccepted"
|
|
52
|
+
field :ach_accepted, -> { String }, optional: true, nullable: false, api_name: "AchAccepted"
|
|
53
|
+
field :enrichment_status, -> { String }, optional: true, nullable: false, api_name: "EnrichmentStatus"
|
|
54
|
+
field :enriched_by, -> { String }, optional: true, nullable: false, api_name: "EnrichedBy"
|
|
55
|
+
field :enriched_at, -> { String }, optional: true, nullable: false, api_name: "EnrichedAt"
|
|
56
|
+
field :enrichment_id, -> { String }, optional: true, nullable: false, api_name: "EnrichmentId"
|
|
50
57
|
end
|
|
51
58
|
end
|
|
52
59
|
end
|
|
@@ -114,7 +114,7 @@ module Payabli
|
|
|
114
114
|
end
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
# Retrieves a vendor's details.
|
|
117
|
+
# Retrieves a vendor's details, including enrichment status and payment acceptance info when available.
|
|
118
118
|
#
|
|
119
119
|
# @param request_options [Hash]
|
|
120
120
|
# @param params [Hash]
|
|
@@ -147,6 +147,44 @@ module Payabli
|
|
|
147
147
|
raise error_class.new(response.body, code: code)
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
|
+
|
|
151
|
+
# Triggers AI-powered vendor enrichment for an existing vendor. Runs one or more enrichment stages (invoice scan,
|
|
152
|
+
# web search) based on the `scope` parameter. Can automatically apply extracted payment acceptance info and vendor
|
|
153
|
+
# contact information to the vendor record, or return raw results for manual review. Contact Payabli to enable
|
|
154
|
+
# this feature.
|
|
155
|
+
#
|
|
156
|
+
# @param request_options [Hash]
|
|
157
|
+
# @param params [Payabli::Vendor::Types::VendorEnrichRequest]
|
|
158
|
+
# @option request_options [String] :base_url
|
|
159
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
160
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
161
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
162
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
163
|
+
# @option params [String] :entry
|
|
164
|
+
#
|
|
165
|
+
# @return [Payabli::Vendor::Types::VendorEnrichResponse]
|
|
166
|
+
def enrich_vendor(request_options: {}, **params)
|
|
167
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
168
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
169
|
+
base_url: request_options[:base_url],
|
|
170
|
+
method: "POST",
|
|
171
|
+
path: "Vendor/enrich/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
172
|
+
body: Payabli::Vendor::Types::VendorEnrichRequest.new(params).to_h,
|
|
173
|
+
request_options: request_options
|
|
174
|
+
)
|
|
175
|
+
begin
|
|
176
|
+
response = @client.send(request)
|
|
177
|
+
rescue Net::HTTPRequestTimeout
|
|
178
|
+
raise Payabli::Errors::TimeoutError
|
|
179
|
+
end
|
|
180
|
+
code = response.code.to_i
|
|
181
|
+
if code.between?(200, 299)
|
|
182
|
+
Payabli::Vendor::Types::VendorEnrichResponse.load(response.body)
|
|
183
|
+
else
|
|
184
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
185
|
+
raise error_class.new(response.body, code: code)
|
|
186
|
+
end
|
|
187
|
+
end
|
|
150
188
|
end
|
|
151
189
|
end
|
|
152
190
|
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Vendor
|
|
5
|
+
module Types
|
|
6
|
+
# Request body for the vendor enrichment endpoint.
|
|
7
|
+
class VendorEnrichRequest < Internal::Types::Model
|
|
8
|
+
field :vendor_id, -> { Integer }, optional: false, nullable: false, api_name: "vendorId"
|
|
9
|
+
field :scope, -> { Internal::Types::Array[String] }, optional: true, nullable: false
|
|
10
|
+
field :apply_enrichment_data, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "applyEnrichmentData"
|
|
11
|
+
field :schedule_call_if_needed, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "scheduleCallIfNeeded"
|
|
12
|
+
field :invoice_file, -> { Payabli::Types::FileContent }, optional: true, nullable: false, api_name: "invoiceFile"
|
|
13
|
+
field :bill_id, -> { Integer }, optional: true, nullable: false, api_name: "billId"
|
|
14
|
+
field :fallback_method, -> { String }, optional: true, nullable: false, api_name: "fallbackMethod"
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Vendor
|
|
5
|
+
module Types
|
|
6
|
+
# Response from the vendor enrichment endpoint.
|
|
7
|
+
class VendorEnrichResponse < Internal::Types::Model
|
|
8
|
+
field :response_code, -> { Integer }, optional: true, nullable: false, api_name: "responseCode"
|
|
9
|
+
field :page_identifier, -> { String }, optional: true, nullable: false, api_name: "pageIdentifier"
|
|
10
|
+
field :room_id, -> { Integer }, optional: true, nullable: false, api_name: "roomId"
|
|
11
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
12
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
13
|
+
field :response_data, -> { Payabli::Vendor::Types::VendorEnrichResponseData }, optional: true, nullable: false, api_name: "responseData"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Vendor
|
|
5
|
+
module Types
|
|
6
|
+
# Enrichment result details.
|
|
7
|
+
class VendorEnrichResponseData < Internal::Types::Model
|
|
8
|
+
field :enrichment_id, -> { String }, optional: true, nullable: false, api_name: "enrichmentId"
|
|
9
|
+
field :status, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :stages_triggered, -> { Internal::Types::Array[String] }, optional: true, nullable: false, api_name: "stagesTriggered"
|
|
11
|
+
field :vendor_payout_ready, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "vendorPayoutReady"
|
|
12
|
+
field :enrichment_data, -> { Payabli::Vendor::Types::VendorEnrichmentData }, optional: true, nullable: false, api_name: "enrichmentData"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Vendor
|
|
5
|
+
module Types
|
|
6
|
+
# Container for enrichment stage results.
|
|
7
|
+
class VendorEnrichmentData < Internal::Types::Model
|
|
8
|
+
field :invoice_scan, -> { Payabli::Vendor::Types::VendorEnrichmentInvoiceScan }, optional: true, nullable: false, api_name: "invoiceScan"
|
|
9
|
+
field :web_search, -> { Payabli::Vendor::Types::VendorEnrichmentWebSearch }, optional: true, nullable: false, api_name: "webSearch"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Vendor
|
|
5
|
+
module Types
|
|
6
|
+
# Vendor contact information and payment acceptance info extracted from an invoice.
|
|
7
|
+
class VendorEnrichmentInvoiceScan < Internal::Types::Model
|
|
8
|
+
field :vendor_name, -> { String }, optional: true, nullable: false, api_name: "vendorName"
|
|
9
|
+
field :street, -> { String }, optional: true, nullable: false
|
|
10
|
+
field :city, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :state, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :zip_code, -> { String }, optional: true, nullable: false, api_name: "zipCode"
|
|
13
|
+
field :country, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :phone, -> { String }, optional: true, nullable: false
|
|
15
|
+
field :email, -> { String }, optional: true, nullable: false
|
|
16
|
+
field :payment_link, -> { String }, optional: true, nullable: false, api_name: "paymentLink"
|
|
17
|
+
field :card_accepted, -> { String }, optional: true, nullable: false, api_name: "cardAccepted"
|
|
18
|
+
field :ach_accepted, -> { String }, optional: true, nullable: false, api_name: "achAccepted"
|
|
19
|
+
field :check_accepted, -> { String }, optional: true, nullable: false, api_name: "checkAccepted"
|
|
20
|
+
field :invoice_number, -> { String }, optional: true, nullable: false, api_name: "invoiceNumber"
|
|
21
|
+
field :amount_due, -> { Integer }, optional: true, nullable: false, api_name: "amountDue"
|
|
22
|
+
field :due_date, -> { String }, optional: true, nullable: false, api_name: "dueDate"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Vendor
|
|
5
|
+
module Types
|
|
6
|
+
# Vendor contact information and payment acceptance info found through web search.
|
|
7
|
+
class VendorEnrichmentWebSearch < Internal::Types::Model
|
|
8
|
+
field :phone, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :phone_type, -> { String }, optional: true, nullable: false, api_name: "phoneType"
|
|
10
|
+
field :email, -> { String }, optional: true, nullable: false
|
|
11
|
+
field :email_type, -> { String }, optional: true, nullable: false, api_name: "emailType"
|
|
12
|
+
field :street, -> { String }, optional: true, nullable: false
|
|
13
|
+
field :city, -> { String }, optional: true, nullable: false
|
|
14
|
+
field :state, -> { String }, optional: true, nullable: false
|
|
15
|
+
field :zip_code, -> { String }, optional: true, nullable: false, api_name: "zipCode"
|
|
16
|
+
field :country, -> { String }, optional: true, nullable: false
|
|
17
|
+
field :address_type, -> { String }, optional: true, nullable: false, api_name: "addressType"
|
|
18
|
+
field :payment_link, -> { String }, optional: true, nullable: false, api_name: "paymentLink"
|
|
19
|
+
field :payment_link_type, -> { String }, optional: true, nullable: false, api_name: "paymentLinkType"
|
|
20
|
+
field :card_accepted, -> { String }, optional: true, nullable: false, api_name: "cardAccepted"
|
|
21
|
+
field :ach_accepted, -> { String }, optional: true, nullable: false, api_name: "achAccepted"
|
|
22
|
+
field :check_accepted, -> { String }, optional: true, nullable: false, api_name: "checkAccepted"
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
data/lib/payabli/version.rb
CHANGED
data/lib/payabli.rb
CHANGED
|
@@ -259,6 +259,7 @@ require_relative "payabli/types/auto_element"
|
|
|
259
259
|
require_relative "payabli/types/avgticketamt"
|
|
260
260
|
require_relative "payabli/types/avs_response_text"
|
|
261
261
|
require_relative "payabli/types/avs_response"
|
|
262
|
+
require_relative "payabli/types/auto_capture"
|
|
262
263
|
require_relative "payabli/types/cvv_response"
|
|
263
264
|
require_relative "payabli/types/cvv_response_text"
|
|
264
265
|
require_relative "payabli/types/bank_section"
|
|
@@ -899,6 +900,12 @@ require_relative "payabli/user/types/change_psw_user_response"
|
|
|
899
900
|
require_relative "payabli/user/types/delete_user_response"
|
|
900
901
|
require_relative "payabli/user/types/edit_mfa_user_response"
|
|
901
902
|
require_relative "payabli/user/types/logout_user_response"
|
|
903
|
+
require_relative "payabli/vendor/types/vendor_enrich_request"
|
|
904
|
+
require_relative "payabli/vendor/types/vendor_enrichment_invoice_scan"
|
|
905
|
+
require_relative "payabli/vendor/types/vendor_enrichment_web_search"
|
|
906
|
+
require_relative "payabli/vendor/types/vendor_enrichment_data"
|
|
907
|
+
require_relative "payabli/vendor/types/vendor_enrich_response_data"
|
|
908
|
+
require_relative "payabli/vendor/types/vendor_enrich_response"
|
|
902
909
|
require_relative "payabli/client"
|
|
903
910
|
require_relative "payabli/bill/client"
|
|
904
911
|
require_relative "payabli/bill/types/add_bill_request"
|