ultracart_api 4.1.167 → 4.1.169

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: 0144d3f0a09b5e78e9e692bb7e8a76b17f63a03ba39ca5c7257fb35d082fd101
4
- data.tar.gz: 879d6e798a966bf72271a5ebd741cd91991b22de46ca319a7e5f733bd129b48a
3
+ metadata.gz: af4e728f4f35eebebe3e1901f0722a8e371817673158952eb269920182c15a10
4
+ data.tar.gz: 62de7b74a1febf6f41c62b59520379da2876bd5c1181e9dc50f9ba7bfc1e95f7
5
5
  SHA512:
6
- metadata.gz: 2c5af2e57042918564b683913e66768b12c564ebdaa328ef7d52b9e15638edd38779bcba97d51984a0fd06a714b7d7e51263eb5d9f15e8f83bd906f4d84f8d5c
7
- data.tar.gz: 5e68e25499c4befb0452ad911f689e2b2d74d7da68d967a757aff4518589f057ef4916457182f1ebe75f76b94b1899e61ffd411c0e9314eae6b8f60c5c709374
6
+ metadata.gz: 2b1f7fa59aa0a039c1219e75ca3b8b42dd41a1fdfe297f7b6e09fd5b6c186fb0df83305d4405abf9bd41c5d3af490fd2ee8ed58122cc46a381ee1d8f4c0463fa
7
+ data.tar.gz: 855bfd76f0855e7989b52fa7a3b1e26c010cb54d55769f3127d3ffa280a1f8b5c7dd34c5fdddf4a24e038ab2d1d4a025f48ef79b1db45d9b1ec83b6e94b85cd2
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.167
10
+ - Package version: 4.1.169
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.167'
19
+ gem 'ultracart_api', '4.1.169'
20
20
  ```
21
21
 
22
22
  install:
@@ -514,6 +514,7 @@ Class | Method | HTTP request | Description
514
514
  *UltracartClient::SfvbApi* | [**list_sfvb_experiments**](docs/SfvbApi.md#list_sfvb_experiments) | **GET** /sfvb/storefronts/{storefront_oid}/experiments | List the storefront's experiments
515
515
  *UltracartClient::SfvbApi* | [**list_sfvb_file_versions**](docs/SfvbApi.md#list_sfvb_file_versions) | **GET** /sfvb/storefronts/{storefront_oid}/files/versions | Version history for a storefront file
516
516
  *UltracartClient::SfvbApi* | [**list_sfvb_files**](docs/SfvbApi.md#list_sfvb_files) | **GET** /sfvb/storefronts/{storefront_oid}/files | List a storefront directory
517
+ *UltracartClient::SfvbApi* | [**list_sfvb_item_containers**](docs/SfvbApi.md#list_sfvb_item_containers) | **GET** /sfvb/storefronts/{storefront_oid}/item_containers | List the item containers on the account
517
518
  *UltracartClient::SfvbApi* | [**list_sfvb_pages**](docs/SfvbApi.md#list_sfvb_pages) | **GET** /sfvb/storefronts/{storefront_oid}/pages/list | List the storefront's pages
518
519
  *UltracartClient::SfvbApi* | [**list_sfvb_storefronts**](docs/SfvbApi.md#list_sfvb_storefronts) | **GET** /sfvb/storefronts | List storefronts
519
520
  *UltracartClient::SfvbApi* | [**list_sfvb_templates**](docs/SfvbApi.md#list_sfvb_templates) | **GET** /sfvb/storefronts/{storefront_oid}/templates | List the active theme's templates
@@ -1797,6 +1798,8 @@ Class | Method | HTTP request | Description
1797
1798
  - [UltracartClient::SfvbFileWriteRequest](docs/SfvbFileWriteRequest.md)
1798
1799
  - [UltracartClient::SfvbFileWriteResponse](docs/SfvbFileWriteResponse.md)
1799
1800
  - [UltracartClient::SfvbFilesResponse](docs/SfvbFilesResponse.md)
1801
+ - [UltracartClient::SfvbItemContainer](docs/SfvbItemContainer.md)
1802
+ - [UltracartClient::SfvbItemContainersResponse](docs/SfvbItemContainersResponse.md)
1800
1803
  - [UltracartClient::SfvbLibraryEntry](docs/SfvbLibraryEntry.md)
1801
1804
  - [UltracartClient::SfvbLibraryFacet](docs/SfvbLibraryFacet.md)
1802
1805
  - [UltracartClient::SfvbLibraryResponse](docs/SfvbLibraryResponse.md)
@@ -2022,6 +2025,8 @@ Not every change is committed to every SDK.
2022
2025
 
2023
2026
  | Version | Date | Comments |
2024
2027
  | --: | :-: | --- |
2028
+ | 4.1.169 | 09/22/2026 | sfvb builder |
2029
+ | 4.1.168 | 09/21/2026 | further automation testing |
2025
2030
  | 4.1.167 | 09/21/2026 | automation test |
2026
2031
  | 4.1.165 | 09/21/2026 | automation testing |
2027
2032
  | 4.1.164 | 09/20/2026 | automation testing |
data/docs/SfvbApi.md CHANGED
@@ -46,6 +46,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
46
46
  | [**list_sfvb_experiments**](SfvbApi.md#list_sfvb_experiments) | **GET** /sfvb/storefronts/{storefront_oid}/experiments | List the storefront's experiments |
47
47
  | [**list_sfvb_file_versions**](SfvbApi.md#list_sfvb_file_versions) | **GET** /sfvb/storefronts/{storefront_oid}/files/versions | Version history for a storefront file |
48
48
  | [**list_sfvb_files**](SfvbApi.md#list_sfvb_files) | **GET** /sfvb/storefronts/{storefront_oid}/files | List a storefront directory |
49
+ | [**list_sfvb_item_containers**](SfvbApi.md#list_sfvb_item_containers) | **GET** /sfvb/storefronts/{storefront_oid}/item_containers | List the item containers on the account |
49
50
  | [**list_sfvb_pages**](SfvbApi.md#list_sfvb_pages) | **GET** /sfvb/storefronts/{storefront_oid}/pages/list | List the storefront's pages |
50
51
  | [**list_sfvb_storefronts**](SfvbApi.md#list_sfvb_storefronts) | **GET** /sfvb/storefronts | List storefronts |
51
52
  | [**list_sfvb_templates**](SfvbApi.md#list_sfvb_templates) | **GET** /sfvb/storefronts/{storefront_oid}/templates | List the active theme's templates |
@@ -2348,6 +2349,64 @@ end
2348
2349
  - **Accept**: application/json
2349
2350
 
2350
2351
 
2352
+ ## list_sfvb_item_containers
2353
+
2354
+ > <SfvbItemContainersResponse> list_sfvb_item_containers(storefront_oid, opts)
2355
+
2356
+ List the item containers on the account
2357
+
2358
+ An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller's storefront but does not narrow the result.
2359
+
2360
+
2361
+ ### Examples
2362
+
2363
+
2364
+ (No example for this operation).
2365
+
2366
+
2367
+ #### Using the list_sfvb_item_containers_with_http_info variant
2368
+
2369
+ This returns an Array which contains the response data, status code and headers.
2370
+
2371
+ > <Array(<SfvbItemContainersResponse>, Integer, Hash)> list_sfvb_item_containers_with_http_info(storefront_oid, opts)
2372
+
2373
+ ```ruby
2374
+ begin
2375
+ # List the item containers on the account
2376
+ data, status_code, headers = api_instance.list_sfvb_item_containers_with_http_info(storefront_oid, opts)
2377
+ p status_code # => 2xx
2378
+ p headers # => { ... }
2379
+ p data # => <SfvbItemContainersResponse>
2380
+ rescue UltracartClient::ApiError => e
2381
+ puts "Error when calling SfvbApi->list_sfvb_item_containers_with_http_info: #{e}"
2382
+ end
2383
+ ```
2384
+
2385
+ ### Parameters
2386
+
2387
+ | Name | Type | Description | Notes |
2388
+ | ---- | ---- | ----------- | ----- |
2389
+ | **storefront_oid** | **Integer** | | |
2390
+ | **merchant_item_id** | **String** | Restrict to one item, by the merchant item id a storefront carries | [optional] |
2391
+ | **merchant_item_oid** | **Integer** | Restrict to one item, by oid. Send this or merchant_item_id, not both | [optional] |
2392
+ | **container_name** | **String** | Restrict to one slot name, matched without regard to case | [optional] |
2393
+ | **max_results** | **Integer** | | [optional] |
2394
+ | **offset** | **Integer** | | [optional] |
2395
+
2396
+ ### Return type
2397
+
2398
+ [**SfvbItemContainersResponse**](SfvbItemContainersResponse.md)
2399
+
2400
+ ### Authorization
2401
+
2402
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
2403
+
2404
+ ### HTTP request headers
2405
+
2406
+ - **Content-Type**: Not defined
2407
+ - **Accept**: application/json
2408
+
2409
+
2351
2410
  ## list_sfvb_pages
2352
2411
 
2353
2412
  > <SfvbPageListResponse> list_sfvb_pages(storefront_oid, opts)
@@ -0,0 +1,32 @@
1
+ # UltracartClient::SfvbItemContainer
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **cjson_size** | **Integer** | Size of the CJSON in UTF-8 bytes, which is the same unit the container version size and the upsell offer cjson_size use. | [optional] |
8
+ | **container_name** | **String** | The slot name. This is the value an itemcontainer element&#39;s itemContainerName setting holds, which is what ties a container to the element that renders it. | [optional] |
9
+ | **hash_sha256** | **String** | SHA-256 of the container&#39;s CJSON. Identical to the value a read of the container returns, so a listing is enough to start an If-Match write without reading first. | [optional] |
10
+ | **last_modified** | **String** | When the container was last written. Absent for a container untouched since the storage began recording the time, so read an absent value as unknown rather than as never modified. | [optional] |
11
+ | **merchant_item_id** | **String** | The owning item&#39;s merchant item id. This is the identifier a storefront carries and a merchant recognizes; the oid appears nowhere on a rendered page. Send it as owner_type itemid to address the same container without converting it first. | [optional] |
12
+ | **owner_object_id** | **String** | The merchant item oid, spelled the way containers/item/{owner_object_id} takes it. | [optional] |
13
+ | **owner_type** | **String** | Always item. Carried so a row is usable as an address without the caller having to know which listing it came from. | [optional] |
14
+ | **used_elements** | **Array&lt;String&gt;** | The element types this container uses, recorded by the storage when it was written. A large cjson_size beside a handful of element types is the signature of markup pasted into a single html element. Absent on a container written before the storage began recording this. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'ultracart_api'
20
+
21
+ instance = UltracartClient::SfvbItemContainer.new(
22
+ cjson_size: null,
23
+ container_name: null,
24
+ hash_sha256: null,
25
+ last_modified: null,
26
+ merchant_item_id: null,
27
+ owner_object_id: null,
28
+ owner_type: null,
29
+ used_elements: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,32 @@
1
+ # UltracartClient::SfvbItemContainersResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **item_containers** | [**Array&lt;SfvbItemContainer&gt;**](SfvbItemContainer.md) | The containers on this page, ordered by merchant item id then container name. | [optional] |
8
+ | **max_results** | **Integer** | The cap that was applied. | [optional] |
9
+ | **next_offset** | **Integer** | Offset to send for the next page. Zero when truncated is false. Never truncates without giving a way to continue. | [optional] |
10
+ | **offset** | **Integer** | Containers skipped to produce this page. | [optional] |
11
+ | **result_count** | **Integer** | Number of containers returned on this page. | [optional] |
12
+ | **total_count** | **Integer** | Total containers matching the filter. With container_name supplied this is the answer to how many items carry that slot. | [optional] |
13
+ | **truncated** | **Boolean** | True when containers exist beyond this page. next_offset is populated when it is. | [optional] |
14
+ | **truncation_advice** | **String** | Advice for the caller when truncated is true. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'ultracart_api'
20
+
21
+ instance = UltracartClient::SfvbItemContainersResponse.new(
22
+ item_containers: null,
23
+ max_results: null,
24
+ next_offset: null,
25
+ offset: null,
26
+ result_count: null,
27
+ total_count: null,
28
+ truncated: null,
29
+ truncation_advice: null
30
+ )
31
+ ```
32
+
@@ -3001,6 +3001,85 @@ module UltracartClient
3001
3001
  return data, status_code, headers
