ultracart_api 4.0.160 → 4.0.162

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f45606430c58ef6679714d20c35600fc53b3149fb612400b9c67f994a9581ea
4
- data.tar.gz: ceee466218b3cae7b4e2485e6736d0f0fb6c10bc7e0cb683a9473bd824a330e4
3
+ metadata.gz: 4edfbbc263a0b6f8b853a70d46ca9cacf88f4952b6b23263f93c438a84e39e48
4
+ data.tar.gz: 4633d63b98a6b6b36049d822a0a359e7b249c6a26fe3406e102ae0ffe84c8a2b
5
5
  SHA512:
6
- metadata.gz: 44940d61428dd6b759f90d1a23bb8e8b53d53c64f77487f1647595ade727d797f1230c490029d2079a55e3c1c22f31178171f7f1a405be44f8ad27622bc2f079
7
- data.tar.gz: 9d1ec78fc7270f567f1420bdce4928fec44cd626baf1916af327e66e747c9b2f7582642bd70d8429b9c15329508539662c2cc44157269669b4460053f2e8a23a
6
+ metadata.gz: d1c69e1d5766cb7a9fd7957eb2b29a366fabcd4ff2146f36877b0948c76b5bcc9e9162b0281d234555374982b32a8f5e0f95c0925205cddfbedd27e209102491
7
+ data.tar.gz: 89f74cdf55ffcb5cba3be20f5a3848d8a95e0c8337e5e1f4ef55a100498e401d237e7f1018f891d5fb5f032cbbbfb1e4e9a019045b10d437bcd28785eb08b14c
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.160
10
+ - Package version: 4.0.162
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.160.gem
27
+ gem install ./ultracart_api-4.0.162.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.160.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.162.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.160'
36
+ gem 'ultracart_api', '~> 4.0.162'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -1364,6 +1364,8 @@ Not every change is committed to every SDK.
1364
1364
 
1365
1365
  | Version | Date | Comments |
1366
1366
  | --: | :-: | --- |
1367
+ | 4.0.162 | 06/20/2023 | coupon add allowed values for usable_by and new OncePerNewCustomerForItem flag |
1368
+ | 4.0.161 | 06/15/2023 | add pickup_dts to order.shipping object |
1367
1369
  | 4.0.160 | 06/14/2023 | dw bi: add request_dts on the execute queries request and report data set objects |
1368
1370
  | 4.0.159 | 06/09/2023 | distribution center pickup times |
1369
1371
  | 4.0.158 | 06/08/2023 | customer profile qb tax exempt reason code field |
data/docs/OrderApi.md CHANGED
@@ -107,7 +107,7 @@ end
107
107
 
108
108
  ## cancel_order
109
109
 
110
- > <BaseResponse> cancel_order(order_id)
110
+ > <BaseResponse> cancel_order(order_id, opts)
111
111
 
112
112
  Cancel an order
113
113
 
@@ -128,10 +128,14 @@ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/
128
128
 
129
129
  api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
130
130
  order_id = 'order_id_example' # String | The order id to cancel.
131
+ opts = {
132
+ lock_self_ship_orders: true, # Boolean | Flag to prevent a order shipping during a refund process
133
+ skip_refund_and_hold: true # Boolean | Skip refund and move order to Held Orders department
134
+ }
131
135
 
132
136
  begin
133
137
  # Cancel an order
134
- result = api_instance.cancel_order(order_id)
138
+ result = api_instance.cancel_order(order_id, opts)
135
139
  p result
136
140
  rescue UltracartClient::ApiError => e
137
141
  puts "Error when calling OrderApi->cancel_order: #{e}"
@@ -142,12 +146,12 @@ end
142
146
 
143
147
  This returns an Array which contains the response data, status code and headers.
144
148
 
145
- > <Array(<BaseResponse>, Integer, Hash)> cancel_order_with_http_info(order_id)
149
+ > <Array(<BaseResponse>, Integer, Hash)> cancel_order_with_http_info(order_id, opts)
146
150
 
