ultracart_api 3.10.95 → 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: cb0ce63beb97a544421dff5628b9a1bf0b8be1b855e620f5d83ed23b720d993f
4
- data.tar.gz: cefc368bd2121737c39724c0272d051373649a78deb4b78cf61f05c389174c07
3
+ metadata.gz: 756bdb0708f6e3d175b1dd997705c933b17fdb839affc51e3785d32c1b28341a
4
+ data.tar.gz: 2a7a3c5843e258814fd6dd390f79abb6f8554fa01d70c1620afd306a8c37741f
5
5
  SHA512:
6
- metadata.gz: 3ca959b5cdf6593bb3deb495109c04b2938de1556b1d39e7e312384090a42491fb39819f5de328a830a81ddc7630e8a759e28e0de411f08262709ec9e689b4db
7
- data.tar.gz: 4ac69d5f2e67c923722c8ed8fcb94b1b2a3496da0ece88cb14e07a0f5522420bb212bddc64db4916d3851c2ce54d26153516bc7f6a8c468334b1a1137095ba51
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.95
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.95.gem
27
+ gem install ./ultracart_api-3.10.97.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.95.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.95'
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,8 @@ 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 |
1286
+ | 3.10.96 | 01/14/2023 | add external_id to the point of sale location object |
1284
1287
  | 3.10.95 | 01/13/2023 | channel - ops to manage ship to prefs |
1285
1288
  | 3.10.94 | 01/11/2023 | conversations - adjust search results to return multiple convo summaries |
1286
1289
  | 3.10.93 | 01/10/2023 | add method to query integration log record by oid |
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
+
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **city** | **String** | City | [optional]
9
9
  **country** | **String** | Country | [optional]
10
10
  **distribution_center_code** | **String** | The distribution center code where inventory is reduced from for this sale. | [optional]
11
+ **external_id** | **String** | External Id useful for syncing with a remote filesystem, this may be an MD5 hash or whatever suits your needs. | [optional]
11
12
  **merchant_id** | **String** | Merchant ID that owns this location | [optional]
12
13
  **pos_location_oid** | **Integer** | Object identifier of the point of sale location. | [optional]
13
14
  **postal_code** | **String** | Postal code | [optional]
@@ -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
@@ -29,6 +29,9 @@ module UltracartClient
29
29
  # The distribution center code where inventory is reduced from for this sale.
30
30
  attr_accessor :distribution_center_code
31
31
 
32
+ # External Id useful for syncing with a remote filesystem, this may be an MD5 hash or whatever suits your needs.
33
+ attr_accessor :external_id
34
+
32
35
  # Merchant ID that owns this location
33
36
  attr_accessor :merchant_id
34
37
 
@@ -49,6 +52,7 @@ module UltracartClient
49
52
  :'city' => :'city',
50
53
  :'country' => :'country',
51
54
  :'distribution_center_code' => :'distribution_center_code',
55
+ :'external_id' => :'external_id',
52
56
  :'merchant_id' => :'merchant_id',
53
57
  :'pos_location_oid' => :'pos_location_oid',
54
58
  :'postal_code' => :'postal_code',
@@ -64,6 +68,7 @@ module UltracartClient
64
68
  :'city' => :'String',
65
69
  :'country' => :'String',
66
70
  :'distribution_center_code' => :'String',
71
+ :'external_id' => :'String',
67
72
  :'merchant_id' => :'String',
68
73
  :'pos_location_oid' => :'Integer',
69
74
  :'postal_code' => :'String',
@@ -99,6 +104,10 @@ module UltracartClient
99
104
  self.distribution_center_code = attributes[:'distribution_center_code']
100
105
  end
101
106
 
107
+ if attributes.has_key?(:'external_id')
108
+ self.external_id = attributes[:'external_id']
109
+ end
110
+
102
111
  if attributes.has_key?(:'merchant_id')
103
112
  self.merchant_id = attributes[:'merchant_id']
104
113
  end
@@ -120,15 +129,30 @@ module UltracartClient
120
129
  # @return Array for valid properties with the reasons
121
130
  def list_invalid_properties
122
131
  invalid_properties = Array.new
132
+ if !@external_id.nil? && @external_id.to_s.length > 100
133
+ invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
134
+ end
135
+
123
136
  invalid_properties
124
137
  end
125
138
 
126
139
  # Check to see if the all the properties in the model are valid
127
140
  # @return true if the model is valid
128
141
  def valid?
142
+ return false if !@external_id.nil? && @external_id.to_s.length > 100
129
143
  true
130
144
  end
131
145
 
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] external_id Value to be assigned
148
+ def external_id=(external_id)
149
+ if !external_id.nil? && external_id.to_s.length > 100
150
+ fail ArgumentError, 'invalid value for "external_id", the character length must be smaller than or equal to 100.'
151
+ end
152
+
153
+ @external_id = external_id
154
+ end
155
+
132
156
  # Checks equality by comparing each attribute.
133
157
  # @param [Object] Object to be compared
134
158
  def ==(o)
@@ -139,6 +163,7 @@ module UltracartClient
139
163
  city == o.city &&
140
164
  country == o.country &&
141
165
  distribution_center_code == o.distribution_center_code &&
166
+ external_id == o.external_id &&
142
167
  merchant_id == o.merchant_id &&
143
168
  pos_location_oid == o.pos_location_oid &&
144
169
  postal_code == o.postal_code &&
@@ -154,7 +179,7 @@ module UltracartClient
154
179
  # Calculates hash code according to all attributes.
155
180
  # @return [Fixnum] Hash code
156
181
  def hash
157
- [adddress2, address1, city, country, distribution_center_code, merchant_id, pos_location_oid, postal_code, state_province].hash
182
+ [adddress2, address1, city, country, distribution_center_code, external_id, merchant_id, pos_location_oid, postal_code, state_province].hash
158
183
  end
159
184
 
160
185
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.95'
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.95
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-13 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