3002
3002
  end
3003
3003
 
3004
+ # List the item containers on the account
3005
+ # An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller's storefront but does not narrow the result.
3006
+ # @param storefront_oid [Integer]
3007
+ # @param [Hash] opts the optional parameters
3008
+ # @option opts [String] :merchant_item_id Restrict to one item, by the merchant item id a storefront carries
3009
+ # @option opts [Integer] :merchant_item_oid Restrict to one item, by oid. Send this or merchant_item_id, not both
3010
+ # @option opts [String] :container_name Restrict to one slot name, matched without regard to case
3011
+ # @option opts [Integer] :max_results
3012
+ # @option opts [Integer] :offset
3013
+ # @return [SfvbItemContainersResponse]
3014
+ def list_sfvb_item_containers(storefront_oid, opts = {})
3015
+ data, _status_code, _headers = list_sfvb_item_containers_with_http_info(storefront_oid, opts)
3016
+ data
3017
+ end
3018
+
3019
+ # List the item containers on the account
3020
+ # An itemcontainer element renders nothing of its own. It names a slot, and a separate container is resolved per item for that slot, so a catalog of five hundred products with three slots is fifteen hundred containers. This says which of them exist. Filter by container_name to find every item carrying one slot, or by merchant_item_id to see what one item has. Which items are missing a slot is a set difference against pages/items, because a listing can only report containers that exist. Each row carries hash_sha256, so a listing is enough to start an If-Match write without reading the container first. Item containers are stored per account rather than per storefront, so storefront_oid identifies the caller&#39;s storefront but does not narrow the result.
3021
+ # @param storefront_oid [Integer]
3022
+ # @param [Hash] opts the optional parameters
3023
+ # @option opts [String] :merchant_item_id Restrict to one item, by the merchant item id a storefront carries
3024
+ # @option opts [Integer] :merchant_item_oid Restrict to one item, by oid. Send this or merchant_item_id, not both
3025
+ # @option opts [String] :container_name Restrict to one slot name, matched without regard to case
3026
+ # @option opts [Integer] :max_results
3027
+ # @option opts [Integer] :offset
3028
+ # @return [Array<(SfvbItemContainersResponse, Integer, Hash)>] SfvbItemContainersResponse data, response status code and response headers
3029
+ def list_sfvb_item_containers_with_http_info(storefront_oid, opts = {})
3030
+ if @api_client.config.debugging
3031
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_item_containers ...'
3032
+ end
3033
+ # verify the required parameter 'storefront_oid' is set
3034
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3035
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_item_containers"
3036
+ end
3037
+ # resource path
3038
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/item_containers'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3039
+
3040
+ # query parameters
3041
+ query_params = opts[:query_params] || {}
3042
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
3043
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
3044
+ query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
3045
+ query_params[:'max_results'] = opts[:'max_results'] if !opts[:'max_results'].nil?
3046
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
3047
+
3048
+ # header parameters
3049
+ header_params = opts[:header_params] || {}
3050
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3051
+ # HTTP header 'Accept' (if needed)
3052
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3053
+
3054
+ # form parameters
3055
+ form_params = opts[:form_params] || {}
3056
+
3057
+ # http body (model)
3058
+ post_body = opts[:debug_body]
3059
+
3060
+ # return_type
3061
+ return_type = opts[:debug_return_type] || 'SfvbItemContainersResponse'
3062
+
3063
+ # auth_names
3064
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3065
+
3066
+ new_options = opts.merge(
3067
+ :operation => :"SfvbApi.list_sfvb_item_containers",
3068
+ :header_params => header_params,
3069
+ :query_params => query_params,
3070
+ :form_params => form_params,
3071
+ :body => post_body,
3072
+ :auth_names => auth_names,
3073
+ :return_type => return_type
3074
+ )
3075
+
3076
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3077
+ if @api_client.config.debugging
3078
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_item_containers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3079
+ end
3080
+ return data, status_code, headers
3081
+ end
3082
+
3004
3083
  # List the storefront's pages
