ultracart_api 4.0.168 → 4.0.170
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/EmailSettings.md +6 -0
- data/docs/OrderApi.md +72 -0
- data/docs/OrderValidationRequest.md +20 -0
- data/docs/OrderValidationResponse.md +22 -0
- data/docs/Report.md +3 -1
- data/docs/ReportPage.md +2 -0
- data/lib/ultracart_api/api/order_api.rb +69 -0
- data/lib/ultracart_api/models/email_settings.rb +31 -1
- data/lib/ultracart_api/models/order_payment.rb +2 -2
- data/lib/ultracart_api/models/order_query.rb +2 -2
- data/lib/ultracart_api/models/order_validation_request.rb +231 -0
- data/lib/ultracart_api/models/order_validation_response.rb +244 -0
- data/lib/ultracart_api/models/report.rb +14 -4
- data/lib/ultracart_api/models/report_page.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76a33947e5bbde6082f7f06278ba13a5c6b416a87cd3f7911fd110cef96c4de2
|
4
|
+
data.tar.gz: 631b119358cbfa47dec4a36c3081b6c9d83c5cfe06d2361f3984b62356bd42c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ea3e533397ec735346bceac15c6af08b983a83e3d3b72c8b3a8a3efdd058f0e6f740312af66ec06756a8b590d7bef7089a275dd3c1731ada5abf0f7635c867f
|
7
|
+
data.tar.gz: 89f0cff54845504a25c4a8898897abab5725feb5a0f18edd05d79b7741a1f048f3e99672610f4316d0a7106a7e9c8adfe7c47f596c4c81e6f57bba72eaf92228
|
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.170
|
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.170.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.170.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.170'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -289,6 +289,7 @@ Class | Method | HTTP request | Description
|
|
289
289
|
*UltracartClient::OrderApi* | [**resend_shipment_confirmation**](docs/OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
|
290
290
|
*UltracartClient::OrderApi* | [**update_accounts_receivable_retry_config**](docs/OrderApi.md#update_accounts_receivable_retry_config) | **POST** /order/accountsReceivableRetryConfig | Update A/R Retry Configuration
|
291
291
|
*UltracartClient::OrderApi* | [**update_order**](docs/OrderApi.md#update_order) | **PUT** /order/orders/{order_id} | Update an order
|
292
|
+
*UltracartClient::OrderApi* | [**validate_order**](docs/OrderApi.md#validate_order) | **POST** /order/validate | Validate
|
292
293
|
*UltracartClient::SsoApi* | [**get_sso_session_user**](docs/SsoApi.md#get_sso_session_user) | **GET** /sso/session/user | Get single sign on session user
|
293
294
|
*UltracartClient::SsoApi* | [**sso_authorize**](docs/SsoApi.md#sso_authorize) | **PUT** /sso/authorize | Authorize a single sign on session
|
294
295
|
*UltracartClient::SsoApi* | [**sso_session_revoke**](docs/SsoApi.md#sso_session_revoke) | **DELETE** /sso/session/revoke | Revoke single sign on session
|
@@ -1134,6 +1135,8 @@ Class | Method | HTTP request | Description
|
|
1134
1135
|
- [UltracartClient::OrderTrackingNumberDetails](docs/OrderTrackingNumberDetails.md)
|
1135
1136
|
- [UltracartClient::OrderTransactionalMerchantNote](docs/OrderTransactionalMerchantNote.md)
|
1136
1137
|
- [UltracartClient::OrderUtm](docs/OrderUtm.md)
|
1138
|
+
- [UltracartClient::OrderValidationRequest](docs/OrderValidationRequest.md)
|
1139
|
+
- [UltracartClient::OrderValidationResponse](docs/OrderValidationResponse.md)
|
1137
1140
|
- [UltracartClient::OrdersResponse](docs/OrdersResponse.md)
|
1138
1141
|
- [UltracartClient::Permission](docs/Permission.md)
|
1139
1142
|
- [UltracartClient::PointOfSaleLocation](docs/PointOfSaleLocation.md)
|
@@ -1365,6 +1368,8 @@ Not every change is committed to every SDK.
|
|
1365
1368
|
|
1366
1369
|
| Version | Date | Comments |
|
1367
1370
|
| --: | :-: | --- |
|
1371
|
+
| 4.0.170 | 08/14/2023 | esp - expose rate limiter values in settings object |
|
1372
|
+
| 4.0.169 | 07/27/2023 | dw bi - add settings to the report and page objects |
|
1368
1373
|
| 4.0.168 | 07/19/2023 | dw bi - add data_source_uuid to filter connection obj |
|
1369
1374
|
| 4.0.167 | 07/19/2023 | dw bi - add data_source_uuid to page visualization obj |
|
1370
1375
|
| 4.0.166 | 07/19/2023 | dw bi - add data_source_uuid to report data source |
|
data/docs/EmailSettings.md
CHANGED
@@ -4,6 +4,9 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **emails_per_day** | **Integer** | Emails per day allowed | [optional] |
|
8
|
+
| **emails_per_hour** | **Integer** | Emails per hour allowed | [optional] |
|
9
|
+
| **emails_per_month** | **Integer** | Emails per month allowed | [optional] |
|
7
10
|
| **marketing_esp_domain_user** | **String** | | [optional] |
|
8
11
|
| **marketing_esp_domain_uuid** | **String** | | [optional] |
|
9
12
|
| **marketing_esp_friendly_name** | **String** | | [optional] |
|
@@ -26,6 +29,9 @@
|
|
26
29
|
require 'ultracart_api'
|
27
30
|
|
28
31
|
instance = UltracartClient::EmailSettings.new(
|
32
|
+
emails_per_day: null,
|
33
|
+
emails_per_hour: null,
|
34
|
+
emails_per_month: null,
|
29
35
|
marketing_esp_domain_user: null,
|
30
36
|
marketing_esp_domain_uuid: null,
|
31
37
|
marketing_esp_friendly_name: null,
|
data/docs/OrderApi.md
CHANGED
@@ -30,6 +30,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
30
30
|
| [**resend_shipment_confirmation**](OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation |
|
31
31
|
| [**update_accounts_receivable_retry_config**](OrderApi.md#update_accounts_receivable_retry_config) | **POST** /order/accountsReceivableRetryConfig | Update A/R Retry Configuration |
|
32
32
|
| [**update_order**](OrderApi.md#update_order) | **PUT** /order/orders/{order_id} | Update an order |
|
33
|
+
| [**validate_order**](OrderApi.md#validate_order) | **POST** /order/validate | Validate |
|
33
34
|
|
34
35
|
|
35
36
|
## adjust_order_total
|
@@ -2009,3 +2010,74 @@ end
|
|
2009
2010
|
- **Content-Type**: application/json; charset=UTF-8
|
2010
2011
|
- **Accept**: application/json
|
2011
2012
|
|
2013
|
+
|
2014
|
+
## validate_order
|
2015
|
+
|
2016
|
+
> <OrderValidationResponse> validate_order(validation_request)
|
2017
|
+
|
2018
|
+
Validate
|
2019
|
+
|
2020
|
+
Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
2021
|
+
|
2022
|
+
### Examples
|
2023
|
+
|
2024
|
+
```ruby
|
2025
|
+
require 'time'
|
2026
|
+
require 'ultracart_api'
|
2027
|
+
require 'json'
|
2028
|
+
require 'yaml'
|
2029
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
2030
|
+
|
2031
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
2032
|
+
# As such, this might not be the best way to use this object.
|
2033
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
2034
|
+
|
2035
|
+
api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
2036
|
+
validation_request = UltracartClient::OrderValidationRequest.new # OrderValidationRequest | Validation request
|
2037
|
+
|
2038
|
+
begin
|
2039
|
+
# Validate
|
2040
|
+
result = api_instance.validate_order(validation_request)
|
2041
|
+
p result
|
2042
|
+
rescue UltracartClient::ApiError => e
|
2043
|
+
puts "Error when calling OrderApi->validate_order: #{e}"
|
2044
|
+
end
|
2045
|
+
```
|
2046
|
+
|
2047
|
+
#### Using the validate_order_with_http_info variant
|
2048
|
+
|
2049
|
+
This returns an Array which contains the response data, status code and headers.
|
2050
|
+
|
2051
|
+
> <Array(<OrderValidationResponse>, Integer, Hash)> validate_order_with_http_info(validation_request)
|
2052
|
+
|
2053
|
+
```ruby
|
2054
|
+
begin
|
2055
|
+
# Validate
|
2056
|
+
data, status_code, headers = api_instance.validate_order_with_http_info(validation_request)
|
2057
|
+
p status_code # => 2xx
|
2058
|
+
p headers # => { ... }
|
2059
|
+
p data # => <OrderValidationResponse>
|
2060
|
+
rescue UltracartClient::ApiError => e
|
2061
|
+
puts "Error when calling OrderApi->validate_order_with_http_info: #{e}"
|
2062
|
+
end
|
2063
|
+
```
|
2064
|
+
|
2065
|
+
### Parameters
|
2066
|
+
|
2067
|
+
| Name | Type | Description | Notes |
|
2068
|
+
| ---- | ---- | ----------- | ----- |
|
2069
|
+
| **validation_request** | [**OrderValidationRequest**](OrderValidationRequest.md) | Validation request | |
|
2070
|
+
|
2071
|
+
### Return type
|
2072
|
+
|
2073
|
+
[**OrderValidationResponse**](OrderValidationResponse.md)
|
2074
|
+
|
2075
|
+
### Authorization
|
2076
|
+
|
2077
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
2078
|
+
|
2079
|
+
### HTTP request headers
|
2080
|
+
|
2081
|
+
- **Content-Type**: application/json
|
2082
|
+
- **Accept**: application/json
|
2083
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# UltracartClient::OrderValidationRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **checks** | **Array<String>** | Checks to perform | [optional] |
|
8
|
+
| **order** | [**Order**](Order.md) | | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ultracart_api'
|
14
|
+
|
15
|
+
instance = UltracartClient::OrderValidationRequest.new(
|
16
|
+
checks: null,
|
17
|
+
order: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# UltracartClient::OrderValidationResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **errors** | **Array<String>** | Errors to display to the merchant if they failed any of the validations checked | [optional] |
|
8
|
+
| **messages** | **Array<String>** | Informational messages | [optional] |
|
9
|
+
| **order_was_updated** | **Boolean** | If true, this order was updated during the validation call. This may happen during address standardization fixes. | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'ultracart_api'
|
15
|
+
|
16
|
+
instance = UltracartClient::OrderValidationResponse.new(
|
17
|
+
errors: null,
|
18
|
+
messages: null,
|
19
|
+
order_was_updated: null
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/docs/Report.md
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
| **pages** | [**Array<ReportPage>**](ReportPage.md) | | [optional] |
|
15
15
|
| **report_oid** | **Integer** | Object identifier for this report. | [optional] |
|
16
16
|
| **security_level** | **String** | Security level to execute report under | [optional] |
|
17
|
+
| **settings** | **String** | A JSON representation of the settings for this report | [optional] |
|
17
18
|
|
18
19
|
## Example
|
19
20
|
|
@@ -30,7 +31,8 @@ instance = UltracartClient::Report.new(
|
|
30
31
|
name: null,
|
31
32
|
pages: null,
|
32
33
|
report_oid: null,
|
33
|
-
security_level: null
|
34
|
+
security_level: null,
|
35
|
+
settings: null
|
34
36
|
)
|
35
37
|
```
|
36
38
|
|
data/docs/ReportPage.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **filters** | [**Array<ReportPageFilter>**](ReportPageFilter.md) | | [optional] |
|
8
8
|
| **height** | **Float** | Height of the report page in inches | [optional] |
|
9
|
+
| **settings** | **String** | A JSON representation of the settings for this report | [optional] |
|
9
10
|
| **title** | **String** | | [optional] |
|
10
11
|
| **visualizations** | [**Array<ReportPageVisualization>**](ReportPageVisualization.md) | Visualizations on the report page. | [optional] |
|
11
12
|
| **width** | **Float** | Width of the report page in inches | [optional] |
|
@@ -18,6 +19,7 @@ require 'ultracart_api'
|
|
18
19
|
instance = UltracartClient::ReportPage.new(
|
19
20
|
filters: null,
|
20
21
|
height: null,
|
22
|
+
settings: null,
|
21
23
|
title: null,
|
22
24
|
visualizations: null,
|
23
25
|
width: null
|
@@ -1925,5 +1925,74 @@ module UltracartClient
|
|
1925
1925
|
end
|
1926
1926
|
return data, status_code, headers
|
1927
1927
|
end
|
1928
|
+
|
1929
|
+
# Validate
|
1930
|
+
# Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
1931
|
+
# @param validation_request [OrderValidationRequest] Validation request
|
1932
|
+
# @param [Hash] opts the optional parameters
|
1933
|
+
# @return [OrderValidationResponse]
|
1934
|
+
def validate_order(validation_request, opts = {})
|
1935
|
+
data, _status_code, _headers = validate_order_with_http_info(validation_request, opts)
|
1936
|
+
data
|
1937
|
+
end
|
1938
|
+
|
1939
|
+
# Validate
|
1940
|
+
# Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
1941
|
+
# @param validation_request [OrderValidationRequest] Validation request
|
1942
|
+
# @param [Hash] opts the optional parameters
|
1943
|
+
# @return [Array<(OrderValidationResponse, Integer, Hash)>] OrderValidationResponse data, response status code and response headers
|
1944
|
+
def validate_order_with_http_info(validation_request, opts = {})
|
1945
|
+
if @api_client.config.debugging
|
1946
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.validate_order ...'
|
1947
|
+
end
|
1948
|
+
# verify the required parameter 'validation_request' is set
|
1949
|
+
if @api_client.config.client_side_validation && validation_request.nil?
|
1950
|
+
fail ArgumentError, "Missing the required parameter 'validation_request' when calling OrderApi.validate_order"
|
1951
|
+
end
|
1952
|
+
# resource path
|
1953
|
+
local_var_path = '/order/validate'
|
1954
|
+
|
1955
|
+
# query parameters
|
1956
|
+
query_params = opts[:query_params] || {}
|
1957
|
+
|
1958
|
+
# header parameters
|
1959
|
+
header_params = opts[:header_params] || {}
|
1960
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1961
|
+
# HTTP header 'Accept' (if needed)
|
1962
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1963
|
+
# HTTP header 'Content-Type'
|
1964
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1965
|
+
if !content_type.nil?
|
1966
|
+
header_params['Content-Type'] = content_type
|
1967
|
+
end
|
1968
|
+
|
1969
|
+
# form parameters
|
1970
|
+
form_params = opts[:form_params] || {}
|
1971
|
+
|
1972
|
+
# http body (model)
|
1973
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(validation_request)
|
1974
|
+
|
1975
|
+
# return_type
|
1976
|
+
return_type = opts[:debug_return_type] || 'OrderValidationResponse'
|
1977
|
+
|
1978
|
+
# auth_names
|
1979
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1980
|
+
|
1981
|
+
new_options = opts.merge(
|
1982
|
+
:operation => :"OrderApi.validate_order",
|
1983
|
+
:header_params => header_params,
|
1984
|
+
:query_params => query_params,
|
1985
|
+
:form_params => form_params,
|
1986
|
+
:body => post_body,
|
1987
|
+
:auth_names => auth_names,
|
1988
|
+
:return_type => return_type
|
1989
|
+
)
|
1990
|
+
|
1991
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1992
|
+
if @api_client.config.debugging
|
1993
|
+
@api_client.config.logger.debug "API called: OrderApi#validate_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1994
|
+
end
|
1995
|
+
return data, status_code, headers
|
1996
|
+
end
|
1928
1997
|
end
|
1929
1998
|
end
|
@@ -15,6 +15,15 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class EmailSettings
|
18
|
+
# Emails per day allowed
|
19
|
+
attr_accessor :emails_per_day
|
20
|
+
|
21
|
+
# Emails per hour allowed
|
22
|
+
attr_accessor :emails_per_hour
|
23
|
+
|
24
|
+
# Emails per month allowed
|
25
|
+
attr_accessor :emails_per_month
|
26
|
+
|
18
27
|
attr_accessor :marketing_esp_domain_user
|
19
28
|
|
20
29
|
attr_accessor :marketing_esp_domain_uuid
|
@@ -49,6 +58,9 @@ module UltracartClient
|
|
49
58
|
# Attribute mapping from ruby-style variable name to JSON key.
|
50
59
|
def self.attribute_map
|
51
60
|
{
|
61
|
+
:'emails_per_day' => :'emails_per_day',
|
62
|
+
:'emails_per_hour' => :'emails_per_hour',
|
63
|
+
:'emails_per_month' => :'emails_per_month',
|
52
64
|
:'marketing_esp_domain_user' => :'marketing_esp_domain_user',
|
53
65
|
:'marketing_esp_domain_uuid' => :'marketing_esp_domain_uuid',
|
54
66
|
:'marketing_esp_friendly_name' => :'marketing_esp_friendly_name',
|
@@ -75,6 +87,9 @@ module UltracartClient
|
|
75
87
|
# Attribute type mapping.
|
76
88
|
def self.openapi_types
|
77
89
|
{
|
90
|
+
:'emails_per_day' => :'Integer',
|
91
|
+
:'emails_per_hour' => :'Integer',
|
92
|
+
:'emails_per_month' => :'Integer',
|
78
93
|
:'marketing_esp_domain_user' => :'String',
|
79
94
|
:'marketing_esp_domain_uuid' => :'String',
|
80
95
|
:'marketing_esp_friendly_name' => :'String',
|
@@ -114,6 +129,18 @@ module UltracartClient
|
|
114
129
|
h[k.to_sym] = v
|
115
130
|
}
|
116
131
|
|
132
|
+
if attributes.key?(:'emails_per_day')
|
133
|
+
self.emails_per_day = attributes[:'emails_per_day']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'emails_per_hour')
|
137
|
+
self.emails_per_hour = attributes[:'emails_per_hour']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'emails_per_month')
|
141
|
+
self.emails_per_month = attributes[:'emails_per_month']
|
142
|
+
end
|
143
|
+
|
117
144
|
if attributes.key?(:'marketing_esp_domain_user')
|
118
145
|
self.marketing_esp_domain_user = attributes[:'marketing_esp_domain_user']
|
119
146
|
end
|
@@ -193,6 +220,9 @@ module UltracartClient
|
|
193
220
|
def ==(o)
|
194
221
|
return true if self.equal?(o)
|
195
222
|
self.class == o.class &&
|
223
|
+
emails_per_day == o.emails_per_day &&
|
224
|
+
emails_per_hour == o.emails_per_hour &&
|
225
|
+
emails_per_month == o.emails_per_month &&
|
196
226
|
marketing_esp_domain_user == o.marketing_esp_domain_user &&
|
197
227
|
marketing_esp_domain_uuid == o.marketing_esp_domain_uuid &&
|
198
228
|
marketing_esp_friendly_name == o.marketing_esp_friendly_name &&
|
@@ -219,7 +249,7 @@ module UltracartClient
|
|
219
249
|
# Calculates hash code according to all attributes.
|
220
250
|
# @return [Integer] Hash code
|
221
251
|
def hash
|
222
|
-
[marketing_esp_domain_user, marketing_esp_domain_uuid, marketing_esp_friendly_name, postcard_from_address1, postcard_from_address2, postcard_from_city, postcard_from_name, postcard_from_postal_code, postcard_from_state, reviews_io_configured, sms_esp_twilio_uuid, sms_phone_number, transactional_esp_domain_user, transactional_esp_domain_uuid, transactional_esp_friendly_name].hash
|
252
|
+
[emails_per_day, emails_per_hour, emails_per_month, marketing_esp_domain_user, marketing_esp_domain_uuid, marketing_esp_friendly_name, postcard_from_address1, postcard_from_address2, postcard_from_city, postcard_from_name, postcard_from_postal_code, postcard_from_state, reviews_io_configured, sms_esp_twilio_uuid, sms_phone_number, transactional_esp_domain_user, transactional_esp_domain_uuid, transactional_esp_friendly_name].hash
|
223
253
|
end
|
224
254
|
|
225
255
|
# Builds the object from hash
|
@@ -244,7 +244,7 @@ module UltracartClient
|
|
244
244
|
# Check to see if the all the properties in the model are valid
|
245
245
|
# @return true if the model is valid
|
246
246
|
def valid?
|
247
|
-
payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart", "Shop.com", "Sezzle", "Venmo"])
|
247
|
+
payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart", "Shop.com", "Sezzle", "Venmo", "Apple Pay", "Google Pay"])
|
248
248
|
return false unless payment_method_validator.valid?(@payment_method)
|
249
249
|
payment_status_validator = EnumAttributeValidator.new('String', ["Unprocessed", "Authorized", "Capture Failed", "Processed", "Declined", "Voided", "Refunded", "Skipped"])
|
250
250
|
return false unless payment_status_validator.valid?(@payment_status)
|
@@ -254,7 +254,7 @@ module UltracartClient
|
|
254
254
|
# Custom attribute writer method checking allowed values (enum).
|
255
255
|
# @param [Object] payment_method Object to be assigned
|
256
256
|
def payment_method=(payment_method)
|
257
|
-
validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart", "Shop.com", "Sezzle", "Venmo"])
|
257
|
+
validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eBay", "eCheck", "Google Shopping", "Insurance", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Walmart", "Shop.com", "Sezzle", "Venmo", "Apple Pay", "Google Pay"])
|
258
258
|
unless validator.valid?(payment_method)
|
259
259
|
fail ArgumentError, "invalid value for \"payment_method\", must be one of #{validator.allowable_values}."
|
260
260
|
end
|
@@ -494,7 +494,7 @@ module UltracartClient
|
|
494
494
|
return false if !@email.nil? && @email.to_s.length > 100
|
495
495
|
return false if !@first_name.nil? && @first_name.to_s.length > 30
|
496
496
|
return false if !@last_name.nil? && @last_name.to_s.length > 30
|
497
|
-
payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eCheck", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer"])
|
497
|
+
payment_method_validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eCheck", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Venmo", "Apple Pay", " Google Pay"])
|
498
498
|
return false unless payment_method_validator.valid?(@payment_method)
|
499
499
|
return false if !@phone.nil? && @phone.to_s.length > 25
|
500
500
|
return false if !@postal_code.nil? && @postal_code.to_s.length > 20
|
@@ -587,7 +587,7 @@ module UltracartClient
|
|
587
587
|
# Custom attribute writer method checking allowed values (enum).
|
588
588
|
# @param [Object] payment_method Object to be assigned
|
589
589
|
def payment_method=(payment_method)
|
590
|
-
validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eCheck", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer"])
|
590
|
+
validator = EnumAttributeValidator.new('String', ["Affirm", "Amazon", "Amazon SC", "Cash", "Check", "COD", "Credit Card", "eCheck", "LoanHero", "Money Order", "PayPal", "Purchase Order", "Quote Request", "Unknown", "Wire Transfer", "Venmo", "Apple Pay", " Google Pay"])
|
591
591
|
unless validator.valid?(payment_method)
|
592
592
|
fail ArgumentError, "invalid value for \"payment_method\", must be one of #{validator.allowable_values}."
|
593
593
|
end
|
@@ -0,0 +1,231 @@
|
|
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 OrderValidationRequest
|
18
|
+
# Checks to perform
|
19
|
+
attr_accessor :checks
|
20
|
+
|
21
|
+
attr_accessor :order
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'checks' => :'checks',
|
27
|
+
:'order' => :'order'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns all the JSON keys this model knows about
|
32
|
+
def self.acceptable_attributes
|
33
|
+
attribute_map.values
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'checks' => :'Array<String>',
|
40
|
+
:'order' => :'Order'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# List of attributes with nullable: true
|
45
|
+
def self.openapi_nullable
|
46
|
+
Set.new([
|
47
|
+
])
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderValidationRequest` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderValidationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:'checks')
|
66
|
+
if (value = attributes[:'checks']).is_a?(Array)
|
67
|
+
self.checks = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'order')
|
72
|
+
self.order = attributes[:'order']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = Array.new
|
80
|
+
invalid_properties
|
81
|
+
end
|
82
|
+
|
83
|
+
# Check to see if the all the properties in the model are valid
|
84
|
+
# @return true if the model is valid
|
85
|
+
def valid?
|
86
|
+
true
|
87
|
+
end
|
88
|
+
|
89
|
+
# Checks equality by comparing each attribute.
|
90
|
+
# @param [Object] Object to be compared
|
91
|
+
def ==(o)
|
92
|
+
return true if self.equal?(o)
|
93
|
+
self.class == o.class &&
|
94
|
+
checks == o.checks &&
|
95
|
+
order == o.order
|
96
|
+
end
|
97
|
+
|
98
|
+
# @see the `==` method
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
102
|
+
end
|
103
|
+
|
104
|
+
# Calculates hash code according to all attributes.
|
105
|
+
# @return [Integer] Hash code
|
106
|
+
def hash
|
107
|
+
[checks, order].hash
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def self.build_from_hash(attributes)
|
114
|
+
new.build_from_hash(attributes)
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
attributes = attributes.transform_keys(&:to_sym)
|
123
|
+
self.class.openapi_types.each_pair do |key, type|
|
124
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
125
|
+
self.send("#{key}=", nil)
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :Time
|
147
|
+
Time.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :Boolean
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
# models (e.g. Pet) or oneOf
|
178
|
+
klass = UltracartClient.const_get(type)
|
179
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the string representation of the object
|
184
|
+
# @return [String] String presentation of the object
|
185
|
+
def to_s
|
186
|
+
to_hash.to_s
|
187
|
+
end
|
188
|
+
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_body
|
192
|
+
to_hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the object in the form of hash
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_hash
|
198
|
+
hash = {}
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
200
|
+
value = self.send(attr)
|
201
|
+
if value.nil?
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
204
|
+
end
|
205
|
+
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
@@ -0,0 +1,244 @@
|
|
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 OrderValidationResponse
|
18
|
+
# Errors to display to the merchant if they failed any of the validations checked
|
19
|
+
attr_accessor :errors
|
20
|
+
|
21
|
+
# Informational messages
|
22
|
+
attr_accessor :messages
|
23
|
+
|
24
|
+
# If true, this order was updated during the validation call. This may happen during address standardization fixes.
|
25
|
+
attr_accessor :order_was_updated
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'errors' => :'errors',
|
31
|
+
:'messages' => :'messages',
|
32
|
+
:'order_was_updated' => :'order_was_updated'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'errors' => :'Array<String>',
|
45
|
+
:'messages' => :'Array<String>',
|
46
|
+
:'order_was_updated' => :'Boolean'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
def self.openapi_nullable
|
52
|
+
Set.new([
|
53
|
+
])
|
54
|
+
end
|
55
|
+
|
56
|
+
# Initializes the object
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
+
def initialize(attributes = {})
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderValidationResponse` initialize method"
|
61
|
+
end
|
62
|
+
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderValidationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
+
end
|
68
|
+
h[k.to_sym] = v
|
69
|
+
}
|
70
|
+
|
71
|
+
if attributes.key?(:'errors')
|
72
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
73
|
+
self.errors = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'messages')
|
78
|
+
if (value = attributes[:'messages']).is_a?(Array)
|
79
|
+
self.messages = value
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'order_was_updated')
|
84
|
+
self.order_was_updated = attributes[:'order_was_updated']
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
+
# @return Array for valid properties with the reasons
|
90
|
+
def list_invalid_properties
|
91
|
+
invalid_properties = Array.new
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
errors == o.errors &&
|
107
|
+
messages == o.messages &&
|
108
|
+
order_was_updated == o.order_was_updated
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Integer] Hash code
|
119
|
+
def hash
|
120
|
+
[errors, messages, order_was_updated].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def self.build_from_hash(attributes)
|
127
|
+
new.build_from_hash(attributes)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
attributes = attributes.transform_keys(&:to_sym)
|
136
|
+
self.class.openapi_types.each_pair do |key, type|
|
137
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
138
|
+
self.send("#{key}=", nil)
|
139
|
+
elsif type =~ /\AArray<(.*)>/i
|
140
|
+
# check to ensure the input is an array given that the attribute
|
141
|
+
# is documented as an array but the input is not
|
142
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
143
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
144
|
+
end
|
145
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
146
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
self
|
151
|
+
end
|
152
|
+
|
153
|
+
# Deserializes the data based on type
|
154
|
+
# @param string type Data type
|
155
|
+
# @param string value Value to be deserialized
|
156
|
+
# @return [Object] Deserialized data
|
157
|
+
def _deserialize(type, value)
|
158
|
+
case type.to_sym
|
159
|
+
when :Time
|
160
|
+
Time.parse(value)
|
161
|
+
when :Date
|
162
|
+
Date.parse(value)
|
163
|
+
when :String
|
164
|
+
value.to_s
|
165
|
+
when :Integer
|
166
|
+
value.to_i
|
167
|
+
when :Float
|
168
|
+
value.to_f
|
169
|
+
when :Boolean
|
170
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
171
|
+
true
|
172
|
+
else
|
173
|
+
false
|
174
|
+
end
|
175
|
+
when :Object
|
176
|
+
# generic object (usually a Hash), return directly
|
177
|
+
value
|
178
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
179
|
+
inner_type = Regexp.last_match[:inner_type]
|
180
|
+
value.map { |v| _deserialize(inner_type, v) }
|
181
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
182
|
+
k_type = Regexp.last_match[:k_type]
|
183
|
+
v_type = Regexp.last_match[:v_type]
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each do |k, v|
|
186
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
else # model
|
190
|
+
# models (e.g. Pet) or oneOf
|
191
|
+
klass = UltracartClient.const_get(type)
|
192
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
|
242
|
+
end
|
243
|
+
|
244
|
+
end
|
@@ -37,6 +37,9 @@ module UltracartClient
|
|
37
37
|
# Security level to execute report under
|
38
38
|
attr_accessor :security_level
|
39
39
|
|
40
|
+
# A JSON representation of the settings for this report
|
41
|
+
attr_accessor :settings
|
42
|
+
|
40
43
|
class EnumAttributeValidator
|
41
44
|
attr_reader :datatype
|
42
45
|
attr_reader :allowable_values
|
@@ -71,7 +74,8 @@ module UltracartClient
|
|
71
74
|
:'name' => :'name',
|
72
75
|
:'pages' => :'pages',
|
73
76
|
:'report_oid' => :'report_oid',
|
74
|
-
:'security_level' => :'security_level'
|
77
|
+
:'security_level' => :'security_level',
|
78
|
+
:'settings' => :'settings'
|
75
79
|
}
|
76
80
|
end
|
77
81
|
|
@@ -92,7 +96,8 @@ module UltracartClient
|
|
92
96
|
:'name' => :'String',
|
93
97
|
:'pages' => :'Array<ReportPage>',
|
94
98
|
:'report_oid' => :'Integer',
|
95
|
-
:'security_level' => :'String'
|
99
|
+
:'security_level' => :'String',
|
100
|
+
:'settings' => :'String'
|
96
101
|
}
|
97
102
|
end
|
98
103
|
|
@@ -162,6 +167,10 @@ module UltracartClient
|
|
162
167
|
if attributes.key?(:'security_level')
|
163
168
|
self.security_level = attributes[:'security_level']
|
164
169
|
end
|
170
|
+
|
171
|
+
if attributes.key?(:'settings')
|
172
|
+
self.settings = attributes[:'settings']
|
173
|
+
end
|
165
174
|
end
|
166
175
|
|
167
176
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -203,7 +212,8 @@ module UltracartClient
|
|
203
212
|
name == o.name &&
|
204
213
|
pages == o.pages &&
|
205
214
|
report_oid == o.report_oid &&
|
206
|
-
security_level == o.security_level
|
215
|
+
security_level == o.security_level &&
|
216
|
+
settings == o.settings
|
207
217
|
end
|
208
218
|
|
209
219
|
# @see the `==` method
|
@@ -215,7 +225,7 @@ module UltracartClient
|
|
215
225
|
# Calculates hash code according to all attributes.
|
216
226
|
# @return [Integer] Hash code
|
217
227
|
def hash
|
218
|
-
[active, data_sources, default_dataset_id, default_project_id, filters, merchant_id, name, pages, report_oid, security_level].hash
|
228
|
+
[active, data_sources, default_dataset_id, default_project_id, filters, merchant_id, name, pages, report_oid, security_level, settings].hash
|
219
229
|
end
|
220
230
|
|
221
231
|
# Builds the object from hash
|
@@ -20,6 +20,9 @@ module UltracartClient
|
|
20
20
|
# Height of the report page in inches
|
21
21
|
attr_accessor :height
|
22
22
|
|
23
|
+
# A JSON representation of the settings for this report
|
24
|
+
attr_accessor :settings
|
25
|
+
|
23
26
|
attr_accessor :title
|
24
27
|
|
25
28
|
# Visualizations on the report page.
|
@@ -33,6 +36,7 @@ module UltracartClient
|
|
33
36
|
{
|
34
37
|
:'filters' => :'filters',
|
35
38
|
:'height' => :'height',
|
39
|
+
:'settings' => :'settings',
|
36
40
|
:'title' => :'title',
|
37
41
|
:'visualizations' => :'visualizations',
|
38
42
|
:'width' => :'width'
|
@@ -49,6 +53,7 @@ module UltracartClient
|
|
49
53
|
{
|
50
54
|
:'filters' => :'Array<ReportPageFilter>',
|
51
55
|
:'height' => :'Float',
|
56
|
+
:'settings' => :'String',
|
52
57
|
:'title' => :'String',
|
53
58
|
:'visualizations' => :'Array<ReportPageVisualization>',
|
54
59
|
:'width' => :'Float'
|
@@ -86,6 +91,10 @@ module UltracartClient
|
|
86
91
|
self.height = attributes[:'height']
|
87
92
|
end
|
88
93
|
|
94
|
+
if attributes.key?(:'settings')
|
95
|
+
self.settings = attributes[:'settings']
|
96
|
+
end
|
97
|
+
|
89
98
|
if attributes.key?(:'title')
|
90
99
|
self.title = attributes[:'title']
|
91
100
|
end
|
@@ -121,6 +130,7 @@ module UltracartClient
|
|
121
130
|
self.class == o.class &&
|
122
131
|
filters == o.filters &&
|
123
132
|
height == o.height &&
|
133
|
+
settings == o.settings &&
|
124
134
|
title == o.title &&
|
125
135
|
visualizations == o.visualizations &&
|
126
136
|
width == o.width
|
@@ -135,7 +145,7 @@ module UltracartClient
|
|
135
145
|
# Calculates hash code according to all attributes.
|
136
146
|
# @return [Integer] Hash code
|
137
147
|
def hash
|
138
|
-
[filters, height, title, visualizations, width].hash
|
148
|
+
[filters, height, settings, title, visualizations, width].hash
|
139
149
|
end
|
140
150
|
|
141
151
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -635,6 +635,8 @@ require 'ultracart_api/models/order_tracking_number_detail'
|
|
635
635
|
require 'ultracart_api/models/order_tracking_number_details'
|
636
636
|
require 'ultracart_api/models/order_transactional_merchant_note'
|
637
637
|
require 'ultracart_api/models/order_utm'
|
638
|
+
require 'ultracart_api/models/order_validation_request'
|
639
|
+
require 'ultracart_api/models/order_validation_response'
|
638
640
|
require 'ultracart_api/models/orders_response'
|
639
641
|
require 'ultracart_api/models/permission'
|
640
642
|
require 'ultracart_api/models/point_of_sale_location'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.170
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -694,6 +694,8 @@ files:
|
|
694
694
|
- docs/OrderTrackingNumberDetails.md
|
695
695
|
- docs/OrderTransactionalMerchantNote.md
|
696
696
|
- docs/OrderUtm.md
|
697
|
+
- docs/OrderValidationRequest.md
|
698
|
+
- docs/OrderValidationResponse.md
|
697
699
|
- docs/OrdersResponse.md
|
698
700
|
- docs/Permission.md
|
699
701
|
- docs/PointOfSaleLocation.md
|
@@ -1500,6 +1502,8 @@ files:
|
|
1500
1502
|
- lib/ultracart_api/models/order_tracking_number_details.rb
|
1501
1503
|
- lib/ultracart_api/models/order_transactional_merchant_note.rb
|
1502
1504
|
- lib/ultracart_api/models/order_utm.rb
|
1505
|
+
- lib/ultracart_api/models/order_validation_request.rb
|
1506
|
+
- lib/ultracart_api/models/order_validation_response.rb
|
1503
1507
|
- lib/ultracart_api/models/orders_response.rb
|
1504
1508
|
- lib/ultracart_api/models/permission.rb
|
1505
1509
|
- lib/ultracart_api/models/point_of_sale_location.rb
|