147
151
  ```ruby
148
152
  begin
149
153
  # Cancel an order
150
- data, status_code, headers = api_instance.cancel_order_with_http_info(order_id)
154
+ data, status_code, headers = api_instance.cancel_order_with_http_info(order_id, opts)
151
155
  p status_code # => 2xx
152
156
  p headers # => { ... }
153
157
  p data # => <BaseResponse>
@@ -161,6 +165,8 @@ end
161
165
  | Name | Type | Description | Notes |
162
166
  | ---- | ---- | ----------- | ----- |
163
167
  | **order_id** | **String** | The order id to cancel. | |
168
+ | **lock_self_ship_orders** | **Boolean** | Flag to prevent a order shipping during a refund process | [optional] |
169
+ | **skip_refund_and_hold** | **Boolean** | Skip refund and move order to Held Orders department | [optional] |
164
170
 
165
171
  ### Return type
166
172
 
@@ -19,6 +19,7 @@
19
19
  | **least_cost_route** | **Boolean** | If true, instructs UltraCart to apply the cheapest shipping method to this order. Used only for channel partner order inserts. | [optional] |
20
20
  | **least_cost_route_shipping_methods** | **Array&lt;String&gt;** | List of shipping methods to consider if least_code_route is true. Used only for channel parter order inserts. | [optional] |
21
21
  | **lift_gate** | **Boolean** | Lift gate requested (LTL shipping methods only) | [optional] |
22
+ | **pickup_dts** | **String** | Date/time the order should be picked up locally. | [optional] |
22
23
  | **postal_code** | **String** | Postal code | [optional] |
23
24
  | **rma** | **String** | RMA number | [optional] |
24
25
  | **ship_on_date** | **String** | Date the customer is requesting that the order ship on. Typically used for perishable product delivery. | [optional] |
@@ -56,6 +57,7 @@ instance = UltracartClient::OrderShipping.new(
56
57
  least_cost_route: null,
57
58
  least_cost_route_shipping_methods: null,
58
59
  lift_gate: null,
60
+ pickup_dts: null,
59
61
  postal_code: null,
60
62
  rma: null,
61
63
  ship_on_date: null,
@@ -106,6 +106,8 @@ module UltracartClient
106
106
  # Cancel an order on the UltraCart account. If the success flag is false, then consult the error message for why it failed.
107
107
  # @param order_id [String] The order id to cancel.
108
108
  # @param [Hash] opts the optional parameters
109
+ # @option opts [Boolean] :lock_self_ship_orders Flag to prevent a order shipping during a refund process
110
+ # @option opts [Boolean] :skip_refund_and_hold Skip refund and move order to Held Orders department
109
111
  # @return [BaseResponse]
110
112
  def cancel_order(order_id, opts = {})
111
113
  data, _status_code, _headers = cancel_order_with_http_info(order_id, opts)
@@ -116,6 +118,8 @@ module UltracartClient
116
118
  # Cancel an order on the UltraCart account. If the success flag is false, then consult the error message for why it failed.
117
119
  # @param order_id [String] The order id to cancel.
118
120
  # @param [Hash] opts the optional parameters
121
+ # @option opts [Boolean] :lock_self_ship_orders Flag to prevent a order shipping during a refund process
122
+ # @option opts [Boolean] :skip_refund_and_hold Skip refund and move order to Held Orders department
119
123
  # @return [Array<(BaseResponse, Integer, Hash)>] BaseResponse data, response status code and response headers
120
124
  def cancel_order_with_http_info(order_id, opts = {})
121
125
  if @api_client.config.debugging
@@ -130,6 +134,8 @@ module UltracartClient
130
134
 
131
135
  # query parameters
132
136
  query_params = opts[:query_params] || {}
137
+ query_params[:'lock_self_ship_orders'] = opts[:'lock_self_ship_orders'] if !opts[:'lock_self_ship_orders'].nil?
138
+ query_params[:'skip_refund_and_hold'] = opts[:'skip_refund_and_hold'] if !opts[:'skip_refund_and_hold'].nil?
133
139
 
134
140
  # header parameters
135
141
  header_params = opts[:header_params] || {}
@@ -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 with validation
704
- # @param [Object] usable_by Value to be assigned
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
- if !usable_by.nil? && usable_by.to_s.length > 50
707
- fail ArgumentError, 'invalid value for "usable_by", the character length must be smaller than or equal to 50.'
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
 
@@ -60,6 +60,9 @@ module UltracartClient
60
60
  # Lift gate requested (LTL shipping methods only)
61
61
  attr_accessor :lift_gate
62
62
 
63
+ # Date/time the order should be picked up locally.
64
+ attr_accessor :pickup_dts
65
+
63
66
  # Postal code
64
67
  attr_accessor :postal_code
65
68
 
@@ -122,6 +125,7 @@ module UltracartClient
122
125
  :'least_cost_route' => :'least_cost_route',
123
126
  :'least_cost_route_shipping_methods' => :'least_cost_route_shipping_methods',
124
127
  :'lift_gate' => :'lift_gate',
128
+ :'pickup_dts' => :'pickup_dts',
125
129
  :'postal_code' => :'postal_code',
126
130
  :'rma' => :'rma',
127
131
  :'ship_on_date' => :'ship_on_date',
@@ -163,6 +167,7 @@ module UltracartClient
163
167
  :'least_cost_route' => :'Boolean',
164
168
  :'least_cost_route_shipping_methods' => :'Array<String>',
165
169
  :'lift_gate' => :'Boolean',
170
+ :'pickup_dts' => :'String',
166
171
  :'postal_code' => :'String',
167
172
  :'rma' => :'String',
168
173
  :'ship_on_date' => :'String',
@@ -264,6 +269,10 @@ module UltracartClient
264
269
  self.lift_gate = attributes[:'lift_gate']
265
270
  end
266
271
 
272
+ if attributes.key?(:'pickup_dts')
273
+ self.pickup_dts = attributes[:'pickup_dts']
274
+ end
275
+
267
276
  if attributes.key?(:'postal_code')
268
277
  self.postal_code = attributes[:'postal_code']
269
278
  end
@@ -617,6 +626,7 @@ module UltracartClient
617
626
  least_cost_route == o.least_cost_route &&
618
627
  least_cost_route_shipping_methods == o.least_cost_route_shipping_methods &&
619
628
  lift_gate == o.lift_gate &&
629
+ pickup_dts == o.pickup_dts &&
620
630
  postal_code == o.postal_code &&
621
631
  rma == o.rma &&
622
632
  ship_on_date == o.ship_on_date &&
@@ -643,7 +653,7 @@ module UltracartClient
643
653
  # Calculates hash code according to all attributes.
644
654
  # @return [Integer] Hash code
645
655
  def hash
646
- [address1, address2, city, company, country_code, day_phone, day_phone_e164, delivery_date, evening_phone, evening_phone_e164, first_name, last_name, least_cost_route, least_cost_route_shipping_methods, lift_gate, postal_code, rma, ship_on_date, ship_to_residential, shipping_3rd_party_account_number, shipping_date, shipping_department_status, shipping_method, shipping_method_accounting_code, special_instructions, state_region, title, tracking_number_details, tracking_numbers, weight].hash
656
+ [address1, address2, city, company, country_code, day_phone, day_phone_e164, delivery_date, evening_phone, evening_phone_e164, first_name, last_name, least_cost_route, least_cost_route_shipping_methods, lift_gate, pickup_dts, postal_code, rma, ship_on_date, ship_to_residential, shipping_3rd_party_account_number, shipping_date, shipping_department_status, shipping_method, shipping_method_accounting_code, special_instructions, state_region, title, tracking_number_details, tracking_numbers, weight].hash
647
657
  end
648
658
 
649
659
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.160'
14
+ VERSION = '4.0.162'
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: 4.0.160
4
+ version: 4.0.162
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-14 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