ultracart_api 4.0.144 → 4.0.146
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/README.md +11 -4
- data/docs/AccountsReceivableRetryConfig.md +2 -0
- data/docs/AccountsReceivableRetryTransactionReject.md +20 -0
- data/docs/DatawarehouseApi.md +72 -0
- data/docs/Experiment.md +2 -0
- data/docs/ReportDryRunQueriesRequest.md +28 -0
- data/docs/ReportDryRunQueriesResponse.md +18 -0
- data/docs/ReportDryRunQueryResult.md +20 -0
- data/lib/ultracart_api/api/datawarehouse_api.rb +69 -0
- data/lib/ultracart_api/models/accounts_receivable_retry_config.rb +13 -1
- data/lib/ultracart_api/models/accounts_receivable_retry_transaction_reject.rb +230 -0
- data/lib/ultracart_api/models/experiment.rb +11 -1
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/models/report_dry_run_queries_request.rb +266 -0
- data/lib/ultracart_api/models/report_dry_run_queries_response.rb +221 -0
- data/lib/ultracart_api/models/report_dry_run_query_result.rb +228 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65509080db9c2dd5656aeb62c1f55565afa077406cddcad3f484d6e0c037b86d
|
4
|
+
data.tar.gz: 7398be9218630b2ae15844b6dcee066032cdedf608058f76fc0caa6dc75dad07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 386cdbaf3fd87631aeb79e9457a35a0ca2e98a73bc908fa55a00065cbcb40170958f9e9af9c0683658e6b1883244b19b018148135bfb874a24b4dab04ba6ddda
|
7
|
+
data.tar.gz: c8c41c537a9493f0b6c0ac6a9168689df62f09a1d0a2ce0886b6f187bd1d46e306841cf4c367c643b43933d2d575603d298555e68e6bf6616db31a586ad09172
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 4.0.
|
10
|
+
- Package version: 4.0.146
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-4.0.
|
27
|
+
gem install ./ultracart_api-4.0.146.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.146.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
36
|
+
gem 'ultracart_api', '~> 4.0.146'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -211,6 +211,7 @@ Class | Method | HTTP request | Description
|
|
211
211
|
*UltracartClient::CustomerApi* | [**update_customer_email_lists**](docs/CustomerApi.md#update_customer_email_lists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer
|
212
212
|
*UltracartClient::CustomerApi* | [**validate_email_verification_token**](docs/CustomerApi.md#validate_email_verification_token) | **POST** /customer/customers/email_verify/validate_token | Validate a token that can be used to verify a customer email address
|
213
213
|
*UltracartClient::DatawarehouseApi* | [**delete_report**](docs/DatawarehouseApi.md#delete_report) | **DELETE** /datawarehouse/reports/{report_oid} | Delete a report
|
214
|
+
*UltracartClient::DatawarehouseApi* | [**dry_run_report_queries**](docs/DatawarehouseApi.md#dry_run_report_queries) | **PUT** /datawarehouse/reports/dryrun | Dry run the report queries
|
214
215
|
*UltracartClient::DatawarehouseApi* | [**execute_report_queries**](docs/DatawarehouseApi.md#execute_report_queries) | **PUT** /datawarehouse/reports/execute | Execute the report queries
|
215
216
|
*UltracartClient::DatawarehouseApi* | [**get_report**](docs/DatawarehouseApi.md#get_report) | **GET** /datawarehouse/reports/{report_oid} | Get a report
|
216
217
|
*UltracartClient::DatawarehouseApi* | [**get_report_data_set**](docs/DatawarehouseApi.md#get_report_data_set) | **GET** /datawarehouse/reports/dataset/{dataset_uuid} | Get a report data set
|
@@ -516,6 +517,7 @@ Class | Method | HTTP request | Description
|
|
516
517
|
- [UltracartClient::AccountsReceivableRetryStatMetrics](docs/AccountsReceivableRetryStatMetrics.md)
|
517
518
|
- [UltracartClient::AccountsReceivableRetryStatRevenue](docs/AccountsReceivableRetryStatRevenue.md)
|
518
519
|
- [UltracartClient::AccountsReceivableRetryStatsResponse](docs/AccountsReceivableRetryStatsResponse.md)
|
520
|
+
- [UltracartClient::AccountsReceivableRetryTransactionReject](docs/AccountsReceivableRetryTransactionReject.md)
|
519
521
|
- [UltracartClient::Activity](docs/Activity.md)
|
520
522
|
- [UltracartClient::AddLibraryItemRequest](docs/AddLibraryItemRequest.md)
|
521
523
|
- [UltracartClient::AdjustInternalCertificateRequest](docs/AdjustInternalCertificateRequest.md)
|
@@ -1145,6 +1147,9 @@ Class | Method | HTTP request | Description
|
|
1145
1147
|
- [UltracartClient::ReportDataSetSchema](docs/ReportDataSetSchema.md)
|
1146
1148
|
- [UltracartClient::ReportDataSource](docs/ReportDataSource.md)
|
1147
1149
|
- [UltracartClient::ReportDataSourceSchema](docs/ReportDataSourceSchema.md)
|
1150
|
+
- [UltracartClient::ReportDryRunQueriesRequest](docs/ReportDryRunQueriesRequest.md)
|
1151
|
+
- [UltracartClient::ReportDryRunQueriesResponse](docs/ReportDryRunQueriesResponse.md)
|
1152
|
+
- [UltracartClient::ReportDryRunQueryResult](docs/ReportDryRunQueryResult.md)
|
1148
1153
|
- [UltracartClient::ReportExecuteQueriesRequest](docs/ReportExecuteQueriesRequest.md)
|
1149
1154
|
- [UltracartClient::ReportFilter](docs/ReportFilter.md)
|
1150
1155
|
- [UltracartClient::ReportFilterConnection](docs/ReportFilterConnection.md)
|
@@ -1347,6 +1352,8 @@ Not every change is committed to every SDK.
|
|
1347
1352
|
|
1348
1353
|
| Version | Date | Comments |
|
1349
1354
|
| --: | :-: | --- |
|
1355
|
+
| 4.0.146 | 04/11/2023 | missing sezzle payment constant |
|
1356
|
+
| 4.0.145 | 04/10/2023 | data warehouse internal dev |
|
1350
1357
|
| 4.0.144 | 03/29/2023 | internal development |
|
1351
1358
|
| 4.0.143 | 03/22/2023 | data warehouse internal dev |
|
1352
1359
|
| 4.0.142 | 03/22/2023 | dw initial framework |
|
@@ -17,6 +17,7 @@
|
|
17
17
|
| **process_linked_accounts** | **Boolean** | If true, all linked accounts are also processed using the same rules. | [optional] |
|
18
18
|
| **processing_percentage** | **String** | The percentage rate charged for the service. | [optional] |
|
19
19
|
| **reject_at_end** | **Boolean** | If true, the order is rejected the day after the last configured activity day | [optional] |
|
20
|
+
| **transaction_rejects** | [**Array<AccountsReceivableRetryTransactionReject>**](AccountsReceivableRetryTransactionReject.md) | Array of key/value pairs that when found in the response cause the rejection of the transaction. | [optional] |
|
20
21
|
| **trial_mode** | **Boolean** | True if the account is currently in trial mode. Set to false to exit trial mode. | [optional] |
|
21
22
|
| **trial_mode_expiration_dts** | **String** | The date when trial mode expires. If this date is reached without exiting trial mode, the service will de-activate. | [optional] |
|
22
23
|
|
@@ -39,6 +40,7 @@ instance = UltracartClient::AccountsReceivableRetryConfig.new(
|
|
39
40
|
process_linked_accounts: null,
|
40
41
|
processing_percentage: null,
|
41
42
|
reject_at_end: null,
|
43
|
+
transaction_rejects: null,
|
42
44
|
trial_mode: null,
|
43
45
|
trial_mode_expiration_dts: null
|
44
46
|
)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# UltracartClient::AccountsReceivableRetryTransactionReject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Transaction response name | [optional] |
|
8
|
+
| **value** | **String** | Transaction response value | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ultracart_api'
|
14
|
+
|
15
|
+
instance = UltracartClient::AccountsReceivableRetryTransactionReject.new(
|
16
|
+
name: null,
|
17
|
+
value: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/DatawarehouseApi.md
CHANGED
@@ -5,6 +5,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**delete_report**](DatawarehouseApi.md#delete_report) | **DELETE** /datawarehouse/reports/{report_oid} | Delete a report |
|
8
|
+
| [**dry_run_report_queries**](DatawarehouseApi.md#dry_run_report_queries) | **PUT** /datawarehouse/reports/dryrun | Dry run the report queries |
|
8
9
|
| [**execute_report_queries**](DatawarehouseApi.md#execute_report_queries) | **PUT** /datawarehouse/reports/execute | Execute the report queries |
|
9
10
|
| [**get_report**](DatawarehouseApi.md#get_report) | **GET** /datawarehouse/reports/{report_oid} | Get a report |
|
10
11
|
| [**get_report_data_set**](DatawarehouseApi.md#get_report_data_set) | **GET** /datawarehouse/reports/dataset/{dataset_uuid} | Get a report data set |
|
@@ -85,6 +86,77 @@ nil (empty response body)
|
|
85
86
|
- **Accept**: application/json
|
86
87
|
|
87
88
|
|
89
|
+
## dry_run_report_queries
|
90
|
+
|
91
|
+
> <ReportDryRunQueriesResponse> dry_run_report_queries(query_request)
|
92
|
+
|
93
|
+
Dry run the report queries
|
94
|
+
|
95
|
+
Dry run the report queries
|
96
|
+
|
97
|
+
### Examples
|
98
|
+
|
99
|
+
```ruby
|
100
|
+
require 'time'
|
101
|
+
require 'ultracart_api'
|
102
|
+
require 'json'
|
103
|
+
require 'yaml'
|
104
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
105
|
+
|
106
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
107
|
+
# As such, this might not be the best way to use this object.
|
108
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
109
|
+
|
110
|
+
api = UltracartClient::DatawarehouseApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
111
|
+
query_request = UltracartClient::ReportDryRunQueriesRequest.new # ReportDryRunQueriesRequest | Dry run request
|
112
|
+
|
113
|
+
begin
|
114
|
+
# Dry run the report queries
|
115
|
+
result = api_instance.dry_run_report_queries(query_request)
|
116
|
+
p result
|
117
|
+
rescue UltracartClient::ApiError => e
|
118
|
+
puts "Error when calling DatawarehouseApi->dry_run_report_queries: #{e}"
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
#### Using the dry_run_report_queries_with_http_info variant
|
123
|
+
|
124
|
+
This returns an Array which contains the response data, status code and headers.
|
125
|
+
|
126
|
+
> <Array(<ReportDryRunQueriesResponse>, Integer, Hash)> dry_run_report_queries_with_http_info(query_request)
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
begin
|
130
|
+
# Dry run the report queries
|
131
|
+
data, status_code, headers = api_instance.dry_run_report_queries_with_http_info(query_request)
|
132
|
+
p status_code # => 2xx
|
133
|
+
p headers # => { ... }
|
134
|
+
p data # => <ReportDryRunQueriesResponse>
|
135
|
+
rescue UltracartClient::ApiError => e
|
136
|
+
puts "Error when calling DatawarehouseApi->dry_run_report_queries_with_http_info: #{e}"
|
137
|
+
end
|
138
|
+
```
|
139
|
+
|
140
|
+
### Parameters
|
141
|
+
|
142
|
+
| Name | Type | Description | Notes |
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
144
|
+
| **query_request** | [**ReportDryRunQueriesRequest**](ReportDryRunQueriesRequest.md) | Dry run request | |
|
145
|
+
|
146
|
+
### Return type
|
147
|
+
|
148
|
+
[**ReportDryRunQueriesResponse**](ReportDryRunQueriesResponse.md)
|
149
|
+
|
150
|
+
### Authorization
|
151
|
+
|
152
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
153
|
+
|
154
|
+
### HTTP request headers
|
155
|
+
|
156
|
+
- **Content-Type**: application/json
|
157
|
+
- **Accept**: application/json
|
158
|
+
|
159
|
+
|
88
160
|
## execute_report_queries
|
89
161
|
|
90
162
|
> execute_report_queries(query_request)
|
data/docs/Experiment.md
CHANGED
@@ -19,6 +19,7 @@
|
|
19
19
|
| **openai_model** | **String** | The type of OpenAI model used | [optional] |
|
20
20
|
| **openai_total_iterations** | **Integer** | The total number of iterations to perform on the experiment | [optional] |
|
21
21
|
| **optimization_type** | **String** | Type of optimization | [optional] |
|
22
|
+
| **p95_sessions_needed** | **Integer** | Estimated sessions needed to achieve P95 | [optional] |
|
22
23
|
| **p_value** | **Float** | Statistics p-value for the experiment | [optional] |
|
23
24
|
| **session_count** | **Integer** | Total number of sessions in the experiment | [optional] |
|
24
25
|
| **start_dts** | **String** | Start date/time | [optional] |
|
@@ -49,6 +50,7 @@ instance = UltracartClient::Experiment.new(
|
|
49
50
|
openai_model: null,
|
50
51
|
openai_total_iterations: null,
|
51
52
|
optimization_type: null,
|
53
|
+
p95_sessions_needed: null,
|
52
54
|
p_value: null,
|
53
55
|
session_count: null,
|
54
56
|
start_dts: null,
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# UltracartClient::ReportDryRunQueriesRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **connection_id** | **String** | | [optional] |
|
8
|
+
| **default_dataset_id** | **String** | | [optional] |
|
9
|
+
| **default_project_id** | **String** | | [optional] |
|
10
|
+
| **merchant_id** | **String** | | [optional] |
|
11
|
+
| **queries** | [**Array<ReportDataSetQuery>**](ReportDataSetQuery.md) | | [optional] |
|
12
|
+
| **security_level** | **String** | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'ultracart_api'
|
18
|
+
|
19
|
+
instance = UltracartClient::ReportDryRunQueriesRequest.new(
|
20
|
+
connection_id: null,
|
21
|
+
default_dataset_id: null,
|
22
|
+
default_project_id: null,
|
23
|
+
merchant_id: null,
|
24
|
+
queries: null,
|
25
|
+
security_level: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# UltracartClient::ReportDryRunQueriesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **dry_run_query_results** | [**Array<ReportDryRunQueryResult>**](ReportDryRunQueryResult.md) | | [optional] |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'ultracart_api'
|
13
|
+
|
14
|
+
instance = UltracartClient::ReportDryRunQueriesResponse.new(
|
15
|
+
dry_run_query_results: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# UltracartClient::ReportDryRunQueryResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error_message** | **String** | | [optional] |
|
8
|
+
| **total_bytes_processed** | **Integer** | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ultracart_api'
|
14
|
+
|
15
|
+
instance = UltracartClient::ReportDryRunQueryResult.new(
|
16
|
+
error_message: null,
|
17
|
+
total_bytes_processed: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -96,6 +96,75 @@ module UltracartClient
|
|
96
96
|
return data, status_code, headers
|
97
97
|
end
|
98
98
|
|
99
|
+
# Dry run the report queries
|
100
|
+
# Dry run the report queries
|
101
|
+
# @param query_request [ReportDryRunQueriesRequest] Dry run request
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [ReportDryRunQueriesResponse]
|
104
|
+
def dry_run_report_queries(query_request, opts = {})
|
105
|
+
data, _status_code, _headers = dry_run_report_queries_with_http_info(query_request, opts)
|
106
|
+
data
|
107
|
+
end
|
108
|
+
|
109
|
+
# Dry run the report queries
|
110
|
+
# Dry run the report queries
|
111
|
+
# @param query_request [ReportDryRunQueriesRequest] Dry run request
|
112
|
+
# @param [Hash] opts the optional parameters
|
113
|
+
# @return [Array<(ReportDryRunQueriesResponse, Integer, Hash)>] ReportDryRunQueriesResponse data, response status code and response headers
|
114
|
+
def dry_run_report_queries_with_http_info(query_request, opts = {})
|
115
|
+
if @api_client.config.debugging
|
116
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.dry_run_report_queries ...'
|
117
|
+
end
|
118
|
+
# verify the required parameter 'query_request' is set
|
119
|
+
if @api_client.config.client_side_validation && query_request.nil?
|
120
|
+
fail ArgumentError, "Missing the required parameter 'query_request' when calling DatawarehouseApi.dry_run_report_queries"
|
121
|
+
end
|
122
|
+
# resource path
|
123
|
+
local_var_path = '/datawarehouse/reports/dryrun'
|
124
|
+
|
125
|
+
# query parameters
|
126
|
+
query_params = opts[:query_params] || {}
|
127
|
+
|
128
|
+
# header parameters
|
129
|
+
header_params = opts[:header_params] || {}
|
130
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
131
|
+
# HTTP header 'Accept' (if needed)
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
|
+
# HTTP header 'Content-Type'
|
134
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
135
|
+
if !content_type.nil?
|
136
|
+
header_params['Content-Type'] = content_type
|
137
|
+
end
|
138
|
+
|
139
|
+
# form parameters
|
140
|
+
form_params = opts[:form_params] || {}
|
141
|
+
|
142
|
+
# http body (model)
|
143
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(query_request)
|
144
|
+
|
145
|
+
# return_type
|
146
|
+
return_type = opts[:debug_return_type] || 'ReportDryRunQueriesResponse'
|
147
|
+
|
148
|
+
# auth_names
|
149
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
150
|
+
|
151
|
+
new_options = opts.merge(
|
152
|
+
:operation => :"DatawarehouseApi.dry_run_report_queries",
|
153
|
+
:header_params => header_params,
|
154
|
+
:query_params => query_params,
|
155
|
+
:form_params => form_params,
|
156
|
+
:body => post_body,
|
157
|
+
:auth_names => auth_names,
|
158
|
+
:return_type => return_type
|
159
|
+
)
|
160
|
+
|
161
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#dry_run_report_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
164
|
+
end
|
165
|
+
return data, status_code, headers
|
166
|
+
end
|
167
|
+
|
99
168
|
# Execute the report queries
|
100
169
|
# Execute the report queries
|
101
170
|
# @param query_request [ReportExecuteQueriesRequest] Query request
|
@@ -54,6 +54,9 @@ module UltracartClient
|
|
54
54
|
# If true, the order is rejected the day after the last configured activity day
|
55
55
|
attr_accessor :reject_at_end
|
56
56
|
|
57
|
+
# Array of key/value pairs that when found in the response cause the rejection of the transaction.
|
58
|
+
attr_accessor :transaction_rejects
|
59
|
+
|
57
60
|
# True if the account is currently in trial mode. Set to false to exit trial mode.
|
58
61
|
attr_accessor :trial_mode
|
59
62
|
|
@@ -76,6 +79,7 @@ module UltracartClient
|
|
76
79
|
:'process_linked_accounts' => :'process_linked_accounts',
|
77
80
|
:'processing_percentage' => :'processing_percentage',
|
78
81
|
:'reject_at_end' => :'reject_at_end',
|
82
|
+
:'transaction_rejects' => :'transaction_rejects',
|
79
83
|
:'trial_mode' => :'trial_mode',
|
80
84
|
:'trial_mode_expiration_dts' => :'trial_mode_expiration_dts'
|
81
85
|
}
|
@@ -102,6 +106,7 @@ module UltracartClient
|
|
102
106
|
:'process_linked_accounts' => :'Boolean',
|
103
107
|
:'processing_percentage' => :'String',
|
104
108
|
:'reject_at_end' => :'Boolean',
|
109
|
+
:'transaction_rejects' => :'Array<AccountsReceivableRetryTransactionReject>',
|
105
110
|
:'trial_mode' => :'Boolean',
|
106
111
|
:'trial_mode_expiration_dts' => :'String'
|
107
112
|
}
|
@@ -184,6 +189,12 @@ module UltracartClient
|
|
184
189
|
self.reject_at_end = attributes[:'reject_at_end']
|
185
190
|
end
|
186
191
|
|
192
|
+
if attributes.key?(:'transaction_rejects')
|
193
|
+
if (value = attributes[:'transaction_rejects']).is_a?(Array)
|
194
|
+
self.transaction_rejects = value
|
195
|
+
end
|
196
|
+
end
|
197
|
+
|
187
198
|
if attributes.key?(:'trial_mode')
|
188
199
|
self.trial_mode = attributes[:'trial_mode']
|
189
200
|
end
|
@@ -224,6 +235,7 @@ module UltracartClient
|
|
224
235
|
process_linked_accounts == o.process_linked_accounts &&
|
225
236
|
processing_percentage == o.processing_percentage &&
|
226
237
|
reject_at_end == o.reject_at_end &&
|
238
|
+
transaction_rejects == o.transaction_rejects &&
|
227
239
|
trial_mode == o.trial_mode &&
|
228
240
|
trial_mode_expiration_dts == o.trial_mode_expiration_dts
|
229
241
|
end
|
@@ -237,7 +249,7 @@ module UltracartClient
|
|
237
249
|
# Calculates hash code according to all attributes.
|
238
250
|
# @return [Integer] Hash code
|
239
251
|
def hash
|
240
|
-
[active, allow_process_linked_accounts, cancel_auto_order, current_service_plan, daily_activity_list, managed_by_linked_account_merchant_id, merchant_id, notify_emails, notify_rejections, notify_successes, process_linked_accounts, processing_percentage, reject_at_end, trial_mode, trial_mode_expiration_dts].hash
|
252
|
+
[active, allow_process_linked_accounts, cancel_auto_order, current_service_plan, daily_activity_list, managed_by_linked_account_merchant_id, merchant_id, notify_emails, notify_rejections, notify_successes, process_linked_accounts, processing_percentage, reject_at_end, transaction_rejects, trial_mode, trial_mode_expiration_dts].hash
|
241
253
|
end
|
242
254
|
|
243
255
|
# Builds the object from hash
|
@@ -0,0 +1,230 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module UltracartClient
|
17
|
+
class AccountsReceivableRetryTransactionReject
|
18
|
+
# Transaction response name
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# Transaction response value
|
22
|
+
attr_accessor :value
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'name' => :'name',
|
28
|
+
:'value' => :'value'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'name' => :'String',
|
41
|
+
:'value' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::AccountsReceivableRetryTransactionReject` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::AccountsReceivableRetryTransactionReject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'name')
|
67
|
+
self.name = attributes[:'name']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'value')
|
71
|
+
self.value = attributes[:'value']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
name == o.name &&
|
94
|
+
value == o.value
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[name, value].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :Boolean
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = UltracartClient.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|