ultracart_api 3.10.96 → 3.10.97

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: ae7c3fe7f3ea18bb1f0700632b841064073ea5ef110ac3b4409d287dbc276850
4
- data.tar.gz: 0cfe6137e68dba017705dff6ea2c0eada91c63e483f1aabc05e537a57c23f3b8
3
+ metadata.gz: 756bdb0708f6e3d175b1dd997705c933b17fdb839affc51e3785d32c1b28341a
4
+ data.tar.gz: 2a7a3c5843e258814fd6dd390f79abb6f8554fa01d70c1620afd306a8c37741f
5
5
  SHA512:
6
- metadata.gz: 62162ccf7a46134481e0bb4cc56b48945f1c0ad877471d29240b3e28d036b7e5db2a3b908b737d3475eec8a087913c3c9810a7d503288f497f8eacec00f7f125
7
- data.tar.gz: f5210050fce783cf5ef95e8b1d1758179479862411353545d8203d926a1f54e23111bcf1e545e1deeffafb6c62e802884d37e3d06db8ace576094d2ced11af5d
6
+ metadata.gz: 3d6b1d340a81d9332a7b0ef08a6261c29aae1c01eaeb884e7c231f3a24229ba2bf2f62ab5870fe2a0412db4787c2fcc8589aaea029be456c19f36114ba68ecb8
7
+ data.tar.gz: c261b4d26c3d8b29488446b551edcf00031e4113c9451b45c02b3c89c4f2b939f6e9c8d78e4388cbca3b44457d25e41298676a1467c2bcf38762c503fbaccc55
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.96
10
+ - Package version: 3.10.97
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.96.gem
27
+ gem install ./ultracart_api-3.10.97.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.96.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.97.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.96'
35
+ gem 'ultracart_api', '~> 3.10.97'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -547,6 +547,7 @@ Class | Method | HTTP request | Description
547
547
  - [UltracartClient::CartItemOption](docs/CartItemOption.md)
548
548
  - [UltracartClient::CartItemOptionValue](docs/CartItemOptionValue.md)
549
549
  - [UltracartClient::CartItemPhysical](docs/CartItemPhysical.md)
550
+ - [UltracartClient::CartItemProperty](docs/CartItemProperty.md)
550
551
  - [UltracartClient::CartItemVariationSelection](docs/CartItemVariationSelection.md)
551
552
  - [UltracartClient::CartKitComponentOption](docs/CartKitComponentOption.md)
552
553
  - [UltracartClient::CartMarketing](docs/CartMarketing.md)
@@ -1281,6 +1282,7 @@ Not every change is committed to every SDK.
1281
1282
 
1282
1283
  | Version | Date | Comments |
1283
1284
  | --: | :-: | --- |
1285
+ | 3.10.97 | 01/17/2023 | support for checkout item properties |
1284
1286
  | 3.10.96 | 01/14/2023 | add external_id to the point of sale location object |
1285
1287
  | 3.10.95 | 01/13/2023 | channel - ops to manage ship to prefs |
1286
1288
  | 3.10.94 | 01/11/2023 | conversations - adjust search results to return multiple convo summaries |
data/docs/CartItem.md CHANGED
@@ -23,6 +23,7 @@ Name | Type | Description | Notes
23
23
  **phsyical** | [**CartItemPhysical**](CartItemPhysical.md) | | [optional]
24
24
  **position** | **Integer** | Position of the item in the cart | [optional]
25
25
  **preorder** | **BOOLEAN** | True if this item is on pre-order | [optional]
26
+ **properties** | [**Array<CartItemProperty>**](CartItemProperty.md) | Properties associated with the item | [optional]
26
27
  **quantity** | **Float** | quantity | [optional]
27
28
  **schedules** | **Array<String>** | Customer selectable auto order schedules | [optional]
28
29
  **total_cost** | [**Currency**](Currency.md) | | [optional]
@@ -0,0 +1,11 @@
1
+ # UltracartClient::CartItemProperty
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **display** | **BOOLEAN** | True if this property is displayed to the customer | [optional]
7
+ **expiration_dts** | **String** | The date/time that the property expires and is deleted | [optional]
8
+ **name** | **String** | Name | [optional]
9
+ **value** | **String** | Value | [optional]
10
+
11
+
@@ -70,6 +70,9 @@ module UltracartClient
70
70
  # True if this item is on pre-order
71
71
  attr_accessor :preorder
72
72
 
73
+ # Properties associated with the item
74
+ attr_accessor :properties
75
+
73
76
  # quantity
74
77
  attr_accessor :quantity
75
78
 
@@ -116,6 +119,7 @@ module UltracartClient
116
119
  :'phsyical' => :'phsyical',
117
120
  :'position' => :'position',
118
121
  :'preorder' => :'preorder',
122
+ :'properties' => :'properties',
119
123
  :'quantity' => :'quantity',
120
124
  :'schedules' => :'schedules',
121
125
  :'total_cost' => :'total_cost',
@@ -151,6 +155,7 @@ module UltracartClient
151
155
  :'phsyical' => :'CartItemPhysical',
152
156
  :'position' => :'Integer',
153
157
  :'preorder' => :'BOOLEAN',
158
+ :'properties' => :'Array<CartItemProperty>',
154
159
  :'quantity' => :'Float',
155
160
  :'schedules' => :'Array<String>',
156
161
  :'total_cost' => :'Currency',
@@ -259,6 +264,12 @@ module UltracartClient
259
264
  self.preorder = attributes[:'preorder']
260
265
  end
261
266
 
267
+ if attributes.has_key?(:'properties')
268
+ if (value = attributes[:'properties']).is_a?(Array)
269
+ self.properties = value
270
+ end
271
+ end
272
+
262
273
  if attributes.has_key?(:'quantity')
