ultracart_api 3.10.144 → 3.10.146

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39c91f3ec6d30a93f663f0997ee62f848084921310f2d5eb0b09148ab9354734
4
- data.tar.gz: e81d1627f998da6ca6ab68a3487a2af4669863cf70fb1fc501223a62128bf6b2
3
+ metadata.gz: e7c61f72d815ceb5c95331bfb9025215a59951e5ba836d3d72e2a3f30b444e5f
4
+ data.tar.gz: cba6c610d2604647d35e718e1e7cb70b5a50e018a5a239272a37416004bc97c2
5
5
  SHA512:
6
- metadata.gz: fbac4795105adf91ef40b69f671e38dc3416d8766171ca72ac5ad9030849ed11089ba566b6339250dc56388ce051317fc3e088ceb5acb97031c41dad15c1adfa
7
- data.tar.gz: 35b34271cc9b26e8ef39eafd176d121bc49787d7084d49ffe5ebeaaa792b571e9dd6f35958a28bb19a8be5330a6ae63eea68c2a7b9d7a37326ba0881a40462b4
6
+ metadata.gz: 0c18d20de1273b6b0ffdf91443af22b4c2e40ee1f5d10359fc024a29f32c4375f0753b8452b257b0b3f1e4a6f535973e7e4a797d66bb7d75db353650b52379b3
7
+ data.tar.gz: 54e63d3345ccfbb7e9451ef839b036d50de9517c8dace04bc8b3f75438a0ba6dea152a55ea76e32de6de70bd1d93ab0ccbcbdf445ff5890ae9beb659b6d0216b
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.144
10
+ - Package version: 3.10.146
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.144.gem
27
+ gem install ./ultracart_api-3.10.146.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.144.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.146.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.144'
35
+ gem 'ultracart_api', '~> 3.10.146'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -88,6 +88,7 @@ Class | Method | HTTP request | Description
88
88
  ------------ | ------------- | ------------- | -------------
89
89
  *UltracartClient::AffiliateApi* | [**get_clicks_by_query**](docs/AffiliateApi.md#get_clicks_by_query) | **POST** /affiliate/clicks/query | Retrieve clicks
90
90
  *UltracartClient::AffiliateApi* | [**get_ledgers_by_query**](docs/AffiliateApi.md#get_ledgers_by_query) | **POST** /affiliate/ledgers/query | Retrieve ledger entries
91
+ *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
91
92
  *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
92
93
  *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
93
94
  *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
@@ -1356,6 +1357,8 @@ Not every change is committed to every SDK.
1356
1357
 
1357
1358
  | Version | Date | Comments |
1358
1359
  | --: | :-: | --- |
1360
+ | 3.10.146 | 06/20/2023 | auto order - establishAutoOrderByReferenceOrderId method added |
1361
+ | 3.10.145 | 06/20/2023 | coupon add allowed values for usable_by and new OncePerNewCustomerForItem flag |
1359
1362
  | 3.10.144 | 06/15/2023 | add pickup_dts to order.shipping object |
1360
1363
  | 3.10.143 | 06/14/2023 | dw bi: add request_dts on the execute queries request and report data set objects |
1361
1364
  | 3.10.142 | 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,60 @@ Method | HTTP request | Description
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
+ > AutoOrderResponse establish_auto_order_by_reference_order_id(reference_order_id, opts)
20
+
21
+ Establish an auto order by referencing a regular order id
22
+
23
+ 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.
24
+
25
+ ### Example
26
+ ```ruby
27
+ # load the gem
28
+ require 'ultracart_api'
29
+
30
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
31
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
32
+ api_instance = UltracartClient::AutoOrderApi.new_using_api_key(simple_key, false, false)
33
+
34
+
35
+ reference_order_id = 'reference_order_id_example' # String | The order id to attach this auto order to
36
+
37
+ opts = {
38
+ _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
39
+ }
40
+
41
+ begin
42
+ #Establish an auto order by referencing a regular order id
43
+ result = api_instance.establish_auto_order_by_reference_order_id(reference_order_id, opts)
44
+ p result
45
+ rescue UltracartClient::ApiError => e
46
+ puts "Exception when calling AutoOrderApi->establish_auto_order_by_reference_order_id: #{e}"
47
+ end
48
+ ```
49
+
50
+ ### Parameters
51
+
52
+ Name | Type | Description | Notes
53
+ ------------- | ------------- | ------------- | -------------
54
+ **reference_order_id** | **String**| The order id to attach this auto order to |
55
+ **_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]
56
+
57
+ ### Return type
58
+
59
+ [**AutoOrderResponse**](AutoOrderResponse.md)
60
+
61
+ ### Authorization
62
+
63
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: application/json
68
+ - **Accept**: application/json
69
+
70
+
71
+
17
72
  # **get_auto_order**
18
73
  > AutoOrderResponse get_auto_order(auto_order_oid, opts)
19
74
 
@@ -32,6 +32,64 @@ 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 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 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, Fixnum, 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' + '}', reference_order_id.to_s)
62
+
63
+ # query parameters
64
+ query_params = {}
65
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
66
+
67
+ # header parameters
68
+ 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
+ # HTTP header 'Content-Type'
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
74
+
75
+ # form parameters
76
+ form_params = {}
77
+
78
+ # http body (model)
79
+ post_body = nil
80
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => 'AutoOrderResponse')
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: AutoOrderApi#establish_auto_order_by_reference_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
35
93
  # Retrieve an auto order by oid