3005
3084
  # Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
3006
3085
  # @param storefront_oid [Integer]
@@ -0,0 +1,326 @@
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 SfvbItemContainer
18
+ # Size of the CJSON in UTF-8 bytes, which is the same unit the container version size and the upsell offer cjson_size use.
19
+ attr_accessor :cjson_size
20
+
21
+ # The slot name. This is the value an itemcontainer element's itemContainerName setting holds, which is what ties a container to the element that renders it.
22
+ attr_accessor :container_name
23
+
24
+ # SHA-256 of the container's CJSON. Identical to the value a read of the container returns, so a listing is enough to start an If-Match write without reading first.
25
+ attr_accessor :hash_sha256
26
+
27
+ # When the container was last written. Absent for a container untouched since the storage began recording the time, so read an absent value as unknown rather than as never modified.
28
+ attr_accessor :last_modified
29
+
30
+ # The owning item's merchant item id. This is the identifier a storefront carries and a merchant recognizes; the oid appears nowhere on a rendered page. Send it as owner_type itemid to address the same container without converting it first.
31
+ attr_accessor :merchant_item_id
32
+
33
+ # The merchant item oid, spelled the way containers/item/{owner_object_id} takes it.
34
+ attr_accessor :owner_object_id
35
+
36
+ # Always item. Carried so a row is usable as an address without the caller having to know which listing it came from.
37
+ attr_accessor :owner_type
38
+
39
+ # The element types this container uses, recorded by the storage when it was written. A large cjson_size beside a handful of element types is the signature of markup pasted into a single html element. Absent on a container written before the storage began recording this.
40
+ attr_accessor :used_elements
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'cjson_size' => :'cjson_size',
68
+ :'container_name' => :'container_name',
69
+ :'hash_sha256' => :'hash_sha256',
70
+ :'last_modified' => :'last_modified',
71
+ :'merchant_item_id' => :'merchant_item_id',
72
+ :'owner_object_id' => :'owner_object_id',
73
+ :'owner_type' => :'owner_type',
74
+ :'used_elements' => :'used_elements'
75
+ }
76
+ end
77
+
78
+ # Returns all the JSON keys this model knows about
79
+ def self.acceptable_attributes
80
+ attribute_map.values
81
+ end
82
+
83
+ # Attribute type mapping.
84
+ def self.openapi_types
85
+ {
86
+ :'cjson_size' => :'Integer',
87
+ :'container_name' => :'String',
88
+ :'hash_sha256' => :'String',
89
+ :'last_modified' => :'String',
90
+ :'merchant_item_id' => :'String',
91
+ :'owner_object_id' => :'String',
92
+ :'owner_type' => :'String',
93
+ :'used_elements' => :'Array<String>'
94
+ }
95
+ end
96
+
97
+ # List of attributes with nullable: true
98
+ def self.openapi_nullable
99
+ Set.new([
100
+ ])
101
+ end
102
+
103
+ # Initializes the object
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ def initialize(attributes = {})
106
+ if (!attributes.is_a?(Hash))
107
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemContainer` initialize method"
108
+ end
109
+
110
+ # check to see if the attribute exists and convert string to symbol for hash key
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!self.class.attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemContainer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'cjson_size')
119
+ self.cjson_size = attributes[:'cjson_size']
120
+ end
121
+
122
+ if attributes.key?(:'container_name')
123
+ self.container_name = attributes[:'container_name']
124
+ end
125
+
126
+ if attributes.key?(:'hash_sha256')
127
+ self.hash_sha256 = attributes[:'hash_sha256']
128
+ end
129
+
130
+ if attributes.key?(:'last_modified')
131
+ self.last_modified = attributes[:'last_modified']
132
+ end
133
+
134
+ if attributes.key?(:'merchant_item_id')
135
+ self.merchant_item_id = attributes[:'merchant_item_id']
136
+ end
137
+
138
+ if attributes.key?(:'owner_object_id')
139
+ self.owner_object_id = attributes[:'owner_object_id']
140
+ end
141
+
142
+ if attributes.key?(:'owner_type')
143
+ self.owner_type = attributes[:'owner_type']
144
+ end
145
+
146
+ if attributes.key?(:'used_elements')
147
+ if (value = attributes[:'used_elements']).is_a?(Array)
148
+ self.used_elements = value
149
+ end
150
+ end
151
+ end
152
+
153
+ # Show invalid properties with the reasons. Usually used together with valid?
154
+ # @return Array for valid properties with the reasons
155
+ def list_invalid_properties
156
+ invalid_properties = Array.new
157
+ invalid_properties
158
+ end
159
+
160
+ # Check to see if the all the properties in the model are valid
161
+ # @return true if the model is valid
162
+ def valid?
163
+ owner_type_validator = EnumAttributeValidator.new('String', ["item"])
164
+ return false unless owner_type_validator.valid?(@owner_type)
165
+ true
166
+ end
167
+
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] owner_type Object to be assigned
170
+ def owner_type=(owner_type)
171
+ validator = EnumAttributeValidator.new('String', ["item"])
172
+ unless validator.valid?(owner_type)
173
+ fail ArgumentError, "invalid value for \"owner_type\", must be one of #{validator.allowable_values}."
174
+ end
175
+ @owner_type = owner_type
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ cjson_size == o.cjson_size &&
184
+ container_name == o.container_name &&
185
+ hash_sha256 == o.hash_sha256 &&
186
+ last_modified == o.last_modified &&
187
+ merchant_item_id == o.merchant_item_id &&
188
+ owner_object_id == o.owner_object_id &&
189
+ owner_type == o.owner_type &&
190
+ used_elements == o.used_elements
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [cjson_size, container_name, hash_sha256, last_modified, merchant_item_id, owner_object_id, owner_type, used_elements].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ new.build_from_hash(attributes)
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ attributes = attributes.transform_keys(&:to_sym)
218
+ self.class.openapi_types.each_pair do |key, type|
219
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
220
+ self.send("#{key}=", nil)
221
+ elsif type =~ /\AArray<(.*)>/i
222
+ # check to ensure the input is an array given that the attribute
223
+ # is documented as an array but the input is not
224
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
225
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
226
+ end
227
+ elsif !attributes[self.class.attribute_map[key]].nil?
228
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
229
+ end
230
+ end
231
+
232
+ self
233
+ end
234
+
235
+ # Deserializes the data based on type
236
+ # @param string type Data type
237
+ # @param string value Value to be deserialized
238
+ # @return [Object] Deserialized data
239
+ def _deserialize(type, value)
240
+ case type.to_sym
241
+ when :Time
242
+ Time.parse(value)
243
+ when :Date
244
+ Date.parse(value)
245
+ when :String
246
+ value.to_s
247
+ when :Integer
248
+ value.to_i
249
+ when :Float
250
+ value.to_f
251
+ when :Boolean
252
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
253
+ true
254
+ else
255
+ false
256
+ end
257
+ when :Object
258
+ # generic object (usually a Hash), return directly
259
+ value
260
+ when /\AArray<(?<inner_type>.+)>\z/
261
+ inner_type = Regexp.last_match[:inner_type]
262
+ value.map { |v| _deserialize(inner_type, v) }
263
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
264
+ k_type = Regexp.last_match[:k_type]
265
+ v_type = Regexp.last_match[:v_type]
266
+ {}.tap do |hash|
267
+ value.each do |k, v|
268
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
269
+ end
270
+ end
271
+ else # model
272
+ # models (e.g. Pet) or oneOf
273
+ klass = UltracartClient.const_get(type)
274
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
275
+ end
276
+ end
277
+
278
+ # Returns the string representation of the object
279
+ # @return [String] String presentation of the object
280
+ def to_s
281
+ to_hash.to_s
282
+ end
283
+
284
+ # to_body is an alias to to_hash (backward compatibility)
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_body
287
+ to_hash
288
+ end
289
+
290
+ # Returns the object in the form of hash
291
+ # @return [Hash] Returns the object in the form of hash
292
+ def to_hash
293
+ hash = {}
294
+ self.class.attribute_map.each_pair do |attr, param|
295
+ value = self.send(attr)
296
+ if value.nil?
297
+ is_nullable = self.class.openapi_nullable.include?(attr)
298
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
299
+ end
300
+
301
+ hash[param] = _to_hash(value)
302
+ end
303
+ hash
304
+ end
305
+
306
+ # Outputs non-array value in the form of hash
307
+ # For object, use to_hash. Otherwise, just return the value
308
+ # @param [Object] value Any valid value
309
+ # @return [Hash] Returns the value in the form of hash
310
+ def _to_hash(value)
311
+ if value.is_a?(Array)
312
+ value.compact.map { |v| _to_hash(v) }
313
+ elsif value.is_a?(Hash)
314
+ {}.tap do |hash|
315
+ value.each { |k, v| hash[k] = _to_hash(v) }
316
+ end
317
+ elsif value.respond_to? :to_hash
318
+ value.to_hash
319
+ else
320
+ value
321
+ end
322
+ end
323
+
324
+ end
325
+
326
+ end
@@ -0,0 +1,292 @@
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 SfvbItemContainersResponse
18
+ # The containers on this page, ordered by merchant item id then container name.
19
+ attr_accessor :item_containers
20
+
21
+ # The cap that was applied.
22
+ attr_accessor :max_results
23
+
24
+ # Offset to send for the next page. Zero when truncated is false. Never truncates without giving a way to continue.
25
+ attr_accessor :next_offset
26
+
27
+ # Containers skipped to produce this page.
28
+ attr_accessor :offset
29
+
30
+ # Number of containers returned on this page.
31
+ attr_accessor :result_count
32
+
33
+ # Total containers matching the filter. With container_name supplied this is the answer to how many items carry that slot.
34
+ attr_accessor :total_count
35
+
36
+ # True when containers exist beyond this page. next_offset is populated when it is.
37
+ attr_accessor :truncated
38
+
39
+ # Advice for the caller when truncated is true.
40
+ attr_accessor :truncation_advice
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'item_containers' => :'item_containers',
46
+ :'max_results' => :'max_results',
47
+ :'next_offset' => :'next_offset',
48
+ :'offset' => :'offset',
49
+ :'result_count' => :'result_count',
50
+ :'total_count' => :'total_count',
51
+ :'truncated' => :'truncated',
52
+ :'truncation_advice' => :'truncation_advice'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'item_containers' => :'Array<SfvbItemContainer>',
65
+ :'max_results' => :'Integer',
66
+ :'next_offset' => :'Integer',
67
+ :'offset' => :'Integer',
68
+ :'result_count' => :'Integer',
69
+ :'total_count' => :'Integer',
70
+ :'truncated' => :'Boolean',
71
+ :'truncation_advice' => :'String'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbItemContainersResponse` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbItemContainersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'item_containers')
97
+ if (value = attributes[:'item_containers']).is_a?(Array)
98
+ self.item_containers = value
99
+ end
100
+ end
101
+
102
+ if attributes.key?(:'max_results')
103
+ self.max_results = attributes[:'max_results']
104
+ end
105
+
106
+ if attributes.key?(:'next_offset')
107
+ self.next_offset = attributes[:'next_offset']
108
+ end
109
+
110
+ if attributes.key?(:'offset')
111
+ self.offset = attributes[:'offset']
112
+ end
113
+
114
+ if attributes.key?(:'result_count')
115
+ self.result_count = attributes[:'result_count']
116
+ end
117
+
118
+ if attributes.key?(:'total_count')
119
+ self.total_count = attributes[:'total_count']
120
+ end
121
+
122
+ if attributes.key?(:'truncated')
123
+ self.truncated = attributes[:'truncated']
124
+ end
125
+
126
+ if attributes.key?(:'truncation_advice')
127
+ self.truncation_advice = attributes[:'truncation_advice']
128
+ end
129
+ end
130
+
131
+ # Show invalid properties with the reasons. Usually used together with valid?
132
+ # @return Array for valid properties with the reasons
133
+ def list_invalid_properties
134
+ invalid_properties = Array.new
135
+ invalid_properties
136
+ end
137
+
138
+ # Check to see if the all the properties in the model are valid
139
+ # @return true if the model is valid
140
+ def valid?
141
+ true
142
+ end
143
+
144
+ # Checks equality by comparing each attribute.
145
+ # @param [Object] Object to be compared
146
+ def ==(o)
147
+ return true if self.equal?(o)
148
+ self.class == o.class &&
149
+ item_containers == o.item_containers &&
150
+ max_results == o.max_results &&
151
+ next_offset == o.next_offset &&
152
+ offset == o.offset &&
153
+ result_count == o.result_count &&
154
+ total_count == o.total_count &&
155
+ truncated == o.truncated &&
156
+ truncation_advice == o.truncation_advice
157
+ end
158
+
159
+ # @see the `==` method
160
+ # @param [Object] Object to be compared
161
+ def eql?(o)
162
+ self == o
163
+ end
164
+
165
+ # Calculates hash code according to all attributes.
166
+ # @return [Integer] Hash code
167
+ def hash
168
+ [item_containers, max_results, next_offset, offset, result_count, total_count, truncated, truncation_advice].hash
169
+ end
170
+
171
+ # Builds the object from hash
172
+ # @param [Hash] attributes Model attributes in the form of hash
173
+ # @return [Object] Returns the model itself
174
+ def self.build_from_hash(attributes)
175
+ new.build_from_hash(attributes)
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def build_from_hash(attributes)
182
+ return nil unless attributes.is_a?(Hash)
183
+ attributes = attributes.transform_keys(&:to_sym)
184
+ self.class.openapi_types.each_pair do |key, type|
185
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
186
+ self.send("#{key}=", nil)
187
+ elsif type =~ /\AArray<(.*)>/i
188
+ # check to ensure the input is an array given that the attribute
189
+ # is documented as an array but the input is not
190
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
191
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
192
+ end
193
+ elsif !attributes[self.class.attribute_map[key]].nil?
194
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
195
+ end
196
+ end
197
+
198
+ self
199
+ end
200
+
201
+ # Deserializes the data based on type
202
+ # @param string type Data type
203
+ # @param string value Value to be deserialized
204
+ # @return [Object] Deserialized data
205
+ def _deserialize(type, value)
206
+ case type.to_sym
207
+ when :Time
208
+ Time.parse(value)
209
+ when :Date
210
+ Date.parse(value)
211
+ when :String
212
+ value.to_s
213
+ when :Integer
214
+ value.to_i
215
+ when :Float
216
+ value.to_f
217
+ when :Boolean
218
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
219
+ true
220
+ else
221
+ false
222
+ end
223
+ when :Object
224
+ # generic object (usually a Hash), return directly
225
+ value
226
+ when /\AArray<(?<inner_type>.+)>\z/
227
+ inner_type = Regexp.last_match[:inner_type]
228
+ value.map { |v| _deserialize(inner_type, v) }
229
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
230
+ k_type = Regexp.last_match[:k_type]
231
+ v_type = Regexp.last_match[:v_type]
232
+ {}.tap do |hash|
233
+ value.each do |k, v|
234
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
235
+ end
236
+ end
237
+ else # model
238
+ # models (e.g. Pet) or oneOf
239
+ klass = UltracartClient.const_get(type)
240
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
241
+ end
242
+ end
243
+
244
+ # Returns the string representation of the object
245
+ # @return [String] String presentation of the object
246
+ def to_s
247
+ to_hash.to_s
248
+ end
249
+
250
+ # to_body is an alias to to_hash (backward compatibility)
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_body
253
+ to_hash
254
+ end
255
+
256
+ # Returns the object in the form of hash
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_hash
259
+ hash = {}
260
+ self.class.attribute_map.each_pair do |attr, param|
261
+ value = self.send(attr)
262
+ if value.nil?
263
+ is_nullable = self.class.openapi_nullable.include?(attr)
264
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
265
+ end
266
+
267
+ hash[param] = _to_hash(value)
268
+ end
269
+ hash
270
+ end
271
+
272
+ # Outputs non-array value in the form of hash
273
+ # For object, use to_hash. Otherwise, just return the value
274
+ # @param [Object] value Any valid value
275
+ # @return [Hash] Returns the value in the form of hash
276
+ def _to_hash(value)
277
+ if value.is_a?(Array)
278
+ value.compact.map { |v| _to_hash(v) }
279
+ elsif value.is_a?(Hash)
280
+ {}.tap do |hash|
281
+ value.each { |k, v| hash[k] = _to_hash(v) }
282
+ end
283
+ elsif value.respond_to? :to_hash
284
+ value.to_hash
285
+ else
286
+ value
287
+ end
288
+ end
289
+
290
+ end
291
+
292
+ 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.167'
14
+ VERSION = '4.1.169'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1015,6 +1015,8 @@ require 'ultracart_api/models/sfvb_file_versions_response'
1015
1015
  require 'ultracart_api/models/sfvb_file_write_request'
