ultracart_api 4.1.38 → 4.1.39

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: 9a39ebfd58acb768a74264263c7e00232ca9f78eb73a2bc2ad8cc65c053fe680
4
- data.tar.gz: 594ba501ac80013a5f83447d340940dcc07ba4c95e45db8c19e87d825a4d230e
3
+ metadata.gz: 4ec23f9e484f06801055c68e4c5ec5c4262a1ac7ba34167e0bf9680d7710480d
4
+ data.tar.gz: cbf04f495983554b9f03c6eb8670e8ba50a4060a3c9ac06ecd4ee817baeaa72f
5
5
  SHA512:
6
- metadata.gz: 83f465bc5aaa1c50d99dc7205cc05be9885f19da4fcd27709e2e367e914a8f737e7bb62808290c8bd21081e6a7e0d3255df3859ccf79aaee8d56754fa66d6b12
7
- data.tar.gz: 3186e35b19e3be57a441cb03970f1831166a44f62d7bc6d4dd91e4d9b6e3d32426600c6a6203959f9c3ed67f13dbf8edf255d6fdd27f715d94e0809789c8f22c
6
+ metadata.gz: 4ecd75e66a9e6f76c8b579d0bfd18f2ab3eccb6298eebcc0806c1ff7ce2100adc66417381e3d4ded538d04cfaba6dc683da5bfc2b5f060959e37d2f07dbfe0f3
7
+ data.tar.gz: b8545df9ee3454b7ddf5b63bdf2db877ae1810a5df11f77363f5065ff8d2ad2274e79850b8444b176d2560b2803c446abbdf53aac6bbe0b59a44d52e8d61873d
data/README.md CHANGED
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
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.1.38
10
+ - Package version: 4.1.39
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  - For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
16
16
  gemfile:
17
17
 
18
18
  ```shell
19
- gem 'ultracart_api', '4.1.38'
19
+ gem 'ultracart_api', '4.1.39'
20
20
  ```
21
21
 
22
22
  install:
@@ -341,6 +341,7 @@ Class | Method | HTTP request | Description
341
341
  *UltracartClient::ItemApi* | [**insert_update_item_content_attribute**](docs/ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute
342
342
  *UltracartClient::ItemApi* | [**update_digital_item**](docs/ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library
343
343
  *UltracartClient::ItemApi* | [**update_item**](docs/ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item
344
+ *UltracartClient::ItemApi* | [**update_item_inventories**](docs/ItemApi.md#update_item_inventories) | **PUT** /item/items/update_item_inventories | Update item inventories for a distribution center
344
345
  *UltracartClient::ItemApi* | [**update_item_shipping_distribution_center_by_code**](docs/ItemApi.md#update_item_shipping_distribution_center_by_code) | **PUT** /item/items/{merchant_item_oid}/shipping/distribution_centers/by_code/{distribution_center_code} | Update an item shipping distribution center
345
346
  *UltracartClient::ItemApi* | [**update_items**](docs/ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items
346
347
  *UltracartClient::ItemApi* | [**update_review**](docs/ItemApi.md#update_review) | **PUT** /item/items/{merchant_item_oid}/reviews/{review_oid} | Update a review
@@ -1209,6 +1210,8 @@ Class | Method | HTTP request | Description
1209
1210
  - [UltracartClient::ItemInventorySnapshot](docs/ItemInventorySnapshot.md)
1210
1211
  - [UltracartClient::ItemInventorySnapshotDistributionCenter](docs/ItemInventorySnapshotDistributionCenter.md)
1211
1212
  - [UltracartClient::ItemInventorySnapshotResponse](docs/ItemInventorySnapshotResponse.md)
1213
+ - [UltracartClient::ItemInventoryUpdate](docs/ItemInventoryUpdate.md)
1214
+ - [UltracartClient::ItemInventoryUpdateRequest](docs/ItemInventoryUpdateRequest.md)
1212
1215
  - [UltracartClient::ItemKitComponent](docs/ItemKitComponent.md)
1213
1216
  - [UltracartClient::ItemKitDefinition](docs/ItemKitDefinition.md)
1214
1217
  - [UltracartClient::ItemOption](docs/ItemOption.md)
@@ -1603,6 +1606,7 @@ Not every change is committed to every SDK.
1603
1606
 
1604
1607
  | Version | Date | Comments |
1605
1608
  | --: | :-: | --- |
1609
+ | 4.1.39 | 12/31/2025 | conversations AI - queue AI settings |
1606
1610
  | 4.1.38 | 12/29/2025 | conversations - AI agent level capabilities |
1607
1611
  | 4.1.37 | 12/29/2025 | conversations - pbx agent AI flag |
1608
1612
  | 4.1.36 | 12/22/2025 | conversation - agent auth worker token v2 |
@@ -4,6 +4,8 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **ai_priority** | **String** | AI Agent Priority compared to human agents | [optional] |
8
+ | **ai_timeout_seconds** | **Integer** | AI timeout seconds | [optional] |
7
9
  | **announce_queue_position** | **Boolean** | If true, the customer is told their queue position upon entering the queue | [optional] |
8
10
  | **conversation_pbx_queue_uuid** | **String** | Conversation Pbx Queue unique identifier | [optional] |
9
11
  | **conversation_voicemail_mailbox_uuid** | **String** | The voicemail mailbox associated with this queue | [optional] |
@@ -32,6 +34,8 @@
32
34
  require 'ultracart_api'
33
35
 
34
36
  instance = UltracartClient::ConversationPbxQueue.new(
37
+ ai_priority: null,
38
+ ai_timeout_seconds: null,
35
39
  announce_queue_position: null,
36
40
  conversation_pbx_queue_uuid: null,
37
41
  conversation_voicemail_mailbox_uuid: null,
data/docs/ItemApi.md CHANGED
@@ -25,6 +25,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
25
25
  | [**insert_update_item_content_attribute**](ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute |
26
26
  | [**update_digital_item**](ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library |
27
27
  | [**update_item**](ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item |
28
+ | [**update_item_inventories**](ItemApi.md#update_item_inventories) | **PUT** /item/items/update_item_inventories | Update item inventories for a distribution center |
28
29
  | [**update_item_shipping_distribution_center_by_code**](ItemApi.md#update_item_shipping_distribution_center_by_code) | **PUT** /item/items/{merchant_item_oid}/shipping/distribution_centers/by_code/{distribution_center_code} | Update an item shipping distribution center |
29
30
  | [**update_items**](ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items |
30
31
  | [**update_review**](ItemApi.md#update_review) | **PUT** /item/items/{merchant_item_oid}/reviews/{review_oid} | Update a review |
@@ -1961,6 +1962,59 @@ end
1961
1962
  - **Accept**: application/json
1962
1963
 
1963
1964
 
1965
+ ## update_item_inventories
1966
+
1967
+ > update_item_inventories(item_inventory_update_request)
1968
+
1969
+ Update item inventories for a distribution center
1970
+
1971
+ Update item inventories for a distribution center
1972
+
1973
+
1974
+ ### Examples
1975
+
1976
+
1977
+ (No example for this operation).
1978
+
1979
+
1980
+ #### Using the update_item_inventories_with_http_info variant
1981
+
1982
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
1983
+
1984
+ > <Array(nil, Integer, Hash)> update_item_inventories_with_http_info(item_inventory_update_request)
1985
+
1986
+ ```ruby
1987
+ begin
1988
+ # Update item inventories for a distribution center
1989
+ data, status_code, headers = api_instance.update_item_inventories_with_http_info(item_inventory_update_request)
1990
+ p status_code # => 2xx
1991
+ p headers # => { ... }
1992
+ p data # => nil
1993
+ rescue UltracartClient::ApiError => e
1994
+ puts "Error when calling ItemApi->update_item_inventories_with_http_info: #{e}"
1995
+ end
1996
+ ```
1997
+
1998
+ ### Parameters
1999
+
2000
+ | Name | Type | Description | Notes |
2001
+ | ---- | ---- | ----------- | ----- |
2002
+ | **item_inventory_update_request** | [**ItemInventoryUpdateRequest**](ItemInventoryUpdateRequest.md) | Item inventory updates | |
2003
+
2004
+ ### Return type
2005
+
2006
+ nil (empty response body)
2007
+
2008
+ ### Authorization
2009
+
2010
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
2011
+
2012
+ ### HTTP request headers
2013
+
2014
+ - **Content-Type**: application/json; charset=UTF-8
2015
+ - **Accept**: application/json
2016
+
2017
+
1964
2018
  ## update_item_shipping_distribution_center_by_code
1965
2019
 
1966
2020
  > update_item_shipping_distribution_center_by_code(merchant_item_oid, distribution_center_code, item_shipping_distribution_center)
@@ -0,0 +1,22 @@
1
+ # UltracartClient::ItemInventoryUpdate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **distribution_center_code** | **String** | Distribution center code | [optional] |
8
+ | **inventory_level** | **Float** | Inventory level | [optional] |
9
+ | **merchant_item_id** | **String** | Merchant Item ID | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::ItemInventoryUpdate.new(
17
+ distribution_center_code: null,
18
+ inventory_level: null,
19
+ merchant_item_id: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,18 @@
1
+ # UltracartClient::ItemInventoryUpdateRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **inventory_updates** | [**Array&lt;ItemInventoryUpdate&gt;**](ItemInventoryUpdate.md) | Inventory updates array | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::ItemInventoryUpdateRequest.new(
15
+ inventory_updates: null
16
+ )
17
+ ```
18
+
@@ -1511,6 +1511,75 @@ module UltracartClient
1511
1511
  return data, status_code, headers
1512
1512
  end
1513
1513
 
1514
+ # Update item inventories for a distribution center
1515
+ # Update item inventories for a distribution center
1516
+ # @param item_inventory_update_request [ItemInventoryUpdateRequest] Item inventory updates
1517
+ # @param [Hash] opts the optional parameters
1518
+ # @return [nil]
1519
+ def update_item_inventories(item_inventory_update_request, opts = {})
1520
+ update_item_inventories_with_http_info(item_inventory_update_request, opts)
1521
+ nil
1522
+ end
1523
+
1524
+ # Update item inventories for a distribution center
1525
+ # Update item inventories for a distribution center
1526
+ # @param item_inventory_update_request [ItemInventoryUpdateRequest] Item inventory updates
1527
+ # @param [Hash] opts the optional parameters
1528
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1529
+ def update_item_inventories_with_http_info(item_inventory_update_request, opts = {})
1530
+ if @api_client.config.debugging
1531
+ @api_client.config.logger.debug 'Calling API: ItemApi.update_item_inventories ...'
1532
+ end
1533
+ # verify the required parameter 'item_inventory_update_request' is set
1534
+ if @api_client.config.client_side_validation && item_inventory_update_request.nil?
1535
+ fail ArgumentError, "Missing the required parameter 'item_inventory_update_request' when calling ItemApi.update_item_inventories"
1536
+ end
1537
+ # resource path
1538
+ local_var_path = '/item/items/update_item_inventories'
1539
+
1540
+ # query parameters
1541
+ query_params = opts[:query_params] || {}
1542
+
1543
+ # header parameters
1544
+ header_params = opts[:header_params] || {}
1545
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1546
+ # HTTP header 'Accept' (if needed)
1547
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1548
+ # HTTP header 'Content-Type'
1549
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1550
+ if !content_type.nil?
1551
+ header_params['Content-Type'] = content_type
1552
+ end
1553
+
1554
+ # form parameters
1555
+ form_params = opts[:form_params] || {}
1556
+
1557
+ # http body (model)
1558
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_inventory_update_request)
1559
+
1560
+ # return_type
1561
+ return_type = opts[:debug_return_type]
1562
+
1563
+ # auth_names
1564
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1565
+
1566
+ new_options = opts.merge(
1567
+ :operation => :"ItemApi.update_item_inventories",
1568
+ :header_params => header_params,
1569
+ :query_params => query_params,
1570
+ :form_params => form_params,
1571
+ :body => post_body,
1572
+ :auth_names => auth_names,
1573
+ :return_type => return_type
1574
+ )
1575
+
1576
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1577
+ if @api_client.config.debugging
1578
+ @api_client.config.logger.debug "API called: ItemApi#update_item_inventories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1579
+ end
1580
+ return data, status_code, headers
1581
+ end
1582
+
1514
1583
  # Update an item shipping distribution center
1515
1584
  # Update an item shipping distribution center
1516
1585
  # @param merchant_item_oid [Integer] The item oid to update.
@@ -15,6 +15,12 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ConversationPbxQueue
18
+ # AI Agent Priority compared to human agents
19
+ attr_accessor :ai_priority
20
+
21
+ # AI timeout seconds
22
+ attr_accessor :ai_timeout_seconds
23
+
18
24
  # If true, the customer is told their queue position upon entering the queue
19
25
  attr_accessor :announce_queue_position
20
26
 
@@ -77,9 +83,33 @@ module UltracartClient
77
83
  # Wrap up time in seconds
78
84
  attr_accessor :wrap_up_seconds
79
85
 
86
+ class EnumAttributeValidator
87
+ attr_reader :datatype
88
+ attr_reader :allowable_values
89
+
90
+ def initialize(datatype, allowable_values)
91
+ @allowable_values = allowable_values.map do |value|
92
+ case datatype.to_s
93
+ when /Integer/i
94
+ value.to_i
95
+ when /Float/i
96
+ value.to_f
97
+ else
98
+ value
99
+ end
100
+ end
101
+ end
102
+
103
+ def valid?(value)
104
+ !value || allowable_values.include?(value)
105
+ end
106
+ end
107
+
80
108
  # Attribute mapping from ruby-style variable name to JSON key.
81
109
  def self.attribute_map
82
110
  {
111
+ :'ai_priority' => :'ai_priority',
112
+ :'ai_timeout_seconds' => :'ai_timeout_seconds',
83
113
  :'announce_queue_position' => :'announce_queue_position',
84
114
  :'conversation_pbx_queue_uuid' => :'conversation_pbx_queue_uuid',
85
115
  :'conversation_voicemail_mailbox_uuid' => :'conversation_voicemail_mailbox_uuid',
@@ -112,6 +142,8 @@ module UltracartClient
112
142
  # Attribute type mapping.
113
143
  def self.openapi_types
114
144
  {
145
+ :'ai_priority' => :'String',
146
+ :'ai_timeout_seconds' => :'Integer',
115
147
  :'announce_queue_position' => :'Boolean',
116
148
  :'conversation_pbx_queue_uuid' => :'String',
117
149
  :'conversation_voicemail_mailbox_uuid' => :'String',
@@ -157,6 +189,14 @@ module UltracartClient
157
189
  h[k.to_sym] = v
158
190
  }
159
191
 
192
+ if attributes.key?(:'ai_priority')
193
+ self.ai_priority = attributes[:'ai_priority']
194
+ end
195
+
196
+ if attributes.key?(:'ai_timeout_seconds')
197
+ self.ai_timeout_seconds = attributes[:'ai_timeout_seconds']
198
+ end
199
+
160
200
  if attributes.key?(:'announce_queue_position')
161
201
  self.announce_queue_position = attributes[:'announce_queue_position']
162
202
  end
@@ -292,6 +332,8 @@ module UltracartClient
292
332
  # Check to see if the all the properties in the model are valid
293
333
  # @return true if the model is valid
294
334
  def valid?
335
+ ai_priority_validator = EnumAttributeValidator.new('String', ["neutral", "first", "backup"])
336
+ return false unless ai_priority_validator.valid?(@ai_priority)
295
337
  return false if !@conversation_voicemail_mailbox_uuid.nil? && @conversation_voicemail_mailbox_uuid.to_s.length > 50
296
338
  return false if !@hold_conversation_pbx_audio_uuid.nil? && @hold_conversation_pbx_audio_uuid.to_s.length > 50
297
339
  return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
@@ -305,6 +347,16 @@ module UltracartClient
305
347
  true
306
348
  end
307
349
 
350
+ # Custom attribute writer method checking allowed values (enum).
351
+ # @param [Object] ai_priority Object to be assigned
352
+ def ai_priority=(ai_priority)
353
+ validator = EnumAttributeValidator.new('String', ["neutral", "first", "backup"])
354
+ unless validator.valid?(ai_priority)
355
+ fail ArgumentError, "invalid value for \"ai_priority\", must be one of #{validator.allowable_values}."
356
+ end
357
+ @ai_priority = ai_priority
358
+ end
359
+
308
360
  # Custom attribute writer method with validation
309
361
  # @param [Object] conversation_voicemail_mailbox_uuid Value to be assigned
310
362
  def conversation_voicemail_mailbox_uuid=(conversation_voicemail_mailbox_uuid)
@@ -410,6 +462,8 @@ module UltracartClient
410
462
  def ==(o)
411
463
  return true if self.equal?(o)
412
464
  self.class == o.class &&
465
+ ai_priority == o.ai_priority &&
466
+ ai_timeout_seconds == o.ai_timeout_seconds &&
413
467
  announce_queue_position == o.announce_queue_position &&
414
468
  conversation_pbx_queue_uuid == o.conversation_pbx_queue_uuid &&
415
469
  conversation_voicemail_mailbox_uuid == o.conversation_voicemail_mailbox_uuid &&
@@ -442,7 +496,7 @@ module UltracartClient
442
496
  # Calculates hash code according to all attributes.
443
497
  # @return [Integer] Hash code
444
498
  def hash
445
- [announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail, wait_critical_seconds, wait_warning_seconds, wrap_up_seconds].hash
499
+ [ai_priority, ai_timeout_seconds, announce_queue_position, conversation_pbx_queue_uuid, conversation_voicemail_mailbox_uuid, hold_conversation_pbx_audio_uuid, max_hold_seconds, members, merchant_id, name, no_agent_available_play_audio_uuid, no_agent_available_say, no_agent_available_say_voice, play_audio_uuid, record_call, say, say_voice, twilio_taskrouter_workflow_sid, twilio_workspace_queue_sid, voicemail, wait_critical_seconds, wait_warning_seconds, wrap_up_seconds].hash
446
500
  end
447
501
 
448
502
  # Builds the object from hash
@@ -0,0 +1,240 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ItemInventoryUpdate
18
+ # Distribution center code
19
+ attr_accessor :distribution_center_code
20
+
21
+ # Inventory level
22
+ attr_accessor :inventory_level
23
+
24
+ # Merchant Item ID
25
+ attr_accessor :merchant_item_id
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'distribution_center_code' => :'distribution_center_code',
31
+ :'inventory_level' => :'inventory_level',
32
+ :'merchant_item_id' => :'merchant_item_id'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'distribution_center_code' => :'String',
45
+ :'inventory_level' => :'Float',
46
+ :'merchant_item_id' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemInventoryUpdate` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemInventoryUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'distribution_center_code')
72
+ self.distribution_center_code = attributes[:'distribution_center_code']
73
+ end
74
+
75
+ if attributes.key?(:'inventory_level')
76
+ self.inventory_level = attributes[:'inventory_level']
77
+ end
78
+
79
+ if attributes.key?(:'merchant_item_id')
80
+ self.merchant_item_id = attributes[:'merchant_item_id']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ distribution_center_code == o.distribution_center_code &&
103
+ inventory_level == o.inventory_level &&
104
+ merchant_item_id == o.merchant_item_id
105
+ end
106
+
107
+ # @see the `==` method
108
+ # @param [Object] Object to be compared
109
+ def eql?(o)
110
+ self == o
111
+ end
112
+
113
+ # Calculates hash code according to all attributes.
114
+ # @return [Integer] Hash code
115
+ def hash
116
+ [distribution_center_code, inventory_level, merchant_item_id].hash
117
+ end
118
+
119
+ # Builds the object from hash
120
+ # @param [Hash] attributes Model attributes in the form of hash
121
+ # @return [Object] Returns the model itself
122
+ def self.build_from_hash(attributes)
123
+ new.build_from_hash(attributes)
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
+ self.send("#{key}=", nil)
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
139
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
140
+ end
141
+ elsif !attributes[self.class.attribute_map[key]].nil?
142
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
143
+ end
144
+ end
145
+
146
+ self
147
+ end
148
+
149
+ # Deserializes the data based on type
150
+ # @param string type Data type
151
+ # @param string value Value to be deserialized
152
+ # @return [Object] Deserialized data
153
+ def _deserialize(type, value)
154
+ case type.to_sym
155
+ when :Time
156
+ Time.parse(value)
157
+ when :Date
158
+ Date.parse(value)
159
+ when :String
160
+ value.to_s
161
+ when :Integer
162
+ value.to_i
163
+ when :Float
164
+ value.to_f
165
+ when :Boolean
166
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
167
+ true
168
+ else
169
+ false
170
+ end
171
+ when :Object
172
+ # generic object (usually a Hash), return directly
173
+ value
174
+ when /\AArray<(?<inner_type>.+)>\z/
175
+ inner_type = Regexp.last_match[:inner_type]
176
+ value.map { |v| _deserialize(inner_type, v) }
177
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
178
+ k_type = Regexp.last_match[:k_type]
179
+ v_type = Regexp.last_match[:v_type]
180
+ {}.tap do |hash|
181
+ value.each do |k, v|
182
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
183
+ end
184
+ end
185
+ else # model
186
+ # models (e.g. Pet) or oneOf
187
+ klass = UltracartClient.const_get(type)
188
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ if value.nil?
211
+ is_nullable = self.class.openapi_nullable.include?(attr)
212
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
213
+ end
214
+
215
+ hash[param] = _to_hash(value)
216
+ end
217
+ hash
218
+ end
219
+
220
+ # Outputs non-array value in the form of hash
221
+ # For object, use to_hash. Otherwise, just return the value
222
+ # @param [Object] value Any valid value
223
+ # @return [Hash] Returns the value in the form of hash
224
+ def _to_hash(value)
225
+ if value.is_a?(Array)
226
+ value.compact.map { |v| _to_hash(v) }
227
+ elsif value.is_a?(Hash)
228
+ {}.tap do |hash|
229
+ value.each { |k, v| hash[k] = _to_hash(v) }
230
+ end
231
+ elsif value.respond_to? :to_hash
232
+ value.to_hash
233
+ else
234
+ value
235
+ end
236
+ end
237
+
238
+ end
239
+
240
+ end
@@ -0,0 +1,222 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ItemInventoryUpdateRequest
18
+ # Inventory updates array
19
+ attr_accessor :inventory_updates
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'inventory_updates' => :'inventory_updates'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'inventory_updates' => :'Array<ItemInventoryUpdate>'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemInventoryUpdateRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemInventoryUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'inventory_updates')
62
+ if (value = attributes[:'inventory_updates']).is_a?(Array)
63
+ self.inventory_updates = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ inventory_updates == o.inventory_updates
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [inventory_updates].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ self.class.openapi_types.each_pair do |key, type|
115
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
116
+ self.send("#{key}=", nil)
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = UltracartClient.const_get(type)
170
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.38'
14
+ VERSION = '4.1.39'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -602,6 +602,8 @@ require 'ultracart_api/models/item_internal'
602
602
  require 'ultracart_api/models/item_inventory_snapshot'
603
603
  require 'ultracart_api/models/item_inventory_snapshot_distribution_center'
604
604
  require 'ultracart_api/models/item_inventory_snapshot_response'
605
+ require 'ultracart_api/models/item_inventory_update'
606
+ require 'ultracart_api/models/item_inventory_update_request'
605
607
  require 'ultracart_api/models/item_kit_component'
606
608
  require 'ultracart_api/models/item_kit_definition'
607
609
  require 'ultracart_api/models/item_option'
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.1.38
4
+ version: 4.1.39
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-29 00:00:00.000000000 Z
11
+ date: 2025-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -658,6 +658,8 @@ files:
658
658
  - docs/ItemInventorySnapshot.md
659
659
  - docs/ItemInventorySnapshotDistributionCenter.md
660
660
  - docs/ItemInventorySnapshotResponse.md
661
+ - docs/ItemInventoryUpdate.md
662
+ - docs/ItemInventoryUpdateRequest.md
661
663
  - docs/ItemKitComponent.md
662
664
  - docs/ItemKitDefinition.md
663
665
  - docs/ItemOption.md
@@ -1595,6 +1597,8 @@ files:
1595
1597
  - lib/ultracart_api/models/item_inventory_snapshot.rb
1596
1598
  - lib/ultracart_api/models/item_inventory_snapshot_distribution_center.rb
1597
1599
  - lib/ultracart_api/models/item_inventory_snapshot_response.rb
1600
+ - lib/ultracart_api/models/item_inventory_update.rb
1601
+ - lib/ultracart_api/models/item_inventory_update_request.rb
1598
1602
  - lib/ultracart_api/models/item_kit_component.rb
1599
1603
  - lib/ultracart_api/models/item_kit_definition.rb
1600
1604
  - lib/ultracart_api/models/item_option.rb