36
94
  # Retrieves a single auto order using the specified auto order oid.
37
95
  # @param auto_order_oid The auto order oid to retrieve.
@@ -165,6 +165,28 @@ module UltracartClient
165
165
  # Who may use this coupon.
166
166
  attr_accessor :usable_by
167
167
 
168
+ class EnumAttributeValidator
169
+ attr_reader :datatype
170
+ attr_reader :allowable_values
171
+
172
+ def initialize(datatype, allowable_values)
173
+ @allowable_values = allowable_values.map do |value|
174
+ case datatype.to_s
175
+ when /Integer/i
176
+ value.to_i
177
+ when /Float/i
178
+ value.to_f
179
+ else
180
+ value
181
+ end
182
+ end
183
+ end
184
+
185
+ def valid?(value)
186
+ !value || allowable_values.include?(value)
187
+ end
188
+ end
189
+
168
190
  # Attribute mapping from ruby-style variable name to JSON key.
169
191
  def self.attribute_map
170
192
  {
@@ -627,6 +649,8 @@ module UltracartClient
627
649
  return false if !@merchant_code.nil? && @merchant_code.to_s.length > 20
628
650
  return false if !@merchant_notes.nil? && @merchant_notes.to_s.length > 250
629
651
  return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
652
+ usable_by_validator = EnumAttributeValidator.new('String', ['Anyone', 'UniqueCode', 'OncePerCustomer', 'OncePerNewCustomer', 'OncePerNewCustomerForItem'])
653
+ return false unless usable_by_validator.valid?(@usable_by)
630
654
  return false if !@usable_by.nil? && @usable_by.to_s.length > 50
631
655
  true
632
656
  end
@@ -681,13 +705,13 @@ module UltracartClient
681
705
  @quickbooks_code = quickbooks_code
682
706
  end
683
707
 
684
- # Custom attribute writer method with validation
685
- # @param [Object] usable_by Value to be assigned
708
+ # Custom attribute writer method checking allowed values (enum).
709
+ # @param [Object] usable_by Object to be assigned
686
710
  def usable_by=(usable_by)
687
- if !usable_by.nil? && usable_by.to_s.length > 50
688
- fail ArgumentError, 'invalid value for "usable_by", the character length must be smaller than or equal to 50.'
711
+ validator = EnumAttributeValidator.new('String', ['Anyone', 'UniqueCode', 'OncePerCustomer', 'OncePerNewCustomer', 'OncePerNewCustomerForItem'])
712
+ unless validator.valid?(usable_by)
713
+ fail ArgumentError, 'invalid value for "usable_by", must be one of #{validator.allowable_values}.'
689
714
  end
690
-
691
715
  @usable_by = usable_by
692
716
  end
693
717
 
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.144'
14
+ VERSION = '3.10.146'
15
15
  end
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: 3.10.144
4
+ version: 3.10.146
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-15 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus