ultracart_api 4.1.73 → 4.1.74
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 +5 -2
- data/docs/AutoOrderApi.md +57 -0
- data/docs/AutoOrderItemCancelRequest.md +20 -0
- data/docs/OrderFormat.md +3 -1
- data/lib/ultracart_api/api/auto_order_api.rb +80 -0
- data/lib/ultracart_api/models/auto_order_item_cancel_request.rb +264 -0
- data/lib/ultracart_api/models/order_format.rb +14 -4
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '048bade7fa9ab06961ade9e258cb951517885d69a10c17bb16afd5da671f5f8e'
|
|
4
|
+
data.tar.gz: 2ceeac92a4b38fd71ea6184c324bf67a85697bf4b8fa438eba08c72c73c952d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8be31cc04399ffb7792f0b217d404e0112bd5bdb3c82ea28315bbc4077c6246328a032687765b591d20e69c2f15926f0de600a75cac5ce91606e3625ea841fd
|
|
7
|
+
data.tar.gz: ac811d895523f9de813b4e3a77a8696e5f2dbc1d90ff9ba6a11d550884c54b61c765d07d6dbbadc76562fb5ba7b210f71c0d2e5d711485ad9b291c161ee36f1c
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
|
|
|
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.1.
|
|
10
|
+
- Package version: 4.1.74
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|
|
16
16
|
gemfile:
|
|
17
17
|
|
|
18
18
|
```shell
|
|
19
|
-
gem 'ultracart_api', '4.1.
|
|
19
|
+
gem 'ultracart_api', '4.1.74'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -84,6 +84,7 @@ Class | Method | HTTP request | Description
|
|
|
84
84
|
------------ | ------------- | ------------- | -------------
|
|
85
85
|
*UltracartClient::AffiliateApi* | [**get_clicks_by_query**](docs/AffiliateApi.md#get_clicks_by_query) | **POST** /affiliate/clicks/query | Retrieve clicks
|
|
86
86
|
*UltracartClient::AffiliateApi* | [**get_ledgers_by_query**](docs/AffiliateApi.md#get_ledgers_by_query) | **POST** /affiliate/ledgers/query | Retrieve ledger entries
|
|
87
|
+
*UltracartClient::AutoOrderApi* | [**cancel_auto_order_item_by_reference_order_id**](docs/AutoOrderApi.md#cancel_auto_order_item_by_reference_order_id) | **POST** /auto_order/auto_orders/reference_order_id/{reference_order_id}/items/original/{original_item_id}/cancel | Cancel a single item on an auto order
|
|
87
88
|
*UltracartClient::AutoOrderApi* | [**consolidate_auto_orders**](docs/AutoOrderApi.md#consolidate_auto_orders) | **PUT** /auto_order/auto_orders/{auto_order_oid}/consolidate | Consolidates multiple auto orders
|
|
88
89
|
*UltracartClient::AutoOrderApi* | [**establish_auto_order_by_reference_order_id**](docs/AutoOrderApi.md#establish_auto_order_by_reference_order_id) | **POST** /auto_order/auto_orders/reference_order_id/{reference_order_id} | Establish an auto order by referencing a regular order id
|
|
89
90
|
*UltracartClient::AutoOrderApi* | [**get_auto_order**](docs/AutoOrderApi.md#get_auto_order) | **GET** /auto_order/auto_orders/{auto_order_oid} | Retrieve an auto order by oid
|
|
@@ -691,6 +692,7 @@ Class | Method | HTTP request | Description
|
|
|
691
692
|
- [UltracartClient::AutoOrderAddonItemsUpdateRequest](docs/AutoOrderAddonItemsUpdateRequest.md)
|
|
692
693
|
- [UltracartClient::AutoOrderConsolidate](docs/AutoOrderConsolidate.md)
|
|
693
694
|
- [UltracartClient::AutoOrderItem](docs/AutoOrderItem.md)
|
|
695
|
+
- [UltracartClient::AutoOrderItemCancelRequest](docs/AutoOrderItemCancelRequest.md)
|
|
694
696
|
- [UltracartClient::AutoOrderItemFutureSchedule](docs/AutoOrderItemFutureSchedule.md)
|
|
695
697
|
- [UltracartClient::AutoOrderItemOption](docs/AutoOrderItemOption.md)
|
|
696
698
|
- [UltracartClient::AutoOrderItemSimpleSchedule](docs/AutoOrderItemSimpleSchedule.md)
|
|
@@ -1690,6 +1692,7 @@ Not every change is committed to every SDK.
|
|
|
1690
1692
|
|
|
1691
1693
|
| Version | Date | Comments |
|
|
1692
1694
|
| --: | :-: | --- |
|
|
1695
|
+
| 4.1.74 | 04/15/2026 | auto order - new method cancelAutoOrderItemByReferenceOrderId |
|
|
1693
1696
|
| 4.1.73 | 04/13/2026 | conversation pbx - queue configuration for ai summary and call record zoho desk |
|
|
1694
1697
|
| 4.1.72 | 04/11/2026 | conversation pbx - voicemail notification channels |
|
|
1695
1698
|
| 4.1.71 | 04/06/2026 | coupons - new percent_off_items_with_minimum_item_amount |
|
data/docs/AutoOrderApi.md
CHANGED
|
@@ -4,6 +4,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**cancel_auto_order_item_by_reference_order_id**](AutoOrderApi.md#cancel_auto_order_item_by_reference_order_id) | **POST** /auto_order/auto_orders/reference_order_id/{reference_order_id}/items/original/{original_item_id}/cancel | Cancel a single item on an auto order |
|
|
7
8
|
| [**consolidate_auto_orders**](AutoOrderApi.md#consolidate_auto_orders) | **PUT** /auto_order/auto_orders/{auto_order_oid}/consolidate | Consolidates multiple auto orders |
|
|
8
9
|
| [**establish_auto_order_by_reference_order_id**](AutoOrderApi.md#establish_auto_order_by_reference_order_id) | **POST** /auto_order/auto_orders/reference_order_id/{reference_order_id} | Establish an auto order by referencing a regular order id |
|
|
9
10
|
| [**get_auto_order**](AutoOrderApi.md#get_auto_order) | **GET** /auto_order/auto_orders/{auto_order_oid} | Retrieve an auto order by oid |
|
|
@@ -20,6 +21,62 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
20
21
|
| [**update_auto_orders_batch**](AutoOrderApi.md#update_auto_orders_batch) | **PUT** /auto_order/auto_orders/batch | Update multiple auto orders |
|
|
21
22
|
|
|
22
23
|
|
|
24
|
+
## cancel_auto_order_item_by_reference_order_id
|
|
25
|
+
|
|
26
|
+
> <AutoOrderResponse> cancel_auto_order_item_by_reference_order_id(reference_order_id, original_item_id, opts)
|
|
27
|
+
|
|
28
|
+
Cancel a single item on an auto order
|
|
29
|
+
|
|
30
|
+
Cancels a single item on an auto order identified by the original order id and the item's original_item_id. The request body may specify mode=_end (soft cancel by setting no_order_after_dts to the current time, preserving the row for reporting; this is the default when the body is omitted) or mode=remove (hard delete). Returns the updated auto order based upon expansion.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Examples
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
(No example for this operation).
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
#### Using the cancel_auto_order_item_by_reference_order_id_with_http_info variant
|
|
40
|
+
|
|
41
|
+
This returns an Array which contains the response data, status code and headers.
|
|
42
|
+
|
|
43
|
+
> <Array(<AutoOrderResponse>, Integer, Hash)> cancel_auto_order_item_by_reference_order_id_with_http_info(reference_order_id, original_item_id, opts)
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
begin
|
|
47
|
+
# Cancel a single item on an auto order
|
|
48
|
+
data, status_code, headers = api_instance.cancel_auto_order_item_by_reference_order_id_with_http_info(reference_order_id, original_item_id, opts)
|
|
49
|
+
p status_code # => 2xx
|
|
50
|
+
p headers # => { ... }
|
|
51
|
+
p data # => <AutoOrderResponse>
|
|
52
|
+
rescue UltracartClient::ApiError => e
|
|
53
|
+
puts "Error when calling AutoOrderApi->cancel_auto_order_item_by_reference_order_id_with_http_info: #{e}"
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
| Name | Type | Description | Notes |
|
|
60
|
+
| ---- | ---- | ----------- | ----- |
|
|
61
|
+
| **reference_order_id** | **String** | The reference order id (original_order_id) of the auto order. | |
|
|
62
|
+
| **original_item_id** | **String** | The original_item_id (SKU) of the item to cancel. | |
|
|
63
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
|
64
|
+
| **auto_order_item_cancel_request** | [**AutoOrderItemCancelRequest**](AutoOrderItemCancelRequest.md) | Cancel request. Body is optional; omit for default mode=_end. | [optional] |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
[**AutoOrderResponse**](AutoOrderResponse.md)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: application/json; charset=UTF-8
|
|
77
|
+
- **Accept**: application/json
|
|
78
|
+
|
|
79
|
+
|
|
23
80
|
## consolidate_auto_orders
|
|
24
81
|
|
|
25
82
|
> <AutoOrderResponse> consolidate_auto_orders(auto_order_oid, auto_order_consolidate, opts)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::AutoOrderItemCancelRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **auto_order_item_oid** | **Integer** | Optional tiebreaker when more than one item on the auto order shares the same original_item_id. When present, the item with this oid is targeted and its original_item_id must match the URL path parameter (safety check). Leave unset for the common case of a unique original_item_id. | [optional] |
|
|
8
|
+
| **mode** | **String** | Cancellation mode. 'end' soft-cancels the item by setting no_order_after_dts to the current time, preserving the row for reporting. 'remove' hard-deletes the item from the auto order. Defaults to 'end' (the less destructive option) when omitted. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::AutoOrderItemCancelRequest.new(
|
|
16
|
+
auto_order_item_oid: null,
|
|
17
|
+
mode: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/OrderFormat.md
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
| **show_non_sensitive_payment_info** | **Boolean** | True to show non-sensitive payment information | [optional] |
|
|
21
21
|
| **show_payment_info** | **Boolean** | True to show payment information | [optional] |
|
|
22
22
|
| **translate** | **Boolean** | True to translate the order into the native language of the customer | [optional] |
|
|
23
|
+
| **use_phone_number_web_component** | **Boolean** | True to render phone numbers as <phone-number-format> web components in the HTML output. Only honored by the div format. Default false preserves legacy scalar rendering for receipts and unauthenticated consumers. | [optional] |
|
|
23
24
|
|
|
24
25
|
## Example
|
|
25
26
|
|
|
@@ -42,7 +43,8 @@ instance = UltracartClient::OrderFormat.new(
|
|
|
42
43
|
show_merchant_notes: null,
|
|
43
44
|
show_non_sensitive_payment_info: null,
|
|
44
45
|
show_payment_info: null,
|
|
45
|
-
translate: null
|
|
46
|
+
translate: null,
|
|
47
|
+
use_phone_number_web_component: null
|
|
46
48
|
)
|
|
47
49
|
```
|
|
48
50
|
|
|
@@ -32,6 +32,86 @@ module UltracartClient
|
|
|
32
32
|
UltracartClient::AutoOrderApi.new(api_client)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# Cancel a single item on an auto order
|
|
36
|
+
# Cancels a single item on an auto order identified by the original order id and the item's original_item_id. The request body may specify mode=_end (soft cancel by setting no_order_after_dts to the current time, preserving the row for reporting; this is the default when the body is omitted) or mode=remove (hard delete). Returns the updated auto order based upon expansion.
|
|
37
|
+
# @param reference_order_id [String] The reference order id (original_order_id) of the auto order.
|
|
38
|
+
# @param original_item_id [String] The original_item_id (SKU) of the item to cancel.
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
|
41
|
+
# @option opts [AutoOrderItemCancelRequest] :auto_order_item_cancel_request Cancel request. Body is optional; omit for default mode=_end.
|
|
42
|
+
# @return [AutoOrderResponse]
|
|
43
|
+
def cancel_auto_order_item_by_reference_order_id(reference_order_id, original_item_id, opts = {})
|
|
44
|
+
data, _status_code, _headers = cancel_auto_order_item_by_reference_order_id_with_http_info(reference_order_id, original_item_id, opts)
|
|
45
|
+
data
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Cancel a single item on an auto order
|
|
49
|
+
# Cancels a single item on an auto order identified by the original order id and the item's original_item_id. The request body may specify mode=_end (soft cancel by setting no_order_after_dts to the current time, preserving the row for reporting; this is the default when the body is omitted) or mode=remove (hard delete). Returns the updated auto order based upon expansion.
|
|
50
|
+
# @param reference_order_id [String] The reference order id (original_order_id) of the auto order.
|
|
51
|
+
# @param original_item_id [String] The original_item_id (SKU) of the item to cancel.
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
|
54
|
+
# @option opts [AutoOrderItemCancelRequest] :auto_order_item_cancel_request Cancel request. Body is optional; omit for default mode=_end.
|
|
55
|
+
# @return [Array<(AutoOrderResponse, Integer, Hash)>] AutoOrderResponse data, response status code and response headers
|
|
56
|
+
def cancel_auto_order_item_by_reference_order_id_with_http_info(reference_order_id, original_item_id, opts = {})
|
|
57
|
+
if @api_client.config.debugging
|
|
58
|
+
@api_client.config.logger.debug 'Calling API: AutoOrderApi.cancel_auto_order_item_by_reference_order_id ...'
|
|
59
|
+
end
|
|
60
|
+
# verify the required parameter 'reference_order_id' is set
|
|
61
|
+
if @api_client.config.client_side_validation && reference_order_id.nil?
|
|
62
|
+
fail ArgumentError, "Missing the required parameter 'reference_order_id' when calling AutoOrderApi.cancel_auto_order_item_by_reference_order_id"
|
|
63
|
+
end
|
|
64
|
+
# verify the required parameter 'original_item_id' is set
|
|
65
|
+
if @api_client.config.client_side_validation && original_item_id.nil?
|
|
66
|
+
fail ArgumentError, "Missing the required parameter 'original_item_id' when calling AutoOrderApi.cancel_auto_order_item_by_reference_order_id"
|
|
67
|
+
end
|
|
68
|
+
# resource path
|
|
69
|
+
local_var_path = '/auto_order/auto_orders/reference_order_id/{reference_order_id}/items/original/{original_item_id}/cancel'.sub('{' + 'reference_order_id' + '}', CGI.escape(reference_order_id.to_s)).sub('{' + 'original_item_id' + '}', CGI.escape(original_item_id.to_s))
|
|
70
|
+
|
|
71
|
+
# query parameters
|
|
72
|
+
query_params = opts[:query_params] || {}
|
|
73
|
+
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
|
74
|
+
|
|
75
|
+
# header parameters
|
|
76
|
+
header_params = opts[:header_params] || {}
|
|
77
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
78
|
+
# HTTP header 'Accept' (if needed)
|
|
79
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
80
|
+
# HTTP header 'Content-Type'
|
|
81
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
82
|
+
if !content_type.nil?
|
|
83
|
+
header_params['Content-Type'] = content_type
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# form parameters
|
|
87
|
+
form_params = opts[:form_params] || {}
|
|
88
|
+
|
|
89
|
+
# http body (model)
|
|
90
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'auto_order_item_cancel_request'])
|
|
91
|
+
|
|
92
|
+
# return_type
|
|
93
|
+
return_type = opts[:debug_return_type] || 'AutoOrderResponse'
|
|
94
|
+
|
|
95
|
+
# auth_names
|
|
96
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
97
|
+
|
|
98
|
+
new_options = opts.merge(
|
|
99
|
+
:operation => :"AutoOrderApi.cancel_auto_order_item_by_reference_order_id",
|
|
100
|
+
:header_params => header_params,
|
|
101
|
+
:query_params => query_params,
|
|
102
|
+
:form_params => form_params,
|
|
103
|
+
:body => post_body,
|
|
104
|
+
:auth_names => auth_names,
|
|
105
|
+
:return_type => return_type
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
109
|
+
if @api_client.config.debugging
|
|
110
|
+
@api_client.config.logger.debug "API called: AutoOrderApi#cancel_auto_order_item_by_reference_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
111
|
+
end
|
|
112
|
+
return data, status_code, headers
|
|
113
|
+
end
|
|
114
|
+
|
|
35
115
|
# Consolidates multiple auto orders
|
|
36
116
|
# Consolidates mutliple auto orders on the UltraCart account.
|
|
37
117
|
# @param auto_order_oid [Integer] The auto order oid to consolidate into.
|
|
@@ -0,0 +1,264 @@
|
|
|
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 AutoOrderItemCancelRequest
|
|
18
|
+
# Optional tiebreaker when more than one item on the auto order shares the same original_item_id. When present, the item with this oid is targeted and its original_item_id must match the URL path parameter (safety check). Leave unset for the common case of a unique original_item_id.
|
|
19
|
+
attr_accessor :auto_order_item_oid
|
|
20
|
+
|
|
21
|
+
# Cancellation mode. 'end' soft-cancels the item by setting no_order_after_dts to the current time, preserving the row for reporting. 'remove' hard-deletes the item from the auto order. Defaults to 'end' (the less destructive option) when omitted.
|
|
22
|
+
attr_accessor :mode
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'auto_order_item_oid' => :'auto_order_item_oid',
|
|
50
|
+
:'mode' => :'mode'
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'auto_order_item_oid' => :'Integer',
|
|
63
|
+
:'mode' => :'String'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# List of attributes with nullable: true
|
|
68
|
+
def self.openapi_nullable
|
|
69
|
+
Set.new([
|
|
70
|
+
])
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Initializes the object
|
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
75
|
+
def initialize(attributes = {})
|
|
76
|
+
if (!attributes.is_a?(Hash))
|
|
77
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::AutoOrderItemCancelRequest` initialize method"
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
81
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
82
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
83
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::AutoOrderItemCancelRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
84
|
+
end
|
|
85
|
+
h[k.to_sym] = v
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'auto_order_item_oid')
|
|
89
|
+
self.auto_order_item_oid = attributes[:'auto_order_item_oid']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.key?(:'mode')
|
|
93
|
+
self.mode = attributes[:'mode']
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
98
|
+
# @return Array for valid properties with the reasons
|
|
99
|
+
def list_invalid_properties
|
|
100
|
+
invalid_properties = Array.new
|
|
101
|
+
invalid_properties
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Check to see if the all the properties in the model are valid
|
|
105
|
+
# @return true if the model is valid
|
|
106
|
+
def valid?
|
|
107
|
+
mode_validator = EnumAttributeValidator.new('String', ["end", "remove"])
|
|
108
|
+
return false unless mode_validator.valid?(@mode)
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
113
|
+
# @param [Object] mode Object to be assigned
|
|
114
|
+
def mode=(mode)
|
|
115
|
+
validator = EnumAttributeValidator.new('String', ["end", "remove"])
|
|
116
|
+
unless validator.valid?(mode)
|
|
117
|
+
fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
|
|
118
|
+
end
|
|
119
|
+
@mode = mode
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Checks equality by comparing each attribute.
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def ==(o)
|
|
125
|
+
return true if self.equal?(o)
|
|
126
|
+
self.class == o.class &&
|
|
127
|
+
auto_order_item_oid == o.auto_order_item_oid &&
|
|
128
|
+
mode == o.mode
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[auto_order_item_oid, mode].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
new.build_from_hash(attributes)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
156
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
158
|
+
self.send("#{key}=", nil)
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
163
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
166
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
self
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Deserializes the data based on type
|
|
174
|
+
# @param string type Data type
|
|
175
|
+
# @param string value Value to be deserialized
|
|
176
|
+
# @return [Object] Deserialized data
|
|
177
|
+
def _deserialize(type, value)
|
|
178
|
+
case type.to_sym
|
|
179
|
+
when :Time
|
|
180
|
+
Time.parse(value)
|
|
181
|
+
when :Date
|
|
182
|
+
Date.parse(value)
|
|
183
|
+
when :String
|
|
184
|
+
value.to_s
|
|
185
|
+
when :Integer
|
|
186
|
+
value.to_i
|
|
187
|
+
when :Float
|
|
188
|
+
value.to_f
|
|
189
|
+
when :Boolean
|
|
190
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
191
|
+
true
|
|
192
|
+
else
|
|
193
|
+
false
|
|
194
|
+
end
|
|
195
|
+
when :Object
|
|
196
|
+
# generic object (usually a Hash), return directly
|
|
197
|
+
value
|
|
198
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
199
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
200
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
201
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
202
|
+
k_type = Regexp.last_match[:k_type]
|
|
203
|
+
v_type = Regexp.last_match[:v_type]
|
|
204
|
+
{}.tap do |hash|
|
|
205
|
+
value.each do |k, v|
|
|
206
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
207
|
+
end
|
|
208
|
+
end
|
|
209
|
+
else # model
|
|
210
|
+
# models (e.g. Pet) or oneOf
|
|
211
|
+
klass = UltracartClient.const_get(type)
|
|
212
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the string representation of the object
|
|
217
|
+
# @return [String] String presentation of the object
|
|
218
|
+
def to_s
|
|
219
|
+
to_hash.to_s
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_body
|
|
225
|
+
to_hash
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the object in the form of hash
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_hash
|
|
231
|
+
hash = {}
|
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
233
|
+
value = self.send(attr)
|
|
234
|
+
if value.nil?
|
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
hash[param] = _to_hash(value)
|
|
240
|
+
end
|
|
241
|
+
hash
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Outputs non-array value in the form of hash
|
|
245
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
246
|
+
# @param [Object] value Any valid value
|
|
247
|
+
# @return [Hash] Returns the value in the form of hash
|
|
248
|
+
def _to_hash(value)
|
|
249
|
+
if value.is_a?(Array)
|
|
250
|
+
value.compact.map { |v| _to_hash(v) }
|
|
251
|
+
elsif value.is_a?(Hash)
|
|
252
|
+
{}.tap do |hash|
|
|
253
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
254
|
+
end
|
|
255
|
+
elsif value.respond_to? :to_hash
|
|
256
|
+
value.to_hash
|
|
257
|
+
else
|
|
258
|
+
value
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
end
|
|
@@ -63,6 +63,9 @@ module UltracartClient
|
|
|
63
63
|
# True to translate the order into the native language of the customer
|
|
64
64
|
attr_accessor :translate
|
|
65
65
|
|
|
66
|
+
# True to render phone numbers as <phone-number-format> web components in the HTML output. Only honored by the div format. Default false preserves legacy scalar rendering for receipts and unauthenticated consumers.
|
|
67
|
+
attr_accessor :use_phone_number_web_component
|
|
68
|
+
|
|
66
69
|
class EnumAttributeValidator
|
|
67
70
|
attr_reader :datatype
|
|
68
71
|
attr_reader :allowable_values
|
|
@@ -103,7 +106,8 @@ module UltracartClient
|
|
|
103
106
|
:'show_merchant_notes' => :'show_merchant_notes',
|
|
104
107
|
:'show_non_sensitive_payment_info' => :'show_non_sensitive_payment_info',
|
|
105
108
|
:'show_payment_info' => :'show_payment_info',
|
|
106
|
-
:'translate' => :'translate'
|
|
109
|
+
:'translate' => :'translate',
|
|
110
|
+
:'use_phone_number_web_component' => :'use_phone_number_web_component'
|
|
107
111
|
}
|
|
108
112
|
end
|
|
109
113
|
|
|
@@ -130,7 +134,8 @@ module UltracartClient
|
|
|
130
134
|
:'show_merchant_notes' => :'Boolean',
|
|
131
135
|
:'show_non_sensitive_payment_info' => :'Boolean',
|
|
132
136
|
:'show_payment_info' => :'Boolean',
|
|
133
|
-
:'translate' => :'Boolean'
|
|
137
|
+
:'translate' => :'Boolean',
|
|
138
|
+
:'use_phone_number_web_component' => :'Boolean'
|
|
134
139
|
}
|
|
135
140
|
end
|
|
136
141
|
|
|
@@ -218,6 +223,10 @@ module UltracartClient
|
|
|
218
223
|
if attributes.key?(:'translate')
|
|
219
224
|
self.translate = attributes[:'translate']
|
|
220
225
|
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'use_phone_number_web_component')
|
|
228
|
+
self.use_phone_number_web_component = attributes[:'use_phone_number_web_component']
|
|
229
|
+
end
|
|
221
230
|
end
|
|
222
231
|
|
|
223
232
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -265,7 +274,8 @@ module UltracartClient
|
|
|
265
274
|
show_merchant_notes == o.show_merchant_notes &&
|
|
266
275
|
show_non_sensitive_payment_info == o.show_non_sensitive_payment_info &&
|
|
267
276
|
show_payment_info == o.show_payment_info &&
|
|
268
|
-
translate == o.translate
|
|
277
|
+
translate == o.translate &&
|
|
278
|
+
use_phone_number_web_component == o.use_phone_number_web_component
|
|
269
279
|
end
|
|
270
280
|
|
|
271
281
|
# @see the `==` method
|
|
@@ -277,7 +287,7 @@ module UltracartClient
|
|
|
277
287
|
# Calculates hash code according to all attributes.
|
|
278
288
|
# @return [Integer] Hash code
|
|
279
289
|
def hash
|
|
280
|
-
[context, dont_link_email_to_search, email_as_link, filter_distribution_center_oid, filter_to_items_in_container_oid, format, hide_bill_to_address, hide_price_information, link_file_attachments, show_contact_info, show_in_merchant_currency, show_internal_information, show_merchant_notes, show_non_sensitive_payment_info, show_payment_info, translate].hash
|
|
290
|
+
[context, dont_link_email_to_search, email_as_link, filter_distribution_center_oid, filter_to_items_in_container_oid, format, hide_bill_to_address, hide_price_information, link_file_attachments, show_contact_info, show_in_merchant_currency, show_internal_information, show_merchant_notes, show_non_sensitive_payment_info, show_payment_info, translate, use_phone_number_web_component].hash
|
|
281
291
|
end
|
|
282
292
|
|
|
283
293
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -45,6 +45,7 @@ require 'ultracart_api/models/auto_order_addon_item_option'
|
|
|
45
45
|
require 'ultracart_api/models/auto_order_addon_items_update_request'
|
|
46
46
|
require 'ultracart_api/models/auto_order_consolidate'
|
|
47
47
|
require 'ultracart_api/models/auto_order_item'
|
|
48
|
+
require 'ultracart_api/models/auto_order_item_cancel_request'
|
|
48
49
|
require 'ultracart_api/models/auto_order_item_future_schedule'
|
|
49
50
|
require 'ultracart_api/models/auto_order_item_option'
|
|
50
51
|
require 'ultracart_api/models/auto_order_item_simple_schedule'
|
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.1.
|
|
4
|
+
version: 4.1.74
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -91,6 +91,7 @@ files:
|
|
|
91
91
|
- docs/AutoOrderApi.md
|
|
92
92
|
- docs/AutoOrderConsolidate.md
|
|
93
93
|
- docs/AutoOrderItem.md
|
|
94
|
+
- docs/AutoOrderItemCancelRequest.md
|
|
94
95
|
- docs/AutoOrderItemFutureSchedule.md
|
|
95
96
|
- docs/AutoOrderItemOption.md
|
|
96
97
|
- docs/AutoOrderItemSimpleSchedule.md
|
|
@@ -1086,6 +1087,7 @@ files:
|
|
|
1086
1087
|
- lib/ultracart_api/models/auto_order_addon_items_update_request.rb
|
|
1087
1088
|
- lib/ultracart_api/models/auto_order_consolidate.rb
|
|
1088
1089
|
- lib/ultracart_api/models/auto_order_item.rb
|
|
1090
|
+
- lib/ultracart_api/models/auto_order_item_cancel_request.rb
|
|
1089
1091
|
- lib/ultracart_api/models/auto_order_item_future_schedule.rb
|
|
1090
1092
|
- lib/ultracart_api/models/auto_order_item_option.rb
|
|
1091
1093
|
- lib/ultracart_api/models/auto_order_item_simple_schedule.rb
|