263
274
  self.quantity = attributes[:'quantity']
264
275
  end
@@ -338,6 +349,7 @@ module UltracartClient
338
349
  phsyical == o.phsyical &&
339
350
  position == o.position &&
340
351
  preorder == o.preorder &&
352
+ properties == o.properties &&
341
353
  quantity == o.quantity &&
342
354
  schedules == o.schedules &&
343
355
  total_cost == o.total_cost &&
@@ -358,7 +370,7 @@ module UltracartClient
358
370
  # Calculates hash code according to all attributes.
359
371
  # @return [Fixnum] Hash code
360
372
  def hash
361
- [arbitrary_unit_cost, attributes, auto_order_schedule, default_image_url, default_thumbnail_url, description, discount, extended_description, item_id, item_oid, kit, kit_component_options, manufacturer_suggested_retail_price, maximum_quantity, minimum_quantity, multimedia, options, phsyical, position, preorder, quantity, schedules, total_cost, total_cost_with_discount, unit_cost, unit_cost_with_discount, upsell, variations, view_url].hash
373
+ [arbitrary_unit_cost, attributes, auto_order_schedule, default_image_url, default_thumbnail_url, description, discount, extended_description, item_id, item_oid, kit, kit_component_options, manufacturer_suggested_retail_price, maximum_quantity, minimum_quantity, multimedia, options, phsyical, position, preorder, properties, quantity, schedules, total_cost, total_cost_with_discount, unit_cost, unit_cost_with_discount, upsell, variations, view_url].hash
362
374
  end
363
375
 
364
376
  # Builds the object from hash
@@ -0,0 +1,245 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class CartItemProperty
17
+ # True if this property is displayed to the customer
18
+ attr_accessor :display
19
+
20
+ # The date/time that the property expires and is deleted
21
+ attr_accessor :expiration_dts
22
+
23
+ # Name
24
+ attr_accessor :name
25
+
26
+ # Value
27
+ attr_accessor :value
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'display' => :'display',
33
+ :'expiration_dts' => :'expiration_dts',
34
+ :'name' => :'name',
35
+ :'value' => :'value'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'display' => :'BOOLEAN',
43
+ :'expiration_dts' => :'String',
44
+ :'name' => :'String',
45
+ :'value' => :'String'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'display')
58
+ self.display = attributes[:'display']
59
+ end
60
+
61
+ if attributes.has_key?(:'expiration_dts')
62
+ self.expiration_dts = attributes[:'expiration_dts']
63
+ end
64
+
65
+ if attributes.has_key?(:'name')
66
+ self.name = attributes[:'name']
67
+ end
68
+
69
+ if attributes.has_key?(:'value')
70
+ self.value = attributes[:'value']
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ invalid_properties = Array.new
78
+ if !@name.nil? && @name.to_s.length > 100
79
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
80
+ end
81
+
82
+ if !@value.nil? && @value.to_s.length > 3800
83
+ invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 3800.')
84
+ end
85
+
86
+ invalid_properties
87
+ end
88
+
89
+ # Check to see if the all the properties in the model are valid
90
+ # @return true if the model is valid
91
+ def valid?
92
+ return false if !@name.nil? && @name.to_s.length > 100
93
+ return false if !@value.nil? && @value.to_s.length > 3800
94
+ true
95
+ end
96
+
97
+ # Custom attribute writer method with validation
98
+ # @param [Object] name Value to be assigned
99
+ def name=(name)
100
+ if !name.nil? && name.to_s.length > 100
101
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
102
+ end
103
+
104
+ @name = name
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] value Value to be assigned
109
+ def value=(value)
110
+ if !value.nil? && value.to_s.length > 3800
111
+ fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 3800.'
112
+ end
113
+
114
+ @value = value
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ display == o.display &&
123
+ expiration_dts == o.expiration_dts &&
124
+ name == o.name &&
125
+ value == o.value
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [display, expiration_dts, name, value].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = UltracartClient.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.96'
14
+ VERSION = '3.10.97'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -79,6 +79,7 @@ require 'ultracart_api/models/cart_item_multimedia_thumbnail'
79
79
  require 'ultracart_api/models/cart_item_option'
80
80
  require 'ultracart_api/models/cart_item_option_value'
81
81
  require 'ultracart_api/models/cart_item_physical'
82
+ require 'ultracart_api/models/cart_item_property'
82
83
  require 'ultracart_api/models/cart_item_variation_selection'
83
84
  require 'ultracart_api/models/cart_kit_component_option'
84
85
  require 'ultracart_api/models/cart_marketing'
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.96
4
+ version: 3.10.97
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-14 00:00:00.000000000 Z
11
+ date: 2023-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -285,6 +285,7 @@ files:
285
285
  - docs/CartItemOption.md
286
286
  - docs/CartItemOptionValue.md
287
287
  - docs/CartItemPhysical.md
288
+ - docs/CartItemProperty.md
288
289
  - docs/CartItemVariationSelection.md
289
290
  - docs/CartKitComponentOption.md
290
291
  - docs/CartMarketing.md
@@ -1052,6 +1053,7 @@ files:
1052
1053
  - lib/ultracart_api/models/cart_item_option.rb
1053
1054
  - lib/ultracart_api/models/cart_item_option_value.rb
1054
1055
  - lib/ultracart_api/models/cart_item_physical.rb
1056
+ - lib/ultracart_api/models/cart_item_property.rb
1055
1057
  - lib/ultracart_api/models/cart_item_variation_selection.rb
1056
1058
  - lib/ultracart_api/models/cart_kit_component_option.rb
1057
1059
  - lib/ultracart_api/models/cart_marketing.rb