ultracart_api 3.10.126 → 3.10.128
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -5
- data/docs/AccountsReceivableRetryConfig.md +1 -0
- data/docs/AccountsReceivableRetryTransactionReject.md +9 -0
- data/docs/DatawarehouseApi.md +51 -0
- data/docs/Experiment.md +5 -0
- data/docs/ReportDryRunQueriesRequest.md +13 -0
- data/docs/ReportDryRunQueriesResponse.md +8 -0
- data/docs/ReportDryRunQueryResult.md +9 -0
- data/docs/ReportWebsocketEvent.md +1 -1
- data/lib/ultracart_api/api/datawarehouse_api.rb +55 -0
- data/lib/ultracart_api/models/accounts_receivable_retry_config.rb +13 -1
- data/lib/ultracart_api/models/accounts_receivable_retry_transaction_reject.rb +195 -0
- data/lib/ultracart_api/models/experiment.rb +63 -1
- data/lib/ultracart_api/models/report_dry_run_queries_request.rb +231 -0
- data/lib/ultracart_api/models/report_dry_run_queries_response.rb +186 -0
- data/lib/ultracart_api/models/{report_data_set_summary.rb → report_dry_run_query_result.rb} +8 -96
- data/lib/ultracart_api/models/report_websocket_event.rb +1 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +4 -1
- metadata +10 -4
- data/docs/ReportDataSetSummary.md +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9ca73e072cac1b8844e968ac94ff40d4322caf0e1fd9244379e52db08c83d62
|
4
|
+
data.tar.gz: 4fc40b58882fbe2ead07146dc1ebc3509fbd402b7335116875382c6ec98e9037
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 761868c21fe352b6e253846a468b4cbbb42774ce539e6830f9ab40440a506c6cb378f613377075ba6a67269459f7a99c5c16aca02cfda889af814c7b27d61a14
|
7
|
+
data.tar.gz: 17dd7f619459defc38ea676e415f21c87e366ceefca7cfaebbf0c16cfca81ee3d0773cc87c154d6433f0486a1745c2292cbff0d2a1657d270b18e1d476bfcbe1
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.10.
|
10
|
+
- Package version: 3.10.128
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-3.10.
|
27
|
+
gem install ./ultracart_api-3.10.128.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.128.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ultracart_api', '~> 3.10.
|
35
|
+
gem 'ultracart_api', '~> 3.10.128'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -205,6 +205,7 @@ Class | Method | HTTP request | Description
|
|
205
205
|
*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
|
206
206
|
*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
|
207
207
|
*UltracartClient::DatawarehouseApi* | [**delete_report**](docs/DatawarehouseApi.md#delete_report) | **DELETE** /datawarehouse/reports/{report_oid} | Delete a report
|
208
|
+
*UltracartClient::DatawarehouseApi* | [**dry_run_report_queries**](docs/DatawarehouseApi.md#dry_run_report_queries) | **PUT** /datawarehouse/reports/dryrun | Dry run the report queries
|
208
209
|
*UltracartClient::DatawarehouseApi* | [**execute_report_queries**](docs/DatawarehouseApi.md#execute_report_queries) | **PUT** /datawarehouse/reports/execute | Execute the report queries
|
209
210
|
*UltracartClient::DatawarehouseApi* | [**get_report**](docs/DatawarehouseApi.md#get_report) | **GET** /datawarehouse/reports/{report_oid} | Get a report
|
210
211
|
*UltracartClient::DatawarehouseApi* | [**get_report_data_set**](docs/DatawarehouseApi.md#get_report_data_set) | **GET** /datawarehouse/reports/dataset/{dataset_uuid} | Get a report data set
|
@@ -510,6 +511,7 @@ Class | Method | HTTP request | Description
|
|
510
511
|
- [UltracartClient::AccountsReceivableRetryStatMetrics](docs/AccountsReceivableRetryStatMetrics.md)
|
511
512
|
- [UltracartClient::AccountsReceivableRetryStatRevenue](docs/AccountsReceivableRetryStatRevenue.md)
|
512
513
|
- [UltracartClient::AccountsReceivableRetryStatsResponse](docs/AccountsReceivableRetryStatsResponse.md)
|
514
|
+
- [UltracartClient::AccountsReceivableRetryTransactionReject](docs/AccountsReceivableRetryTransactionReject.md)
|
513
515
|
- [UltracartClient::Activity](docs/Activity.md)
|
514
516
|
- [UltracartClient::AddLibraryItemRequest](docs/AddLibraryItemRequest.md)
|
515
517
|
- [UltracartClient::AdjustInternalCertificateRequest](docs/AdjustInternalCertificateRequest.md)
|
@@ -1138,9 +1140,11 @@ Class | Method | HTTP request | Description
|
|
1138
1140
|
- [UltracartClient::ReportDataSetResponse](docs/ReportDataSetResponse.md)
|
1139
1141
|
- [UltracartClient::ReportDataSetRow](docs/ReportDataSetRow.md)
|
1140
1142
|
- [UltracartClient::ReportDataSetSchema](docs/ReportDataSetSchema.md)
|
1141
|
-
- [UltracartClient::ReportDataSetSummary](docs/ReportDataSetSummary.md)
|
1142
1143
|
- [UltracartClient::ReportDataSource](docs/ReportDataSource.md)
|
1143
1144
|
- [UltracartClient::ReportDataSourceSchema](docs/ReportDataSourceSchema.md)
|
1145
|
+
- [UltracartClient::ReportDryRunQueriesRequest](docs/ReportDryRunQueriesRequest.md)
|
1146
|
+
- [UltracartClient::ReportDryRunQueriesResponse](docs/ReportDryRunQueriesResponse.md)
|
1147
|
+
- [UltracartClient::ReportDryRunQueryResult](docs/ReportDryRunQueryResult.md)
|
1144
1148
|
- [UltracartClient::ReportExecuteQueriesRequest](docs/ReportExecuteQueriesRequest.md)
|
1145
1149
|
- [UltracartClient::ReportFilter](docs/ReportFilter.md)
|
1146
1150
|
- [UltracartClient::ReportFilterConnection](docs/ReportFilterConnection.md)
|
@@ -1340,6 +1344,8 @@ Not every change is committed to every SDK.
|
|
1340
1344
|
|
1341
1345
|
| Version | Date | Comments |
|
1342
1346
|
| --: | :-: | --- |
|
1347
|
+
| 3.10.128 | 04/10/2023 | data warehouse internal dev |
|
1348
|
+
| 3.10.127 | 03/29/2023 | internal development |
|
1343
1349
|
| 3.10.126 | 03/22/2023 | data warehouse internal dev |
|
1344
1350
|
| 3.10.125 | 03/22/2023 | dw initial framework |
|
1345
1351
|
| 3.10.124 | 03/22/2023 | order api - refundable response added manual_because_multiple_charges boolean field |
|
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
|
16
16
|
**process_linked_accounts** | **BOOLEAN** | If true, all linked accounts are also processed using the same rules. | [optional]
|
17
17
|
**processing_percentage** | **String** | The percentage rate charged for the service. | [optional]
|
18
18
|
**reject_at_end** | **BOOLEAN** | If true, the order is rejected the day after the last configured activity day | [optional]
|
19
|
+
**transaction_rejects** | [**Array<AccountsReceivableRetryTransactionReject>**](AccountsReceivableRetryTransactionReject.md) | Array of key/value pairs that when found in the response cause the rejection of the transaction. | [optional]
|
19
20
|
**trial_mode** | **BOOLEAN** | True if the account is currently in trial mode. Set to false to exit trial mode. | [optional]
|
20
21
|
**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]
|
21
22
|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# UltracartClient::AccountsReceivableRetryTransactionReject
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**name** | **String** | Transaction response name | [optional]
|
7
|
+
**value** | **String** | Transaction response value | [optional]
|
8
|
+
|
9
|
+
|
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
|
@@ -64,6 +65,56 @@ nil (empty response body)
|
|
64
65
|
|
65
66
|
|
66
67
|
|
68
|
+
# **dry_run_report_queries**
|
69
|
+
> ReportDryRunQueriesResponse dry_run_report_queries(query_request)
|
70
|
+
|
71
|
+
Dry run the report queries
|
72
|
+
|
73
|
+
Dry run the report queries
|
74
|
+
|
75
|
+
### Example
|
76
|
+
```ruby
|
77
|
+
# load the gem
|
78
|
+
require 'ultracart_api'
|
79
|
+
|
80
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
81
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
82
|
+
api_instance = UltracartClient::DatawarehouseApi.new_using_api_key(simple_key, false, false)
|
83
|
+
|
84
|
+
|
85
|
+
query_request = UltracartClient::ReportDryRunQueriesRequest.new # ReportDryRunQueriesRequest | Dry run request
|
86
|
+
|
87
|
+
|
88
|
+
begin
|
89
|
+
#Dry run the report queries
|
90
|
+
result = api_instance.dry_run_report_queries(query_request)
|
91
|
+
p result
|
92
|
+
rescue UltracartClient::ApiError => e
|
93
|
+
puts "Exception when calling DatawarehouseApi->dry_run_report_queries: #{e}"
|
94
|
+
end
|
95
|
+
```
|
96
|
+
|
97
|
+
### Parameters
|
98
|
+
|
99
|
+
Name | Type | Description | Notes
|
100
|
+
------------- | ------------- | ------------- | -------------
|
101
|
+
**query_request** | [**ReportDryRunQueriesRequest**](ReportDryRunQueriesRequest.md)| Dry run request |
|
102
|
+
|
103
|
+
### Return type
|
104
|
+
|
105
|
+
[**ReportDryRunQueriesResponse**](ReportDryRunQueriesResponse.md)
|
106
|
+
|
107
|
+
### Authorization
|
108
|
+
|
109
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
110
|
+
|
111
|
+
### HTTP request headers
|
112
|
+
|
113
|
+
- **Content-Type**: application/json
|
114
|
+
- **Accept**: application/json
|
115
|
+
|
116
|
+
|
117
|
+
|
67
118
|
# **execute_report_queries**
|
68
119
|
> execute_report_queries(query_request)
|
69
120
|
|
data/docs/Experiment.md
CHANGED
@@ -13,7 +13,12 @@ Name | Type | Description | Notes
|
|
13
13
|
**notes** | **String** | Notes about the experiment | [optional]
|
14
14
|
**objective** | **String** | Objective that is being optimized | [optional]
|
15
15
|
**objective_parameter** | **String** | Objective parameter (such as event name) that is being optimized | [optional]
|
16
|
+
**openai_current_iteration** | **Integer** | The current iteration of the OpenAI related experiment | [optional]
|
17
|
+
**openai_element_type** | **String** | The type of OpenAI element being experimented on | [optional]
|
18
|
+
**openai_model** | **String** | The type of OpenAI model used | [optional]
|
19
|
+
**openai_total_iterations** | **Integer** | The total number of iterations to perform on the experiment | [optional]
|
16
20
|
**optimization_type** | **String** | Type of optimization | [optional]
|
21
|
+
**p_value** | **Float** | Statistics p-value for the experiment | [optional]
|
17
22
|
**session_count** | **Integer** | Total number of sessions in the experiment | [optional]
|
18
23
|
**start_dts** | **String** | Start date/time | [optional]
|
19
24
|
**status** | **String** | Status of the experiment | [optional]
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# UltracartClient::ReportDryRunQueriesRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**connection_id** | **String** | | [optional]
|
7
|
+
**default_dataset_id** | **String** | | [optional]
|
8
|
+
**default_project_id** | **String** | | [optional]
|
9
|
+
**merchant_id** | **String** | | [optional]
|
10
|
+
**queries** | [**Array<ReportDataSetQuery>**](ReportDataSetQuery.md) | | [optional]
|
11
|
+
**security_level** | **String** | | [optional]
|
12
|
+
|
13
|
+
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# UltracartClient::ReportDryRunQueriesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**dry_run_query_results** | [**Array<ReportDryRunQueryResult>**](ReportDryRunQueryResult.md) | | [optional]
|
7
|
+
|
8
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# UltracartClient::ReportDryRunQueryResult
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**error_message** | **String** | | [optional]
|
7
|
+
**total_bytes_processed** | **Integer** | | [optional]
|
8
|
+
|
9
|
+
|
@@ -4,6 +4,6 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**event_type** | **String** | Event type | [optional]
|
7
|
-
**query_completion** | [**
|
7
|
+
**query_completion** | [**ReportDataSet**](ReportDataSet.md) | | [optional]
|
8
8
|
|
9
9
|
|
@@ -86,6 +86,61 @@ module UltracartClient
|
|
86
86
|
end
|
87
87
|
return data, status_code, headers
|
88
88
|
end
|
89
|
+
# Dry run the report queries
|
90
|
+
# Dry run the report queries
|
91
|
+
# @param query_request Dry run request
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [ReportDryRunQueriesResponse]
|
94
|
+
def dry_run_report_queries(query_request, opts = {})
|
95
|
+
data, _status_code, _headers = dry_run_report_queries_with_http_info(query_request, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Dry run the report queries
|
100
|
+
# Dry run the report queries
|
101
|
+
# @param query_request Dry run request
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(ReportDryRunQueriesResponse, Fixnum, Hash)>] ReportDryRunQueriesResponse data, response status code and response headers
|
104
|
+
def dry_run_report_queries_with_http_info(query_request, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.dry_run_report_queries ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'query_request' is set
|
109
|
+
if @api_client.config.client_side_validation && query_request.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'query_request' when calling DatawarehouseApi.dry_run_report_queries"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/datawarehouse/reports/dryrun'
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = {}
|
120
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
121
|
+
# HTTP header 'Accept' (if needed)
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
123
|
+
# HTTP header 'Content-Type'
|
124
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
125
|
+
|
126
|
+
# form parameters
|
127
|
+
form_params = {}
|
128
|
+
|
129
|
+
# http body (model)
|
130
|
+
post_body = @api_client.object_to_http_body(query_request)
|
131
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
132
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
133
|
+
:header_params => header_params,
|
134
|
+
:query_params => query_params,
|
135
|
+
:form_params => form_params,
|
136
|
+
:body => post_body,
|
137
|
+
:auth_names => auth_names,
|
138
|
+
:return_type => 'ReportDryRunQueriesResponse')
|
139
|
+
if @api_client.config.debugging
|
140
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#dry_run_report_queries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
141
|
+
end
|
142
|
+
return data, status_code, headers
|
143
|
+
end
|
89
144
|
# Execute the report queries
|
90
145
|
# Execute the report queries
|
91
146
|
# @param query_request Query request
|
@@ -53,6 +53,9 @@ module UltracartClient
|
|
53
53
|
# If true, the order is rejected the day after the last configured activity day
|
54
54
|
attr_accessor :reject_at_end
|
55
55
|
|
56
|
+
# Array of key/value pairs that when found in the response cause the rejection of the transaction.
|
57
|
+
attr_accessor :transaction_rejects
|
58
|
+
|
56
59
|
# True if the account is currently in trial mode. Set to false to exit trial mode.
|
57
60
|
attr_accessor :trial_mode
|
58
61
|
|
@@ -75,6 +78,7 @@ module UltracartClient
|
|
75
78
|
:'process_linked_accounts' => :'process_linked_accounts',
|
76
79
|
:'processing_percentage' => :'processing_percentage',
|
77
80
|
:'reject_at_end' => :'reject_at_end',
|
81
|
+
:'transaction_rejects' => :'transaction_rejects',
|
78
82
|
:'trial_mode' => :'trial_mode',
|
79
83
|
:'trial_mode_expiration_dts' => :'trial_mode_expiration_dts'
|
80
84
|
}
|
@@ -96,6 +100,7 @@ module UltracartClient
|
|
96
100
|
:'process_linked_accounts' => :'BOOLEAN',
|
97
101
|
:'processing_percentage' => :'String',
|
98
102
|
:'reject_at_end' => :'BOOLEAN',
|
103
|
+
:'transaction_rejects' => :'Array<AccountsReceivableRetryTransactionReject>',
|
99
104
|
:'trial_mode' => :'BOOLEAN',
|
100
105
|
:'trial_mode_expiration_dts' => :'String'
|
101
106
|
}
|
@@ -165,6 +170,12 @@ module UltracartClient
|
|
165
170
|
self.reject_at_end = attributes[:'reject_at_end']
|
166
171
|
end
|
167
172
|
|
173
|
+
if attributes.has_key?(:'transaction_rejects')
|
174
|
+
if (value = attributes[:'transaction_rejects']).is_a?(Array)
|
175
|
+
self.transaction_rejects = value
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
168
179
|
if attributes.has_key?(:'trial_mode')
|
169
180
|
self.trial_mode = attributes[:'trial_mode']
|
170
181
|
end
|
@@ -205,6 +216,7 @@ module UltracartClient
|
|
205
216
|
process_linked_accounts == o.process_linked_accounts &&
|
206
217
|
processing_percentage == o.processing_percentage &&
|
207
218
|
reject_at_end == o.reject_at_end &&
|
219
|
+
transaction_rejects == o.transaction_rejects &&
|
208
220
|
trial_mode == o.trial_mode &&
|
209
221
|
trial_mode_expiration_dts == o.trial_mode_expiration_dts
|
210
222
|
end
|
@@ -218,7 +230,7 @@ module UltracartClient
|
|
218
230
|
# Calculates hash code according to all attributes.
|
219
231
|
# @return [Fixnum] Hash code
|
220
232
|
def hash
|
221
|
-
[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
|
233
|
+
[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
|
222
234
|
end
|
223
235
|
|
224
236
|
# Builds the object from hash
|
@@ -0,0 +1,195 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class AccountsReceivableRetryTransactionReject
|
17
|
+
# Transaction response name
|
18
|
+
attr_accessor :name
|
19
|
+
|
20
|
+
# Transaction response value
|
21
|
+
attr_accessor :value
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'name' => :'name',
|
27
|
+
:'value' => :'value'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'name' => :'String',
|
35
|
+
:'value' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'name')
|
48
|
+
self.name = attributes[:'name']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'value')
|
52
|
+
self.value = attributes[:'value']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
name == o.name &&
|
75
|
+
value == o.value
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[name, value].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
97
|
+
# check to ensure the input is an array given that the attribute
|
98
|
+
# is documented as an array but the input is not
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
DateTime.parse(value)
|
118
|
+
when :Date
|
119
|
+
Date.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
temp_model = UltracartClient.const_get(type).new
|
148
|
+
temp_model.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
next if value.nil?
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
@@ -44,9 +44,24 @@ module UltracartClient
|
|
44
44
|
# Objective parameter (such as event name) that is being optimized
|
45
45
|
attr_accessor :objective_parameter
|
46
46
|
|
47
|
+
# The current iteration of the OpenAI related experiment
|
48
|
+
attr_accessor :openai_current_iteration
|
49
|
+
|
50
|
+
# The type of OpenAI element being experimented on
|
51
|
+
attr_accessor :openai_element_type
|
52
|
+
|
53
|
+
# The type of OpenAI model used
|
54
|
+
attr_accessor :openai_model
|
55
|
+
|
56
|
+
# The total number of iterations to perform on the experiment
|
57
|
+
attr_accessor :openai_total_iterations
|
58
|
+
|
47
59
|
# Type of optimization
|
48
60
|
attr_accessor :optimization_type
|
49
61
|
|
62
|
+
# Statistics p-value for the experiment
|
63
|
+
attr_accessor :p_value
|
64
|
+
|
50
65
|
# Total number of sessions in the experiment
|
51
66
|
attr_accessor :session_count
|
52
67
|
|
@@ -103,7 +118,12 @@ module UltracartClient
|
|
103
118
|
:'notes' => :'notes',
|
104
119
|
:'objective' => :'objective',
|
105
120
|
:'objective_parameter' => :'objective_parameter',
|
121
|
+
:'openai_current_iteration' => :'openai_current_iteration',
|
122
|
+
:'openai_element_type' => :'openai_element_type',
|
123
|
+
:'openai_model' => :'openai_model',
|
124
|
+
:'openai_total_iterations' => :'openai_total_iterations',
|
106
125
|
:'optimization_type' => :'optimization_type',
|
126
|
+
:'p_value' => :'p_value',
|
107
127
|
:'session_count' => :'session_count',
|
108
128
|
:'start_dts' => :'start_dts',
|
109
129
|
:'status' => :'status',
|
@@ -127,7 +147,12 @@ module UltracartClient
|
|
127
147
|
:'notes' => :'String',
|
128
148
|
:'objective' => :'String',
|
129
149
|
:'objective_parameter' => :'String',
|
150
|
+
:'openai_current_iteration' => :'Integer',
|
151
|
+
:'openai_element_type' => :'String',
|
152
|
+
:'openai_model' => :'String',
|
153
|
+
:'openai_total_iterations' => :'Integer',
|
130
154
|
:'optimization_type' => :'String',
|
155
|
+
:'p_value' => :'Float',
|
131
156
|
:'session_count' => :'Integer',
|
132
157
|
:'start_dts' => :'String',
|
133
158
|
:'status' => :'String',
|
@@ -186,10 +211,30 @@ module UltracartClient
|
|
186
211
|
self.objective_parameter = attributes[:'objective_parameter']
|
187
212
|
end
|
188
213
|
|
214
|
+
if attributes.has_key?(:'openai_current_iteration')
|
215
|
+
self.openai_current_iteration = attributes[:'openai_current_iteration']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.has_key?(:'openai_element_type')
|
219
|
+
self.openai_element_type = attributes[:'openai_element_type']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes.has_key?(:'openai_model')
|
223
|
+
self.openai_model = attributes[:'openai_model']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes.has_key?(:'openai_total_iterations')
|
227
|
+
self.openai_total_iterations = attributes[:'openai_total_iterations']
|
228
|
+
end
|
229
|
+
|
189
230
|
if attributes.has_key?(:'optimization_type')
|
190
231
|
self.optimization_type = attributes[:'optimization_type']
|
191
232
|
end
|
192
233
|
|
234
|
+
if attributes.has_key?(:'p_value')
|
235
|
+
self.p_value = attributes[:'p_value']
|
236
|
+
end
|
237
|
+
|
193
238
|
if attributes.has_key?(:'session_count')
|
194
239
|
self.session_count = attributes[:'session_count']
|
195
240
|
end
|
@@ -231,11 +276,23 @@ module UltracartClient
|
|
231
276
|
# Check to see if the all the properties in the model are valid
|
232
277
|
# @return true if the model is valid
|
233
278
|
def valid?
|
279
|
+
openai_element_type_validator = EnumAttributeValidator.new('String', ['headline', 'text', 'textblock'])
|
280
|
+
return false unless openai_element_type_validator.valid?(@openai_element_type)
|
234
281
|
status_validator = EnumAttributeValidator.new('String', ['Running', 'Ended', 'Deleted'])
|
235
282
|
return false unless status_validator.valid?(@status)
|
236
283
|
true
|
237
284
|
end
|
238
285
|
|
286
|
+
# Custom attribute writer method checking allowed values (enum).
|
287
|
+
# @param [Object] openai_element_type Object to be assigned
|
288
|
+
def openai_element_type=(openai_element_type)
|
289
|
+
validator = EnumAttributeValidator.new('String', ['headline', 'text', 'textblock'])
|
290
|
+
unless validator.valid?(openai_element_type)
|
291
|
+
fail ArgumentError, 'invalid value for "openai_element_type", must be one of #{validator.allowable_values}.'
|
292
|
+
end
|
293
|
+
@openai_element_type = openai_element_type
|
294
|
+
end
|
295
|
+
|
239
296
|
# Custom attribute writer method checking allowed values (enum).
|
240
297
|
# @param [Object] status Object to be assigned
|
241
298
|
def status=(status)
|
@@ -261,7 +318,12 @@ module UltracartClient
|
|
261
318
|
notes == o.notes &&
|
262
319
|
objective == o.objective &&
|
263
320
|
objective_parameter == o.objective_parameter &&
|
321
|
+
openai_current_iteration == o.openai_current_iteration &&
|
322
|
+
openai_element_type == o.openai_element_type &&
|
323
|
+
openai_model == o.openai_model &&
|
324
|
+
openai_total_iterations == o.openai_total_iterations &&
|
264
325
|
optimization_type == o.optimization_type &&
|
326
|
+
p_value == o.p_value &&
|
265
327
|
session_count == o.session_count &&
|
266
328
|
start_dts == o.start_dts &&
|
267
329
|
status == o.status &&
|
@@ -280,7 +342,7 @@ module UltracartClient
|
|
280
342
|
# Calculates hash code according to all attributes.
|
281
343
|
# @return [Fixnum] Hash code
|
282
344
|
def hash
|
283
|
-
[container_id, duration_days, end_dts, equal_weighting, experiment_type, id, name, notes, objective, objective_parameter, optimization_type, session_count, start_dts, status, storefront_experiment_oid, storefront_oid, uri, variations].hash
|
345
|
+
[container_id, duration_days, end_dts, equal_weighting, experiment_type, id, name, notes, objective, objective_parameter, openai_current_iteration, openai_element_type, openai_model, openai_total_iterations, optimization_type, p_value, session_count, start_dts, status, storefront_experiment_oid, storefront_oid, uri, variations].hash
|
284
346
|
end
|
285
347
|
|
286
348
|
# Builds the object from hash
|