payabli 2.2.24 → 2.2.26
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 +3 -3
- data/README.md +5 -5
- data/lib/payabli/client.rb +6 -1
- data/lib/payabli/cloud/client.rb +3 -0
- data/lib/payabli/management/client.rb +61 -0
- data/lib/payabli/management/types/bank_account_verification_details_response.rb +24 -0
- data/lib/payabli/management/types/verify_account_details_request.rb +17 -0
- data/lib/payabli/management/types/verify_account_details_response.rb +14 -0
- data/lib/payabli/money_in/client.rb +3 -1
- data/lib/payabli/money_in/types/transaction_detail_customer.rb +16 -16
- data/lib/payabli/money_in/types/transaction_detail_payment_data.rb +1 -1
- data/lib/payabli/query/client.rb +100 -0
- data/lib/payabli/query/types/list_devices_org_request.rb +16 -0
- data/lib/payabli/query/types/list_devices_request.rb +16 -0
- data/lib/payabli/query_types/types/device_query_record.rb +34 -0
- data/lib/payabli/query_types/types/query_device_response.rb +13 -0
- data/lib/payabli/types/processing_section.rb +5 -0
- data/lib/payabli/types/template_element.rb +1 -0
- data/lib/payabli/types/v_card_card_type.rb +23 -0
- data/lib/payabli/types/v_card_record.rb +1 -0
- data/lib/payabli/v_2_money_in_types/types/v_2_transaction_details.rb +1 -1
- data/lib/payabli/version.rb +1 -1
- data/lib/payabli.rb +9 -0
- data/reference.md +530 -1
- data/wiremock/wiremock-mappings.json +118 -3
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c48a11b1a300e2d919f642bf5fb07091f593e0f1e3bf85561a15bc0f15d7dcde
|
|
4
|
+
data.tar.gz: 6e2fbd79dd3a84147aac1d6717e8cabfeb9630d760592e9f999d37ff605d1c95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57f5599d14d14e959e9e3e538b9efc6e186ccca1adb4105e239a8e390a96d9d81af976ed8080d820cbbb529bbcae8df355315a0c4202c1e7bf828571474f5638
|
|
7
|
+
data.tar.gz: 8638bbf40053f34df853baf39af29a675c682de1cc3ae4a91d1ed50efced28b6d617a046c2e3b214d688dfb3c3a8697359e56e8da5780e0a23d786465aeb243c
|
data/.fern/metadata.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"cliVersion": "4.
|
|
2
|
+
"cliVersion": "4.94.0",
|
|
3
3
|
"generatorName": "fernapi/fern-ruby-sdk",
|
|
4
4
|
"generatorVersion": "1.1.13",
|
|
5
5
|
"generatorConfig": {
|
|
6
6
|
"enableWireTests": true,
|
|
7
7
|
"rubocopVariableNumberStyle": "snake_case"
|
|
8
8
|
},
|
|
9
|
-
"originGitCommit": "
|
|
10
|
-
"sdkVersion": "2.2.
|
|
9
|
+
"originGitCommit": "0f665390a3f1683396943781707e30c613db2f3d",
|
|
10
|
+
"sdkVersion": "2.2.26"
|
|
11
11
|
}
|
data/README.md
CHANGED
|
@@ -73,7 +73,7 @@ require "payabli"
|
|
|
73
73
|
|
|
74
74
|
client = Payabli::Client.new(api_key: "<value>")
|
|
75
75
|
|
|
76
|
-
client.money_in.
|
|
76
|
+
client.money_in.getpaidv_2(
|
|
77
77
|
customer_data: {
|
|
78
78
|
customer_id: 4440
|
|
79
79
|
},
|
|
@@ -128,7 +128,7 @@ client = Payabli::Client.new(
|
|
|
128
128
|
)
|
|
129
129
|
|
|
130
130
|
begin
|
|
131
|
-
result = client.money_in.
|
|
131
|
+
result = client.money_in.getpaidv_2
|
|
132
132
|
rescue Payabli::Errors::TimeoutError
|
|
133
133
|
puts "API didn't respond before our timeout elapsed"
|
|
134
134
|
rescue Payabli::Errors::ServiceUnavailableError
|
|
@@ -173,7 +173,7 @@ The SDK defaults to a 60 second timeout. Use the `timeout` option to configure t
|
|
|
173
173
|
```ruby
|
|
174
174
|
require "payabli"
|
|
175
175
|
|
|
176
|
-
response = client.money_in.
|
|
176
|
+
response = client.money_in.getpaidv_2(
|
|
177
177
|
...,
|
|
178
178
|
timeout: 30 # 30 second timeout
|
|
179
179
|
)
|
|
@@ -186,7 +186,7 @@ If you would like to send additional headers as part of the request, use the `ad
|
|
|
186
186
|
```ruby
|
|
187
187
|
require "payabli"
|
|
188
188
|
|
|
189
|
-
response = client.money_in.
|
|
189
|
+
response = client.money_in.getpaidv_2(
|
|
190
190
|
...,
|
|
191
191
|
request_options: {
|
|
192
192
|
additional_headers: {
|
|
@@ -203,7 +203,7 @@ If you would like to send additional query parameters as part of the request, us
|
|
|
203
203
|
```ruby
|
|
204
204
|
require "payabli"
|
|
205
205
|
|
|
206
|
-
response = client.money_in.
|
|
206
|
+
response = client.money_in.getpaidv_2(
|
|
207
207
|
...,
|
|
208
208
|
request_options: {
|
|
209
209
|
additional_query_parameters: {
|
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.26",
|
|
14
14
|
"X-Fern-Language" => "Ruby",
|
|
15
15
|
requestToken: api_key.to_s
|
|
16
16
|
}
|
|
@@ -77,6 +77,11 @@ module Payabli
|
|
|
77
77
|
@line_item ||= Payabli::LineItem::Client.new(client: @raw_client)
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
+
# @return [Payabli::Management::Client]
|
|
81
|
+
def management
|
|
82
|
+
@management ||= Payabli::Management::Client.new(client: @raw_client)
|
|
83
|
+
end
|
|
84
|
+
|
|
80
85
|
# @return [Payabli::MoneyIn::Client]
|
|
81
86
|
def money_in
|
|
82
87
|
@money_in ||= Payabli::MoneyIn::Client.new(client: @raw_client)
|
data/lib/payabli/cloud/client.rb
CHANGED
|
@@ -90,6 +90,9 @@ module Payabli
|
|
|
90
90
|
end
|
|
91
91
|
end
|
|
92
92
|
|
|
93
|
+
# Use [List devices by paypoint](/developers/api-reference/cloud/get-list-of-devices-for-a-paypoint) instead,
|
|
94
|
+
# which supports filters, sorting, and pagination.
|
|
95
|
+
#
|
|
93
96
|
# Get a list of cloud devices registered to an entrypoint.
|
|
94
97
|
#
|
|
95
98
|
# @param request_options [Hash]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Management
|
|
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
|
+
# Verifies a bank account and returns detailed verification results from the verification network, including bank
|
|
14
|
+
# name, account status, and response codes. Unlike a pass/fail verification, this endpoint returns granular data
|
|
15
|
+
# to support decision-making and troubleshooting.
|
|
16
|
+
#
|
|
17
|
+
# When bank authentication is enabled for the paypoint's organization, the endpoint performs an identity
|
|
18
|
+
# verification check on the account holder. Otherwise, it performs an account existence check. When bank
|
|
19
|
+
# authentication is enabled, the `accountHolderType` and `holderName` fields are required.
|
|
20
|
+
#
|
|
21
|
+
# Requires `inboundpayments_create` or `outboundpayments_create` permission.
|
|
22
|
+
#
|
|
23
|
+
# @param request_options [Hash]
|
|
24
|
+
# @param params [Payabli::Management::Types::VerifyAccountDetailsRequest]
|
|
25
|
+
# @option request_options [String] :base_url
|
|
26
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
27
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
28
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
29
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
30
|
+
# @option params [String] :entry
|
|
31
|
+
#
|
|
32
|
+
# @return [Payabli::Management::Types::VerifyAccountDetailsResponse]
|
|
33
|
+
def verify_account_details(request_options: {}, **params)
|
|
34
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
35
|
+
request_data = Payabli::Management::Types::VerifyAccountDetailsRequest.new(params).to_h
|
|
36
|
+
non_body_param_names = ["entry"]
|
|
37
|
+
body = request_data.except(*non_body_param_names)
|
|
38
|
+
|
|
39
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
40
|
+
base_url: request_options[:base_url],
|
|
41
|
+
method: "POST",
|
|
42
|
+
path: "Management/verifyAccountDetails/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
43
|
+
body: body,
|
|
44
|
+
request_options: request_options
|
|
45
|
+
)
|
|
46
|
+
begin
|
|
47
|
+
response = @client.send(request)
|
|
48
|
+
rescue Net::HTTPRequestTimeout
|
|
49
|
+
raise Payabli::Errors::TimeoutError
|
|
50
|
+
end
|
|
51
|
+
code = response.code.to_i
|
|
52
|
+
if code.between?(200, 299)
|
|
53
|
+
Payabli::Management::Types::VerifyAccountDetailsResponse.load(response.body)
|
|
54
|
+
else
|
|
55
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
56
|
+
raise error_class.new(response.body, code: code)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Management
|
|
5
|
+
module Types
|
|
6
|
+
# Detailed bank account verification results from the verification network.
|
|
7
|
+
class BankAccountVerificationDetailsResponse < Internal::Types::Model
|
|
8
|
+
field :aba, -> { String }, optional: true, nullable: false
|
|
9
|
+
field :account_number, -> { String }, optional: true, nullable: false, api_name: "accountNumber"
|
|
10
|
+
field :is_valid, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isValid"
|
|
11
|
+
field :error_message, -> { String }, optional: true, nullable: false, api_name: "errorMessage"
|
|
12
|
+
field :verification_response, -> { String }, optional: true, nullable: false, api_name: "verificationResponse"
|
|
13
|
+
field :response_code, -> { String }, optional: true, nullable: false, api_name: "responseCode"
|
|
14
|
+
field :response_value, -> { String }, optional: true, nullable: false, api_name: "responseValue"
|
|
15
|
+
field :response_description, -> { String }, optional: true, nullable: false, api_name: "responseDescription"
|
|
16
|
+
field :bank_name, -> { String }, optional: true, nullable: false, api_name: "bankName"
|
|
17
|
+
field :reported_account_type, -> { String }, optional: true, nullable: false, api_name: "reportedAccountType"
|
|
18
|
+
field :account_added_date, -> { String }, optional: true, nullable: false, api_name: "accountAddedDate"
|
|
19
|
+
field :account_last_updated_date, -> { String }, optional: true, nullable: false, api_name: "accountLastUpdatedDate"
|
|
20
|
+
field :account_closed_date, -> { String }, optional: true, nullable: false, api_name: "accountClosedDate"
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Management
|
|
5
|
+
module Types
|
|
6
|
+
class VerifyAccountDetailsRequest < Internal::Types::Model
|
|
7
|
+
field :entry, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :routing_number, -> { String }, optional: false, nullable: false, api_name: "routingNumber"
|
|
9
|
+
field :account_number, -> { String }, optional: false, nullable: false, api_name: "accountNumber"
|
|
10
|
+
field :account_type, -> { String }, optional: true, nullable: false, api_name: "accountType"
|
|
11
|
+
field :country, -> { String }, optional: true, nullable: false
|
|
12
|
+
field :account_holder_type, -> { String }, optional: true, nullable: false, api_name: "accountHolderType"
|
|
13
|
+
field :holder_name, -> { String }, optional: true, nullable: false, api_name: "holderName"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Management
|
|
5
|
+
module Types
|
|
6
|
+
# Response wrapper for the bank account verification details endpoint.
|
|
7
|
+
class VerifyAccountDetailsResponse < Internal::Types::Model
|
|
8
|
+
field :is_success, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "isSuccess"
|
|
9
|
+
field :response_text, -> { String }, optional: false, nullable: false, api_name: "responseText"
|
|
10
|
+
field :response_data, -> { Payabli::Management::Types::BankAccountVerificationDetailsResponse }, optional: true, nullable: false, api_name: "responseData"
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -299,7 +299,9 @@ module Payabli
|
|
|
299
299
|
|
|
300
300
|
# A reversal either refunds or voids a transaction independent of the transaction's settlement status. Send a
|
|
301
301
|
# reversal request for a transaction, and Payabli automatically determines whether it's a refund or void. You
|
|
302
|
-
# don't need to know whether the transaction is settled or not.
|
|
302
|
+
# don't need to know whether the transaction is settled or not. This endpoint only works on transactions made with
|
|
303
|
+
# the v1 API. For v2 transactions, check the transaction's settlement status and call v2 void or v2 refund based
|
|
304
|
+
# on the result.
|
|
303
305
|
#
|
|
304
306
|
# @param request_options [Hash]
|
|
305
307
|
# @param params [Hash]
|
|
@@ -8,22 +8,22 @@ module Payabli
|
|
|
8
8
|
field :identifiers, -> { Internal::Types::Array[String] }, optional: false, nullable: true
|
|
9
9
|
field :first_name, -> { String }, optional: false, nullable: false, api_name: "firstName"
|
|
10
10
|
field :last_name, -> { String }, optional: false, nullable: false, api_name: "lastName"
|
|
11
|
-
field :company_name, -> { String }, optional: false, nullable:
|
|
12
|
-
field :billing_address_1, -> { String }, optional: false, nullable:
|
|
13
|
-
field :billing_address_2, -> { String }, optional: false, nullable:
|
|
14
|
-
field :billing_city, -> { String }, optional: false, nullable:
|
|
15
|
-
field :billing_state, -> { String }, optional: false, nullable:
|
|
16
|
-
field :billing_zip, -> { String }, optional: false, nullable:
|
|
17
|
-
field :billing_country, -> { String }, optional: false, nullable:
|
|
18
|
-
field :billing_phone, -> { String }, optional: false, nullable:
|
|
19
|
-
field :billing_email, -> { String }, optional: false, nullable:
|
|
20
|
-
field :customer_number, -> { String }, optional: false, nullable:
|
|
21
|
-
field :shipping_address_1, -> { String }, optional: false, nullable:
|
|
22
|
-
field :shipping_address_2, -> { String }, optional: false, nullable:
|
|
23
|
-
field :shipping_city, -> { String }, optional: false, nullable:
|
|
24
|
-
field :shipping_state, -> { String }, optional: false, nullable:
|
|
25
|
-
field :shipping_zip, -> { String }, optional: false, nullable:
|
|
26
|
-
field :shipping_country, -> { String }, optional: false, nullable:
|
|
11
|
+
field :company_name, -> { String }, optional: false, nullable: true, api_name: "companyName"
|
|
12
|
+
field :billing_address_1, -> { String }, optional: false, nullable: true, api_name: "billingAddress1"
|
|
13
|
+
field :billing_address_2, -> { String }, optional: false, nullable: true, api_name: "billingAddress2"
|
|
14
|
+
field :billing_city, -> { String }, optional: false, nullable: true, api_name: "billingCity"
|
|
15
|
+
field :billing_state, -> { String }, optional: false, nullable: true, api_name: "billingState"
|
|
16
|
+
field :billing_zip, -> { String }, optional: false, nullable: true, api_name: "billingZip"
|
|
17
|
+
field :billing_country, -> { String }, optional: false, nullable: true, api_name: "billingCountry"
|
|
18
|
+
field :billing_phone, -> { String }, optional: false, nullable: true, api_name: "billingPhone"
|
|
19
|
+
field :billing_email, -> { String }, optional: false, nullable: true, api_name: "billingEmail"
|
|
20
|
+
field :customer_number, -> { String }, optional: false, nullable: true, api_name: "customerNumber"
|
|
21
|
+
field :shipping_address_1, -> { String }, optional: false, nullable: true, api_name: "shippingAddress1"
|
|
22
|
+
field :shipping_address_2, -> { String }, optional: false, nullable: true, api_name: "shippingAddress2"
|
|
23
|
+
field :shipping_city, -> { String }, optional: false, nullable: true, api_name: "shippingCity"
|
|
24
|
+
field :shipping_state, -> { String }, optional: false, nullable: true, api_name: "shippingState"
|
|
25
|
+
field :shipping_zip, -> { String }, optional: false, nullable: true, api_name: "shippingZip"
|
|
26
|
+
field :shipping_country, -> { String }, optional: false, nullable: true, 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
29
|
field :additional_data, -> { Internal::Types::Hash[String, String] }, optional: false, nullable: true, api_name: "additionalData"
|
|
@@ -13,7 +13,7 @@ module Payabli
|
|
|
13
13
|
field :initiator, -> { String }, optional: false, nullable: true
|
|
14
14
|
field :stored_method_usage_type, -> { String }, optional: false, nullable: true, api_name: "storedMethodUsageType"
|
|
15
15
|
field :sequence, -> { String }, optional: false, nullable: true
|
|
16
|
-
field :order_description, -> { String }, optional: false, nullable:
|
|
16
|
+
field :order_description, -> { String }, optional: false, nullable: true, api_name: "orderDescription"
|
|
17
17
|
field :account_id, -> { String }, optional: false, nullable: true, api_name: "accountId"
|
|
18
18
|
field :signature_data, -> { String }, optional: false, nullable: true, api_name: "signatureData"
|
|
19
19
|
field :bin_data, -> { Payabli::Types::BinData }, optional: false, nullable: true, api_name: "binData"
|
data/lib/payabli/query/client.rb
CHANGED
|
@@ -512,6 +512,106 @@ module Payabli
|
|
|
512
512
|
end
|
|
513
513
|
end
|
|
514
514
|
|
|
515
|
+
# Returns a list of cloud devices for a single paypoint. Use filters to limit results. Include the `exportFormat`
|
|
516
|
+
# query parameter to return the results as a file instead of a JSON response.
|
|
517
|
+
#
|
|
518
|
+
# @param request_options [Hash]
|
|
519
|
+
# @param params [Hash]
|
|
520
|
+
# @option request_options [String] :base_url
|
|
521
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
522
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
523
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
524
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
525
|
+
# @option params [Payabli::Types::Entry] :entry
|
|
526
|
+
# @option params [Payabli::Types::ExportFormat, nil] :export_format
|
|
527
|
+
# @option params [Integer, nil] :from_record
|
|
528
|
+
# @option params [Integer, nil] :limit_record
|
|
529
|
+
# @option params [Hash[String, String, nil], nil] :parameters
|
|
530
|
+
# @option params [String, nil] :sort_by
|
|
531
|
+
#
|
|
532
|
+
# @return [Payabli::QueryTypes::Types::QueryDeviceResponse]
|
|
533
|
+
def list_devices(request_options: {}, **params)
|
|
534
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
535
|
+
query_param_names = %i[export_format from_record limit_record parameters sort_by]
|
|
536
|
+
query_params = {}
|
|
537
|
+
query_params["exportFormat"] = params[:export_format] if params.key?(:export_format)
|
|
538
|
+
query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
|
|
539
|
+
query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
|
|
540
|
+
query_params["parameters"] = params[:parameters] if params.key?(:parameters)
|
|
541
|
+
query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
|
|
542
|
+
params = params.except(*query_param_names)
|
|
543
|
+
|
|
544
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
545
|
+
base_url: request_options[:base_url],
|
|
546
|
+
method: "GET",
|
|
547
|
+
path: "Query/devices/#{URI.encode_uri_component(params[:entry].to_s)}",
|
|
548
|
+
query: query_params,
|
|
549
|
+
request_options: request_options
|
|
550
|
+
)
|
|
551
|
+
begin
|
|
552
|
+
response = @client.send(request)
|
|
553
|
+
rescue Net::HTTPRequestTimeout
|
|
554
|
+
raise Payabli::Errors::TimeoutError
|
|
555
|
+
end
|
|
556
|
+
code = response.code.to_i
|
|
557
|
+
if code.between?(200, 299)
|
|
558
|
+
Payabli::QueryTypes::Types::QueryDeviceResponse.load(response.body)
|
|
559
|
+
else
|
|
560
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
561
|
+
raise error_class.new(response.body, code: code)
|
|
562
|
+
end
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
# Returns a list of cloud devices for a single organization. Use filters to limit results. Include the
|
|
566
|
+
# `exportFormat` query parameter to return the results as a file instead of a JSON response.
|
|
567
|
+
#
|
|
568
|
+
# @param request_options [Hash]
|
|
569
|
+
# @param params [Hash]
|
|
570
|
+
# @option request_options [String] :base_url
|
|
571
|
+
# @option request_options [Hash{String => Object}] :additional_headers
|
|
572
|
+
# @option request_options [Hash{String => Object}] :additional_query_parameters
|
|
573
|
+
# @option request_options [Hash{String => Object}] :additional_body_parameters
|
|
574
|
+
# @option request_options [Integer] :timeout_in_seconds
|
|
575
|
+
# @option params [Integer] :org_id
|
|
576
|
+
# @option params [Payabli::Types::ExportFormat, nil] :export_format
|
|
577
|
+
# @option params [Integer, nil] :from_record
|
|
578
|
+
# @option params [Integer, nil] :limit_record
|
|
579
|
+
# @option params [Hash[String, String, nil], nil] :parameters
|
|
580
|
+
# @option params [String, nil] :sort_by
|
|
581
|
+
#
|
|
582
|
+
# @return [Payabli::QueryTypes::Types::QueryDeviceResponse]
|
|
583
|
+
def list_devices_org(request_options: {}, **params)
|
|
584
|
+
params = Payabli::Internal::Types::Utils.normalize_keys(params)
|
|
585
|
+
query_param_names = %i[export_format from_record limit_record parameters sort_by]
|
|
586
|
+
query_params = {}
|
|
587
|
+
query_params["exportFormat"] = params[:export_format] if params.key?(:export_format)
|
|
588
|
+
query_params["fromRecord"] = params[:from_record] if params.key?(:from_record)
|
|
589
|
+
query_params["limitRecord"] = params[:limit_record] if params.key?(:limit_record)
|
|
590
|
+
query_params["parameters"] = params[:parameters] if params.key?(:parameters)
|
|
591
|
+
query_params["sortBy"] = params[:sort_by] if params.key?(:sort_by)
|
|
592
|
+
params = params.except(*query_param_names)
|
|
593
|
+
|
|
594
|
+
request = Payabli::Internal::JSON::Request.new(
|
|
595
|
+
base_url: request_options[:base_url],
|
|
596
|
+
method: "GET",
|
|
597
|
+
path: "Query/devices/org/#{URI.encode_uri_component(params[:org_id].to_s)}",
|
|
598
|
+
query: query_params,
|
|
599
|
+
request_options: request_options
|
|
600
|
+
)
|
|
601
|
+
begin
|
|
602
|
+
response = @client.send(request)
|
|
603
|
+
rescue Net::HTTPRequestTimeout
|
|
604
|
+
raise Payabli::Errors::TimeoutError
|
|
605
|
+
end
|
|
606
|
+
code = response.code.to_i
|
|
607
|
+
if code.between?(200, 299)
|
|
608
|
+
Payabli::QueryTypes::Types::QueryDeviceResponse.load(response.body)
|
|
609
|
+
else
|
|
610
|
+
error_class = Payabli::Errors::ResponseError.subclass_for_code(code)
|
|
611
|
+
raise error_class.new(response.body, code: code)
|
|
612
|
+
end
|
|
613
|
+
end
|
|
614
|
+
|
|
515
615
|
# Returns a list of all reports generated in the last 60 days for a single entrypoint. Use filters to limit
|
|
516
616
|
# results.
|
|
517
617
|
#
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Query
|
|
5
|
+
module Types
|
|
6
|
+
class ListDevicesOrgRequest < Internal::Types::Model
|
|
7
|
+
field :org_id, -> { Integer }, optional: false, nullable: false, api_name: "orgId"
|
|
8
|
+
field :export_format, -> { Payabli::Types::ExportFormat }, optional: true, nullable: false, api_name: "exportFormat"
|
|
9
|
+
field :from_record, -> { Integer }, optional: true, nullable: false, api_name: "fromRecord"
|
|
10
|
+
field :limit_record, -> { Integer }, optional: true, nullable: false, api_name: "limitRecord"
|
|
11
|
+
field :parameters, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
12
|
+
field :sort_by, -> { String }, optional: true, nullable: false, api_name: "sortBy"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Query
|
|
5
|
+
module Types
|
|
6
|
+
class ListDevicesRequest < Internal::Types::Model
|
|
7
|
+
field :entry, -> { String }, optional: false, nullable: false
|
|
8
|
+
field :export_format, -> { Payabli::Types::ExportFormat }, optional: true, nullable: false, api_name: "exportFormat"
|
|
9
|
+
field :from_record, -> { Integer }, optional: true, nullable: false, api_name: "fromRecord"
|
|
10
|
+
field :limit_record, -> { Integer }, optional: true, nullable: false, api_name: "limitRecord"
|
|
11
|
+
field :parameters, -> { Internal::Types::Hash[String, String] }, optional: true, nullable: false
|
|
12
|
+
field :sort_by, -> { String }, optional: true, nullable: false, api_name: "sortBy"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module QueryTypes
|
|
5
|
+
module Types
|
|
6
|
+
class DeviceQueryRecord < Internal::Types::Model
|
|
7
|
+
field :device_id, -> { String }, optional: false, nullable: true, api_name: "deviceId"
|
|
8
|
+
field :id_cloud, -> { Integer }, optional: false, nullable: true, api_name: "idCloud"
|
|
9
|
+
field :description, -> { String }, optional: false, nullable: true
|
|
10
|
+
field :serial_number, -> { String }, optional: false, nullable: true, api_name: "serialNumber"
|
|
11
|
+
field :friendly_name, -> { String }, optional: false, nullable: true, api_name: "friendlyName"
|
|
12
|
+
field :make, -> { String }, optional: false, nullable: true
|
|
13
|
+
field :model, -> { String }, optional: false, nullable: true
|
|
14
|
+
field :device_type, -> { Integer }, optional: false, nullable: true, api_name: "deviceType"
|
|
15
|
+
field :device_status, -> { Integer }, optional: false, nullable: true, api_name: "deviceStatus"
|
|
16
|
+
field :device_os, -> { Integer }, optional: false, nullable: true, api_name: "deviceOs"
|
|
17
|
+
field :mac_address, -> { String }, optional: false, nullable: true, api_name: "macAddress"
|
|
18
|
+
field :last_health_check, -> { String }, optional: false, nullable: true, api_name: "lastHealthCheck"
|
|
19
|
+
field :registration_code, -> { String }, optional: false, nullable: true, api_name: "registrationCode"
|
|
20
|
+
field :activation_attempts, -> { Integer }, optional: false, nullable: true, api_name: "activationAttempts"
|
|
21
|
+
field :activation_code_expiry, -> { String }, optional: false, nullable: true, api_name: "activationCodeExpiry"
|
|
22
|
+
field :created_at, -> { String }, optional: false, nullable: true, api_name: "createdAt"
|
|
23
|
+
field :updated_at, -> { String }, optional: false, nullable: true, api_name: "updatedAt"
|
|
24
|
+
field :paypoint_id, -> { Integer }, optional: false, nullable: true, api_name: "paypointId"
|
|
25
|
+
field :paypoint_dba, -> { String }, optional: false, nullable: true, api_name: "paypointDba"
|
|
26
|
+
field :paypoint_legal, -> { String }, optional: false, nullable: true, api_name: "paypointLegal"
|
|
27
|
+
field :paypoint_entry, -> { String }, optional: false, nullable: true, api_name: "paypointEntry"
|
|
28
|
+
field :external_paypoint_id, -> { String }, optional: false, nullable: true, api_name: "externalPaypointId"
|
|
29
|
+
field :parent_org_id, -> { Integer }, optional: false, nullable: true, api_name: "parentOrgId"
|
|
30
|
+
field :parent_org_name, -> { String }, optional: false, nullable: true, api_name: "parentOrgName"
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module QueryTypes
|
|
5
|
+
module Types
|
|
6
|
+
# Response body for queries about cloud devices.
|
|
7
|
+
class QueryDeviceResponse < Internal::Types::Model
|
|
8
|
+
field :summary, -> { Payabli::Types::QuerySummary }, optional: false, nullable: false, api_name: "Summary"
|
|
9
|
+
field :records, -> { Internal::Types::Array[Payabli::QueryTypes::Types::DeviceQueryRecord] }, optional: false, nullable: false, api_name: "Records"
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -18,6 +18,11 @@ module Payabli
|
|
|
18
18
|
field :when_delivered, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "whenDelivered"
|
|
19
19
|
field :when_provided, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "whenProvided"
|
|
20
20
|
field :when_refunded, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "whenRefunded"
|
|
21
|
+
field :combined_batches, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "CombinedBatches"
|
|
22
|
+
field :payout_average_monthly_volume, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "payoutAverageMonthlyVolume"
|
|
23
|
+
field :payout_high_ticket_amount, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "payoutHighTicketAmount"
|
|
24
|
+
field :payout_average_ticket_amount, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "payoutAverageTicketAmount"
|
|
25
|
+
field :payout_credit_limit, -> { Payabli::Types::TemplateElement }, optional: true, nullable: false, api_name: "payoutCreditLimit"
|
|
21
26
|
end
|
|
22
27
|
end
|
|
23
28
|
end
|
|
@@ -8,6 +8,7 @@ module Payabli
|
|
|
8
8
|
field :read_only, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "readOnly"
|
|
9
9
|
field :value, -> { String }, optional: true, nullable: false
|
|
10
10
|
field :visible, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
|
+
field :required, -> { Internal::Types::Boolean }, optional: true, nullable: false
|
|
11
12
|
end
|
|
12
13
|
end
|
|
13
14
|
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Payabli
|
|
4
|
+
module Types
|
|
5
|
+
module VCardCardType
|
|
6
|
+
# VCardCardType is an alias for Integer
|
|
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,6 +4,7 @@ module Payabli
|
|
|
4
4
|
module Types
|
|
5
5
|
class VCardRecord < Internal::Types::Model
|
|
6
6
|
field :vcard_sent, -> { Internal::Types::Boolean }, optional: true, nullable: false, api_name: "vcardSent"
|
|
7
|
+
field :card_type, -> { Integer }, optional: true, nullable: false, api_name: "cardType"
|
|
7
8
|
field :card_token, -> { String }, optional: true, nullable: false, api_name: "cardToken"
|
|
8
9
|
field :card_number, -> { String }, optional: true, nullable: false, api_name: "cardNumber"
|
|
9
10
|
field :cvc, -> { String }, optional: true, nullable: false
|
|
@@ -38,7 +38,7 @@ module Payabli
|
|
|
38
38
|
field :trans_additional_data, -> { Object }, optional: false, nullable: true, api_name: "transAdditionalData"
|
|
39
39
|
field :invoice_data, -> { Payabli::MoneyIn::Types::TransactionDetailInvoiceData }, optional: false, nullable: false, api_name: "invoiceData"
|
|
40
40
|
field :entrypage_id, -> { Integer }, optional: false, nullable: false, api_name: "entrypageId"
|
|
41
|
-
field :external_paypoint_id, -> { String }, optional: false, nullable:
|
|
41
|
+
field :external_paypoint_id, -> { String }, optional: false, nullable: true, api_name: "externalPaypointID"
|
|
42
42
|
field :is_validated_ach, -> { Internal::Types::Boolean }, optional: false, nullable: false, api_name: "isValidatedACH"
|
|
43
43
|
field :transaction_time, -> { String }, optional: false, nullable: false, api_name: "transactionTime"
|
|
44
44
|
field :customer, -> { Payabli::MoneyIn::Types::TransactionDetailCustomer }, optional: false, nullable: false
|
data/lib/payabli/version.rb
CHANGED
data/lib/payabli.rb
CHANGED
|
@@ -675,6 +675,7 @@ require_relative "payabli/types/transfer_summary"
|
|
|
675
675
|
require_relative "payabli/types/transfer_query_response"
|
|
676
676
|
require_relative "payabli/types/payment_trans_status_description"
|
|
677
677
|
require_relative "payabli/types/user_data"
|
|
678
|
+
require_relative "payabli/types/v_card_card_type"
|
|
678
679
|
require_relative "payabli/types/v_card_summary"
|
|
679
680
|
require_relative "payabli/types/associated_vendor"
|
|
680
681
|
require_relative "payabli/types/v_card_record"
|
|
@@ -744,6 +745,8 @@ require_relative "payabli/query_types/types/transfer_out_detail_bill"
|
|
|
744
745
|
require_relative "payabli/query_types/types/transfer_out_detail_event"
|
|
745
746
|
require_relative "payabli/query_types/types/transfer_out_detail_record"
|
|
746
747
|
require_relative "payabli/query_types/types/transfer_out_detail_query_response"
|
|
748
|
+
require_relative "payabli/query_types/types/device_query_record"
|
|
749
|
+
require_relative "payabli/query_types/types/query_device_response"
|
|
747
750
|
require_relative "payabli/v_2_money_in_types/types/v_2_response_code"
|
|
748
751
|
require_relative "payabli/v_2_money_in_types/types/v_2_response_reason"
|
|
749
752
|
require_relative "payabli/v_2_money_in_types/types/v_2_response_explanation"
|
|
@@ -791,6 +794,8 @@ require_relative "payabli/invoice/types/invoice_response_without_data"
|
|
|
791
794
|
require_relative "payabli/invoice/types/send_invoice_response"
|
|
792
795
|
require_relative "payabli/invoice/types/invoice_number_response"
|
|
793
796
|
require_relative "payabli/line_item/types/delete_item_response"
|
|
797
|
+
require_relative "payabli/management/types/bank_account_verification_details_response"
|
|
798
|
+
require_relative "payabli/management/types/verify_account_details_response"
|
|
794
799
|
require_relative "payabli/money_in/types/invalid_trans_status_error_type"
|
|
795
800
|
require_relative "payabli/money_in/types/receipt_response"
|
|
796
801
|
require_relative "payabli/money_in/types/capture_response_data"
|
|
@@ -978,6 +983,8 @@ require_relative "payabli/invoice/types/send_invoice_request"
|
|
|
978
983
|
require_relative "payabli/line_item/client"
|
|
979
984
|
require_relative "payabli/line_item/types/add_item_request"
|
|
980
985
|
require_relative "payabli/line_item/types/list_line_items_request"
|
|
986
|
+
require_relative "payabli/management/client"
|
|
987
|
+
require_relative "payabli/management/types/verify_account_details_request"
|
|
981
988
|
require_relative "payabli/money_in/client"
|
|
982
989
|
require_relative "payabli/money_in/types/request_payment_authorize"
|
|
983
990
|
require_relative "payabli/money_in/types/request_credit"
|
|
@@ -1026,6 +1033,8 @@ require_relative "payabli/query/types/list_chargebacks_request"
|
|
|
1026
1033
|
require_relative "payabli/query/types/list_chargebacks_org_request"
|
|
1027
1034
|
require_relative "payabli/query/types/list_customers_request"
|
|
1028
1035
|
require_relative "payabli/query/types/list_customers_org_request"
|
|
1036
|
+
require_relative "payabli/query/types/list_devices_request"
|
|
1037
|
+
require_relative "payabli/query/types/list_devices_org_request"
|
|
1029
1038
|
require_relative "payabli/query/types/list_notification_reports_request"
|
|
1030
1039
|
require_relative "payabli/query/types/list_notification_reports_org_request"
|
|
1031
1040
|
require_relative "payabli/query/types/list_notifications_request"
|