ultracart_api 4.0.161 → 4.0.163
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 +7 -4
- data/docs/AutoOrderApi.md +76 -0
- data/lib/ultracart_api/api/auto_order_api.rb +67 -0
- data/lib/ultracart_api/models/coupon.rb +29 -5
- data/lib/ultracart_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37ac8ecdffea2efc58a7cfed3a3d781196784bce4eb054c1a001aa7e7655889d
|
4
|
+
data.tar.gz: 8c9d4c4c7a5bfc7e3feba016623ae064c05496c628e141714a1ab8a3db868363
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1cf1043b630a8c1dcddac1c5c3e20905c4bd8e16b4f45c149d311adb3f8d06a4e95376a55ec5d95e5acd27909859dc6f15ccd311e5d9320b92c3c7094173573
|
7
|
+
data.tar.gz: fd803f9f023bbd201108cb7c690bb77d946df4e64e81e43493a5a3961a37d2e17b442ef45fd798a5c27447553491cc02c8d2146eb4c3eb3f6dc6dd3b51b8eea6
|
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.163
|
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.163.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.163.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.163'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -94,6 +94,7 @@ Class | Method | HTTP request | Description
|
|
94
94
|
------------ | ------------- | ------------- | -------------
|
95
95
|
*UltracartClient::AffiliateApi* | [**get_clicks_by_query**](docs/AffiliateApi.md#get_clicks_by_query) | **POST** /affiliate/clicks/query | Retrieve clicks
|
96
96
|
*UltracartClient::AffiliateApi* | [**get_ledgers_by_query**](docs/AffiliateApi.md#get_ledgers_by_query) | **POST** /affiliate/ledgers/query | Retrieve ledger entries
|
97
|
+
*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
|
97
98
|
*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
|
98
99
|
*UltracartClient::AutoOrderApi* | [**get_auto_order_by_code**](docs/AutoOrderApi.md#get_auto_order_by_code) | **GET** /auto_order/auto_orders/code/{auto_order_code} | Retrieve an auto order by code
|
99
100
|
*UltracartClient::AutoOrderApi* | [**get_auto_order_by_reference_order_id**](docs/AutoOrderApi.md#get_auto_order_by_reference_order_id) | **GET** /auto_order/auto_orders/reference_order_id/{reference_order_id} | Retrieve an auto order by order id
|
@@ -1364,6 +1365,8 @@ Not every change is committed to every SDK.
|
|
1364
1365
|
|
1365
1366
|
| Version | Date | Comments |
|
1366
1367
|
| --: | :-: | --- |
|
1368
|
+
| 4.0.163 | 06/20/2023 | auto order - establishAutoOrderByReferenceOrderId method added |
|
1369
|
+
| 4.0.162 | 06/20/2023 | coupon add allowed values for usable_by and new OncePerNewCustomerForItem flag |
|
1367
1370
|
| 4.0.161 | 06/15/2023 | add pickup_dts to order.shipping object |
|
1368
1371
|
| 4.0.160 | 06/14/2023 | dw bi: add request_dts on the execute queries request and report data set objects |
|
1369
1372
|
| 4.0.159 | 06/09/2023 | distribution center pickup times |
|
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
|
+
| [**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 |
|
7
8
|
| [**get_auto_order**](AutoOrderApi.md#get_auto_order) | **GET** /auto_order/auto_orders/{auto_order_oid} | Retrieve an auto order by oid |
|
8
9
|
| [**get_auto_order_by_code**](AutoOrderApi.md#get_auto_order_by_code) | **GET** /auto_order/auto_orders/code/{auto_order_code} | Retrieve an auto order by code |
|
9
10
|
| [**get_auto_order_by_reference_order_id**](AutoOrderApi.md#get_auto_order_by_reference_order_id) | **GET** /auto_order/auto_orders/reference_order_id/{reference_order_id} | Retrieve an auto order by order id |
|
@@ -14,6 +15,81 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
14
15
|
| [**update_auto_orders_batch**](AutoOrderApi.md#update_auto_orders_batch) | **PUT** /auto_order/auto_orders/batch | Update multiple auto orders |
|
15
16
|
|
16
17
|
|
18
|
+
## establish_auto_order_by_reference_order_id
|
19
|
+
|
20
|
+
> <AutoOrderResponse> establish_auto_order_by_reference_order_id(reference_order_id, opts)
|
21
|
+
|
22
|
+
Establish an auto order by referencing a regular order id
|
23
|
+
|
24
|
+
Establish an auto order by referencing a regular order id. The result will be an auto order without any items. You should add the items and perform an update call. Orders must be less than 60 days old and use a credit card payment.
|
25
|
+
|
26
|
+
### Examples
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
require 'time'
|
30
|
+
require 'ultracart_api'
|
31
|
+
require 'json'
|
32
|
+
require 'yaml'
|
33
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
34
|
+
|
35
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
36
|
+
# As such, this might not be the best way to use this object.
|
37
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
38
|
+
|
39
|
+
api = UltracartClient::AutoOrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
40
|
+
reference_order_id = 'reference_order_id_example' # String | The order id to attach this auto order to
|
41
|
+
opts = {
|
42
|
+
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
|
43
|
+
}
|
44
|
+
|
45
|
+
begin
|
46
|
+
# Establish an auto order by referencing a regular order id
|
47
|
+
result = api_instance.establish_auto_order_by_reference_order_id(reference_order_id, opts)
|
48
|
+
p result
|
49
|
+
rescue UltracartClient::ApiError => e
|
50
|
+
puts "Error when calling AutoOrderApi->establish_auto_order_by_reference_order_id: #{e}"
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
#### Using the establish_auto_order_by_reference_order_id_with_http_info variant
|
55
|
+
|
56
|
+
This returns an Array which contains the response data, status code and headers.
|
57
|
+
|
58
|
+
> <Array(<AutoOrderResponse>, Integer, Hash)> establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts)
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
begin
|
62
|
+
# Establish an auto order by referencing a regular order id
|
63
|
+
data, status_code, headers = api_instance.establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts)
|
64
|
+
p status_code # => 2xx
|
65
|
+
p headers # => { ... }
|
66
|
+
p data # => <AutoOrderResponse>
|
67
|
+
rescue UltracartClient::ApiError => e
|
68
|
+
puts "Error when calling AutoOrderApi->establish_auto_order_by_reference_order_id_with_http_info: #{e}"
|
69
|
+
end
|
70
|
+
```
|
71
|
+
|
72
|
+
### Parameters
|
73
|
+
|
74
|
+
| Name | Type | Description | Notes |
|
75
|
+
| ---- | ---- | ----------- | ----- |
|
76
|
+
| **reference_order_id** | **String** | The order id to attach this auto order to | |
|
77
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
78
|
+
|
79
|
+
### Return type
|
80
|
+
|
81
|
+
[**AutoOrderResponse**](AutoOrderResponse.md)
|
82
|
+
|
83
|
+
### Authorization
|
84
|
+
|
85
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
86
|
+
|
87
|
+
### HTTP request headers
|
88
|
+
|
89
|
+
- **Content-Type**: Not defined
|
90
|
+
- **Accept**: application/json
|
91
|
+
|
92
|
+
|
17
93
|
## get_auto_order
|
18
94
|
|
19
95
|
> <AutoOrderResponse> get_auto_order(auto_order_oid, opts)
|
@@ -32,6 +32,73 @@ module UltracartClient
|
|
32
32
|
UltracartClient::AutoOrderApi.new(api_client)
|
33
33
|
end
|
34
34
|
|
35
|
+
# Establish an auto order by referencing a regular order id
|
36
|
+
# Establish an auto order by referencing a regular order id. The result will be an auto order without any items. You should add the items and perform an update call. Orders must be less than 60 days old and use a credit card payment.
|
37
|
+
# @param reference_order_id [String] The order id to attach this auto order to
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
40
|
+
# @return [AutoOrderResponse]
|
41
|
+
def establish_auto_order_by_reference_order_id(reference_order_id, opts = {})
|
42
|
+
data, _status_code, _headers = establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts)
|
43
|
+
data
|
44
|
+
end
|
45
|
+
|
46
|
+
# Establish an auto order by referencing a regular order id
|
47
|
+
# Establish an auto order by referencing a regular order id. The result will be an auto order without any items. You should add the items and perform an update call. Orders must be less than 60 days old and use a credit card payment.
|
48
|
+
# @param reference_order_id [String] The order id to attach this auto order to
|
49
|
+
# @param [Hash] opts the optional parameters
|
50
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
51
|
+
# @return [Array<(AutoOrderResponse, Integer, Hash)>] AutoOrderResponse data, response status code and response headers
|
52
|
+
def establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts = {})
|
53
|
+
if @api_client.config.debugging
|
54
|
+
@api_client.config.logger.debug 'Calling API: AutoOrderApi.establish_auto_order_by_reference_order_id ...'
|
55
|
+
end
|
56
|
+
# verify the required parameter 'reference_order_id' is set
|
57
|
+
if @api_client.config.client_side_validation && reference_order_id.nil?
|
58
|
+
fail ArgumentError, "Missing the required parameter 'reference_order_id' when calling AutoOrderApi.establish_auto_order_by_reference_order_id"
|
59
|
+
end
|
60
|
+
# resource path
|
61
|
+
local_var_path = '/auto_order/auto_orders/reference_order_id/{reference_order_id}'.sub('{' + 'reference_order_id' + '}', CGI.escape(reference_order_id.to_s))
|
62
|
+
|
63
|
+
# query parameters
|
64
|
+
query_params = opts[:query_params] || {}
|
65
|
+
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
66
|
+
|
67
|
+
# header parameters
|
68
|
+
header_params = opts[:header_params] || {}
|
69
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
70
|
+
# HTTP header 'Accept' (if needed)
|
71
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
72
|
+
|
73
|
+
# form parameters
|
74
|
+
form_params = opts[:form_params] || {}
|
75
|
+
|
76
|
+
# http body (model)
|
77
|
+
post_body = opts[:debug_body]
|
78
|
+
|
79
|
+
# return_type
|
80
|
+
return_type = opts[:debug_return_type] || 'AutoOrderResponse'
|
81
|
+
|
82
|
+
# auth_names
|
83
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
84
|
+
|
85
|
+
new_options = opts.merge(
|
86
|
+
:operation => :"AutoOrderApi.establish_auto_order_by_reference_order_id",
|
87
|
+
:header_params => header_params,
|
88
|
+
:query_params => query_params,
|
89
|
+
:form_params => form_params,
|
90
|
+
:body => post_body,
|
91
|
+
:auth_names => auth_names,
|
92
|
+
:return_type => return_type
|
93
|
+
)
|
94
|
+
|
95
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug "API called: AutoOrderApi#establish_auto_order_by_reference_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
98
|
+
end
|
99
|
+
return data, status_code, headers
|
100
|
+
end
|
101
|
+
|
35
102
|
# Retrieve an auto order by oid
|
36
103
|
# Retrieves a single auto order using the specified auto order oid.
|
37
104
|
# @param auto_order_oid [Integer] The auto order oid to retrieve.
|
@@ -166,6 +166,28 @@ module UltracartClient
|
|
166
166
|
# Who may use this coupon.
|
167
167
|
attr_accessor :usable_by
|
168
168
|
|
169
|
+
class EnumAttributeValidator
|
170
|
+
attr_reader :datatype
|
171
|
+
attr_reader :allowable_values
|
172
|
+
|
173
|
+
def initialize(datatype, allowable_values)
|
174
|
+
@allowable_values = allowable_values.map do |value|
|
175
|
+
case datatype.to_s
|
176
|
+
when /Integer/i
|
177
|
+
value.to_i
|
178
|
+
when /Float/i
|
179
|
+
value.to_f
|
180
|
+
else
|
181
|
+
value
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
|
186
|
+
def valid?(value)
|
187
|
+
!value || allowable_values.include?(value)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
169
191
|
# Attribute mapping from ruby-style variable name to JSON key.
|
170
192
|
def self.attribute_map
|
171
193
|
{
|
@@ -646,6 +668,8 @@ module UltracartClient
|
|
646
668
|
return false if !@merchant_code.nil? && @merchant_code.to_s.length > 20
|
647
669
|
return false if !@merchant_notes.nil? && @merchant_notes.to_s.length > 250
|
648
670
|
return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
|
671
|
+
usable_by_validator = EnumAttributeValidator.new('String', ["Anyone", "UniqueCode", "OncePerCustomer", "OncePerNewCustomer", "OncePerNewCustomerForItem"])
|
672
|
+
return false unless usable_by_validator.valid?(@usable_by)
|
649
673
|
return false if !@usable_by.nil? && @usable_by.to_s.length > 50
|
650
674
|
true
|
651
675
|
end
|
@@ -700,13 +724,13 @@ module UltracartClient
|
|
700
724
|
@quickbooks_code = quickbooks_code
|
701
725
|
end
|
702
726
|
|
703
|
-
# Custom attribute writer method
|
704
|
-
# @param [Object] usable_by
|
727
|
+
# Custom attribute writer method checking allowed values (enum).
|
728
|
+
# @param [Object] usable_by Object to be assigned
|
705
729
|
def usable_by=(usable_by)
|
706
|
-
|
707
|
-
|
730
|
+
validator = EnumAttributeValidator.new('String', ["Anyone", "UniqueCode", "OncePerCustomer", "OncePerNewCustomer", "OncePerNewCustomerForItem"])
|
731
|
+
unless validator.valid?(usable_by)
|
732
|
+
fail ArgumentError, "invalid value for \"usable_by\", must be one of #{validator.allowable_values}."
|
708
733
|
end
|
709
|
-
|
710
734
|
@usable_by = usable_by
|
711
735
|
end
|
712
736
|
|
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.163
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|