1016
1016
  require 'ultracart_api/models/sfvb_file_write_response'
1017
1017
  require 'ultracart_api/models/sfvb_files_response'
1018
+ require 'ultracart_api/models/sfvb_item_container'
1019
+ require 'ultracart_api/models/sfvb_item_containers_response'
1018
1020
  require 'ultracart_api/models/sfvb_library_entry'
1019
1021
  require 'ultracart_api/models/sfvb_library_facet'
1020
1022
  require 'ultracart_api/models/sfvb_library_response'
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.167
4
+ version: 4.1.169
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-21 00:00:00.000000000 Z
11
+ date: 2026-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1077,6 +1077,8 @@ files:
1077
1077
  - docs/SfvbFileWriteRequest.md
1078
1078
  - docs/SfvbFileWriteResponse.md
1079
1079
  - docs/SfvbFilesResponse.md
1080
+ - docs/SfvbItemContainer.md
1081
+ - docs/SfvbItemContainersResponse.md
1080
1082
  - docs/SfvbLibraryEntry.md
1081
1083
  - docs/SfvbLibraryFacet.md
1082
1084
  - docs/SfvbLibraryResponse.md
@@ -2258,6 +2260,8 @@ files:
2258
2260
  - lib/ultracart_api/models/sfvb_file_write_request.rb
2259
2261
  - lib/ultracart_api/models/sfvb_file_write_response.rb
2260
2262
  - lib/ultracart_api/models/sfvb_files_response.rb
2263
+ - lib/ultracart_api/models/sfvb_item_container.rb
2264
+ - lib/ultracart_api/models/sfvb_item_containers_response.rb
2261
2265
  - lib/ultracart_api/models/sfvb_library_entry.rb
2262
2266
  - lib/ultracart_api/models/sfvb_library_facet.rb
2263
2267
  - lib/ultracart_api/models/sfvb_library_response.rb