ultracart_api 4.1.174 → 4.1.175

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: 6744f7bfd2e6e6f44a4483bf87b7b1b8228ae29f1ca7883a3781584423b9e6d7
4
- data.tar.gz: 3640f3fc644cb45dda4640fe9d924b9411c42deef351cf397512da7a01b31eee
3
+ metadata.gz: fd4dd3e7065e2143fbfc5fcc87b849ab24f74fca230a1a88a84219878fa7febf
4
+ data.tar.gz: 5db7bb27d9a3702e72c4243a2ffe7ab8c27f6afb9ac3b27148a1d45de7667f40
5
5
  SHA512:
6
- metadata.gz: 6ffbcca0cf147ebf40b4e2e2cdc4088286b68d122d6d88a7314f97d0722727e656ede9e981276a3263e21600d868255ec2b1c560ff128afc007afda763d988c0
7
- data.tar.gz: 945b8d5bcfd7fa80e6cfd8458412065338caa3ad9a00ea5717ab2452217684642f326cb21e0f199878fb8621cb8d6a33aecf9a76c0f3a7e1fd5860e6baf5305e
6
+ metadata.gz: 444b2b719369623a51d8f11e5d7122d84deb63049d3c13245b319fc6d021d41dda6da2e701520be8b4693308a33f06ac0e7ecad40a0fd74e376515d3dcdcf7c0
7
+ data.tar.gz: a6ba6a9fd8f1d77e42bed140af7147f067189795a08072e0e15d0adca4f1c2bbb81f80b0cdd2e5be7dbf0813b74c44fdb95437a02dd67c93dec18fca53ade9ad
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.174
10
+ - Package version: 4.1.175
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.174'
19
+ gem 'ultracart_api', '4.1.175'
20
20
  ```
21
21
 
22
22
  install:
@@ -549,6 +549,7 @@ Class | Method | HTTP request | Description
549
549
  *UltracartClient::SfvbApi* | [**put_sfvb_preview_session**](docs/SfvbApi.md#put_sfvb_preview_session) | **PUT** /sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id} | Push containers into a preview session
550
550
  *UltracartClient::SfvbApi* | [**put_sfvb_site_attributes**](docs/SfvbApi.md#put_sfvb_site_attributes) | **PUT** /sfvb/storefronts/{storefront_oid}/attributes | Change a storefront's site attributes
551
551
  *UltracartClient::SfvbApi* | [**put_sfvb_theme_attributes**](docs/SfvbApi.md#put_sfvb_theme_attributes) | **PUT** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes | Change a theme's colors, fonts and settings
552
+ *UltracartClient::SfvbApi* | [**refresh_sfvb_page**](docs/SfvbApi.md#refresh_sfvb_page) | **POST** /sfvb/storefronts/{storefront_oid}/pages/refresh | Drop one page's cached copy
552
553
  *UltracartClient::SfvbApi* | [**remove_sfvb_page_blog_posts**](docs/SfvbApi.md#remove_sfvb_page_blog_posts) | **POST** /sfvb/storefronts/{storefront_oid}/pages/blog_posts/remove | Take blog posts off a page
553
554
  *UltracartClient::SfvbApi* | [**remove_sfvb_page_items**](docs/SfvbApi.md#remove_sfvb_page_items) | **POST** /sfvb/storefronts/{storefront_oid}/pages/items/remove | Take items off a page
554
555
  *UltracartClient::SfvbApi* | [**render_sfvb_widgets**](docs/SfvbApi.md#render_sfvb_widgets) | **POST** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/render | Render a CJSON node to HTML
@@ -1854,6 +1855,8 @@ Class | Method | HTTP request | Description
1854
1855
  - [UltracartClient::SfvbPageListResponse](docs/SfvbPageListResponse.md)
1855
1856
  - [UltracartClient::SfvbPageMultimedia](docs/SfvbPageMultimedia.md)
1856
1857
  - [UltracartClient::SfvbPageMultimediaRequest](docs/SfvbPageMultimediaRequest.md)
1858
+ - [UltracartClient::SfvbPageRefreshRequest](docs/SfvbPageRefreshRequest.md)
1859
+ - [UltracartClient::SfvbPageRefreshResponse](docs/SfvbPageRefreshResponse.md)
1857
1860
  - [UltracartClient::SfvbPageResponse](docs/SfvbPageResponse.md)
1858
1861
  - [UltracartClient::SfvbPageSelectors](docs/SfvbPageSelectors.md)
1859
1862
  - [UltracartClient::SfvbPageSettingsRequest](docs/SfvbPageSettingsRequest.md)
@@ -2070,6 +2073,7 @@ Not every change is committed to every SDK.
2070
2073
 
2071
2074
  | Version | Date | Comments |
2072
2075
  | --: | :-: | --- |
2076
+ | 4.1.175 | 09/29/2026 | sfvb internal testing |
2073
2077
  | 4.1.174 | 09/25/2026 | sfvb internal testing |
2074
2078
  | 4.1.173 | 09/24/2026 | storefront communications flow re-entry setting |
2075
2079
  | 4.1.172 | 09/24/2026 | storefront communications flow re-entry setting |
data/docs/SfvbApi.md CHANGED
@@ -81,6 +81,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
81
81
  | [**put_sfvb_preview_session**](SfvbApi.md#put_sfvb_preview_session) | **PUT** /sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id} | Push containers into a preview session |
82
82
  | [**put_sfvb_site_attributes**](SfvbApi.md#put_sfvb_site_attributes) | **PUT** /sfvb/storefronts/{storefront_oid}/attributes | Change a storefront's site attributes |
83
83
  | [**put_sfvb_theme_attributes**](SfvbApi.md#put_sfvb_theme_attributes) | **PUT** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes | Change a theme's colors, fonts and settings |
84
+ | [**refresh_sfvb_page**](SfvbApi.md#refresh_sfvb_page) | **POST** /sfvb/storefronts/{storefront_oid}/pages/refresh | Drop one page's cached copy |
84
85
  | [**remove_sfvb_page_blog_posts**](SfvbApi.md#remove_sfvb_page_blog_posts) | **POST** /sfvb/storefronts/{storefront_oid}/pages/blog_posts/remove | Take blog posts off a page |
85
86
  | [**remove_sfvb_page_items**](SfvbApi.md#remove_sfvb_page_items) | **POST** /sfvb/storefronts/{storefront_oid}/pages/items/remove | Take items off a page |
86
87
  | [**render_sfvb_widgets**](SfvbApi.md#render_sfvb_widgets) | **POST** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/render | Render a CJSON node to HTML |
@@ -4311,6 +4312,60 @@ end
4311
4312
  - **Accept**: application/json
4312
4313
 
4313
4314
 
4315
+ ## refresh_sfvb_page
4316
+
4317
+ > <SfvbPageRefreshResponse> refresh_sfvb_page(storefront_oid, page_refresh_request)
4318
+
4319
+ Drop one page's cached copy
4320
+
4321
+ The next request renders the page fresh. Use it when a write succeeded, a read shows the new value, and the public page still shows the old one. Writes normally refresh the pages they affect, so a stale page after a write is a bug worth reporting with its URL. One page per request. The response says whether the page had a cached copy and whether anything was dropped.
4322
+
4323
+
4324
+ ### Examples
4325
+
4326
+
4327
+ (No example for this operation).
4328
+
4329
+
4330
+ #### Using the refresh_sfvb_page_with_http_info variant
4331
+
4332
+ This returns an Array which contains the response data, status code and headers.
4333
+
4334
+ > <Array(<SfvbPageRefreshResponse>, Integer, Hash)> refresh_sfvb_page_with_http_info(storefront_oid, page_refresh_request)
4335
+
4336
+ ```ruby
4337
+ begin
4338
+ # Drop one page's cached copy
4339
+ data, status_code, headers = api_instance.refresh_sfvb_page_with_http_info(storefront_oid, page_refresh_request)
4340
+ p status_code # => 2xx
4341
+ p headers # => { ... }
4342
+ p data # => <SfvbPageRefreshResponse>
4343
+ rescue UltracartClient::ApiError => e
4344
+ puts "Error when calling SfvbApi->refresh_sfvb_page_with_http_info: #{e}"
4345
+ end
4346
+ ```
4347
+
4348
+ ### Parameters
4349
+
4350
+ | Name | Type | Description | Notes |
4351
+ | ---- | ---- | ----------- | ----- |
4352
+ | **storefront_oid** | **Integer** | | |
4353
+ | **page_refresh_request** | [**SfvbPageRefreshRequest**](SfvbPageRefreshRequest.md) | The page to refresh | |
4354
+
4355
+ ### Return type
4356
+
4357
+ [**SfvbPageRefreshResponse**](SfvbPageRefreshResponse.md)
4358
+
4359
+ ### Authorization
4360
+
4361
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
4362
+
4363
+ ### HTTP request headers
4364
+
4365
+ - **Content-Type**: application/json
4366
+ - **Accept**: application/json
4367
+
4368
+
4314
4369
  ## remove_sfvb_page_blog_posts
4315
4370
 
4316
4371
  > <SfvbPageBlogPostsResponse> remove_sfvb_page_blog_posts(storefront_oid, path, page_blog_posts_request)
@@ -0,0 +1,18 @@
1
+ # UltracartClient::SfvbPageRefreshRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **url** | **String** | The page to refresh. A path such as /shop/coffee.html, or a full URL on this storefront&#39;s host. The query string is ignored, and a path ending in / means its index.html. One page per request. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::SfvbPageRefreshRequest.new(
15
+ url: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::SfvbPageRefreshResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | A plain sentence saying what happened. | [optional] |
8
+ | **path** | **String** | The page path the refresh used, after normalization. | [optional] |
9
+ | **refreshed** | **Boolean** | True when a cached copy was dropped. The next request renders the page fresh. | [optional] |
10
+ | **was_cached** | **Boolean** | True when the page had a cache entry. | [optional] |
11
+ | **was_valid** | **Boolean** | True when that entry was being served from cache. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::SfvbPageRefreshResponse.new(
19
+ message: null,
20
+ path: null,
21
+ refreshed: null,
22
+ was_cached: null,
23
+ was_valid: null
24
+ )
25
+ ```
26
+
@@ -5721,6 +5721,81 @@ module UltracartClient
5721
5721
  return data, status_code, headers
5722
5722
  end
5723
5723
 
5724
+ # Drop one page's cached copy
5725
+ # The next request renders the page fresh. Use it when a write succeeded, a read shows the new value, and the public page still shows the old one. Writes normally refresh the pages they affect, so a stale page after a write is a bug worth reporting with its URL. One page per request. The response says whether the page had a cached copy and whether anything was dropped.
5726
+ # @param storefront_oid [Integer]
5727
+ # @param page_refresh_request [SfvbPageRefreshRequest] The page to refresh
5728
+ # @param [Hash] opts the optional parameters
5729
+ # @return [SfvbPageRefreshResponse]
5730
+ def refresh_sfvb_page(storefront_oid, page_refresh_request, opts = {})
5731
+ data, _status_code, _headers = refresh_sfvb_page_with_http_info(storefront_oid, page_refresh_request, opts)
5732
+ data
5733
+ end
5734
+
5735
+ # Drop one page&#39;s cached copy
5736
+ # The next request renders the page fresh. Use it when a write succeeded, a read shows the new value, and the public page still shows the old one. Writes normally refresh the pages they affect, so a stale page after a write is a bug worth reporting with its URL. One page per request. The response says whether the page had a cached copy and whether anything was dropped.
5737
+ # @param storefront_oid [Integer]
5738
+ # @param page_refresh_request [SfvbPageRefreshRequest] The page to refresh
5739
+ # @param [Hash] opts the optional parameters
5740
+ # @return [Array<(SfvbPageRefreshResponse, Integer, Hash)>] SfvbPageRefreshResponse data, response status code and response headers
5741
+ def refresh_sfvb_page_with_http_info(storefront_oid, page_refresh_request, opts = {})
5742
+ if @api_client.config.debugging
5743
+ @api_client.config.logger.debug 'Calling API: SfvbApi.refresh_sfvb_page ...'
5744
+ end
5745
+ # verify the required parameter 'storefront_oid' is set
5746
+ if @api_client.config.client_side_validation && storefront_oid.nil?
5747
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.refresh_sfvb_page"
5748
+ end
5749
+ # verify the required parameter 'page_refresh_request' is set
5750
+ if @api_client.config.client_side_validation && page_refresh_request.nil?
5751
+ fail ArgumentError, "Missing the required parameter 'page_refresh_request' when calling SfvbApi.refresh_sfvb_page"
5752
+ end
5753
+ # resource path
5754
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/refresh'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
5755
+
5756
+ # query parameters
5757
+ query_params = opts[:query_params] || {}
5758
+
5759
+ # header parameters
5760
+ header_params = opts[:header_params] || {}
5761
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
5762
+ # HTTP header 'Accept' (if needed)
5763
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5764
+ # HTTP header 'Content-Type'
5765
+ content_type = @api_client.select_header_content_type(['application/json'])
5766
+ if !content_type.nil?
5767
+ header_params['Content-Type'] = content_type
5768
+ end
5769
+
5770
+ # form parameters
5771
+ form_params = opts[:form_params] || {}
5772
+
5773
+ # http body (model)
5774
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(page_refresh_request)
5775
+
5776
+ # return_type
5777
+ return_type = opts[:debug_return_type] || 'SfvbPageRefreshResponse'
5778
+
5779
+ # auth_names
5780
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
5781
+
5782
+ new_options = opts.merge(
5783
+ :operation => :"SfvbApi.refresh_sfvb_page",
5784
+ :header_params => header_params,
5785
+ :query_params => query_params,
5786
+ :form_params => form_params,
5787
+ :body => post_body,
5788
+ :auth_names => auth_names,
5789
+ :return_type => return_type
5790
+ )
5791
+
5792
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
5793
+ if @api_client.config.debugging
5794
+ @api_client.config.logger.debug "API called: SfvbApi#refresh_sfvb_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5795
+ end
5796
+ return data, status_code, headers
5797
+ end
5798
+
5724
5799
  # Take blog posts off a page
5725
5800
  # Removes posts by blog_post_oid, at most 500 at a time. Every oid must be on the page, and one that is not changes nothing. The posts themselves are not touched. Always needs sfvb_publish.
5726
5801
  # @param storefront_oid [Integer]
@@ -0,0 +1,220 @@
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 SfvbPageRefreshRequest
18
+ # The page to refresh. A path such as /shop/coffee.html, or a full URL on this storefront's host. The query string is ignored, and a path ending in / means its index.html. One page per request.
19
+ attr_accessor :url
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'url' => :'url'
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
+ :'url' => :'String'
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::SfvbPageRefreshRequest` 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::SfvbPageRefreshRequest`. 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?(:'url')
62
+ self.url = attributes[:'url']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ url == o.url
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [url].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = UltracartClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -0,0 +1,260 @@
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 SfvbPageRefreshResponse
18
+ # A plain sentence saying what happened.
19
+ attr_accessor :message
20
+
21
+ # The page path the refresh used, after normalization.
22
+ attr_accessor :path
23
+
24
+ # True when a cached copy was dropped. The next request renders the page fresh.
25
+ attr_accessor :refreshed
26
+
27
+ # True when the page had a cache entry.
28
+ attr_accessor :was_cached
29
+
30
+ # True when that entry was being served from cache.
31
+ attr_accessor :was_valid
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'message' => :'message',
37
+ :'path' => :'path',
38
+ :'refreshed' => :'refreshed',
39
+ :'was_cached' => :'was_cached',
40
+ :'was_valid' => :'was_valid'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'message' => :'String',
53
+ :'path' => :'String',
54
+ :'refreshed' => :'Boolean',
55
+ :'was_cached' => :'Boolean',
56
+ :'was_valid' => :'Boolean'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbPageRefreshResponse` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbPageRefreshResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'message')
82
+ self.message = attributes[:'message']
83
+ end
84
+
85
+ if attributes.key?(:'path')
86
+ self.path = attributes[:'path']
87
+ end
88
+
89
+ if attributes.key?(:'refreshed')
90
+ self.refreshed = attributes[:'refreshed']
91
+ end
92
+
93
+ if attributes.key?(:'was_cached')
94
+ self.was_cached = attributes[:'was_cached']
95
+ end
96
+
97
+ if attributes.key?(:'was_valid')
98
+ self.was_valid = attributes[:'was_valid']
99
+ end
100
+ end
101
+
102
+ # Show invalid properties with the reasons. Usually used together with valid?
103
+ # @return Array for valid properties with the reasons
104
+ def list_invalid_properties
105
+ invalid_properties = Array.new
106
+ invalid_properties
107
+ end
108
+
109
+ # Check to see if the all the properties in the model are valid
110
+ # @return true if the model is valid
111
+ def valid?
112
+ true
113
+ end
114
+
115
+ # Checks equality by comparing each attribute.
116
+ # @param [Object] Object to be compared
117
+ def ==(o)
118
+ return true if self.equal?(o)
119
+ self.class == o.class &&
120
+ message == o.message &&
121
+ path == o.path &&
122
+ refreshed == o.refreshed &&
123
+ was_cached == o.was_cached &&
124
+ was_valid == o.was_valid
125
+ end
126
+
127
+ # @see the `==` method
128
+ # @param [Object] Object to be compared
129
+ def eql?(o)
130
+ self == o
131
+ end
132
+
133
+ # Calculates hash code according to all attributes.
134
+ # @return [Integer] Hash code
135
+ def hash
136
+ [message, path, refreshed, was_cached, was_valid].hash
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def self.build_from_hash(attributes)
143
+ new.build_from_hash(attributes)
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def build_from_hash(attributes)
150
+ return nil unless attributes.is_a?(Hash)
151
+ attributes = attributes.transform_keys(&:to_sym)
152
+ self.class.openapi_types.each_pair do |key, type|
153
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
154
+ self.send("#{key}=", nil)
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
159
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
160
+ end
161
+ elsif !attributes[self.class.attribute_map[key]].nil?
162
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
163
+ end
164
+ end
165
+
166
+ self
167
+ end
168
+
169
+ # Deserializes the data based on type
170
+ # @param string type Data type
171
+ # @param string value Value to be deserialized
172
+ # @return [Object] Deserialized data
173
+ def _deserialize(type, value)
174
+ case type.to_sym
175
+ when :Time
176
+ Time.parse(value)
177
+ when :Date
178
+ Date.parse(value)
179
+ when :String
180
+ value.to_s
181
+ when :Integer
182
+ value.to_i
183
+ when :Float
184
+ value.to_f
185
+ when :Boolean
186
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
187
+ true
188
+ else
189
+ false
190
+ end
191
+ when :Object
192
+ # generic object (usually a Hash), return directly
193
+ value
194
+ when /\AArray<(?<inner_type>.+)>\z/
195
+ inner_type = Regexp.last_match[:inner_type]
196
+ value.map { |v| _deserialize(inner_type, v) }
197
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
198
+ k_type = Regexp.last_match[:k_type]
199
+ v_type = Regexp.last_match[:v_type]
200
+ {}.tap do |hash|
201
+ value.each do |k, v|
202
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
203
+ end
204
+ end
205
+ else # model
206
+ # models (e.g. Pet) or oneOf
207
+ klass = UltracartClient.const_get(type)
208
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
209
+ end
210
+ end
211
+
212
+ # Returns the string representation of the object
213
+ # @return [String] String presentation of the object
214
+ def to_s
215
+ to_hash.to_s
216
+ end
217
+
218
+ # to_body is an alias to to_hash (backward compatibility)
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_body
221
+ to_hash
222
+ end
223
+
224
+ # Returns the object in the form of hash
225
+ # @return [Hash] Returns the object in the form of hash
226
+ def to_hash
227
+ hash = {}
228
+ self.class.attribute_map.each_pair do |attr, param|
229
+ value = self.send(attr)
230
+ if value.nil?
231
+ is_nullable = self.class.openapi_nullable.include?(attr)
232
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
233
+ end
234
+
235
+ hash[param] = _to_hash(value)
236
+ end
237
+ hash
238
+ end
239
+
240
+ # Outputs non-array value in the form of hash
241
+ # For object, use to_hash. Otherwise, just return the value
242
+ # @param [Object] value Any valid value
243
+ # @return [Hash] Returns the value in the form of hash
244
+ def _to_hash(value)
245
+ if value.is_a?(Array)
246
+ value.compact.map { |v| _to_hash(v) }
247
+ elsif value.is_a?(Hash)
248
+ {}.tap do |hash|
249
+ value.each { |k, v| hash[k] = _to_hash(v) }
250
+ end
251
+ elsif value.respond_to? :to_hash
252
+ value.to_hash
253
+ else
254
+ value
255
+ end
256
+ end
257
+
258
+ end
259
+
260
+ 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.174'
14
+ VERSION = '4.1.175'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1049,6 +1049,8 @@ require 'ultracart_api/models/sfvb_page_items_response'
1049
1049
  require 'ultracart_api/models/sfvb_page_list_response'
1050
1050
  require 'ultracart_api/models/sfvb_page_multimedia'
1051
1051
  require 'ultracart_api/models/sfvb_page_multimedia_request'
1052
+ require 'ultracart_api/models/sfvb_page_refresh_request'
1053
+ require 'ultracart_api/models/sfvb_page_refresh_response'
1052
1054
  require 'ultracart_api/models/sfvb_page_response'
1053
1055
  require 'ultracart_api/models/sfvb_page_selectors'
1054
1056
  require 'ultracart_api/models/sfvb_page_settings_request'
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.174
4
+ version: 4.1.175
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-25 00:00:00.000000000 Z
11
+ date: 2026-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -1111,6 +1111,8 @@ files:
1111
1111
  - docs/SfvbPageListResponse.md
1112
1112
  - docs/SfvbPageMultimedia.md
1113
1113
  - docs/SfvbPageMultimediaRequest.md
1114
+ - docs/SfvbPageRefreshRequest.md
1115
+ - docs/SfvbPageRefreshResponse.md
1114
1116
  - docs/SfvbPageResponse.md
1115
1117
  - docs/SfvbPageSelectors.md
1116
1118
  - docs/SfvbPageSettingsRequest.md
@@ -2317,6 +2319,8 @@ files:
2317
2319
  - lib/ultracart_api/models/sfvb_page_list_response.rb
2318
2320
  - lib/ultracart_api/models/sfvb_page_multimedia.rb
2319
2321
  - lib/ultracart_api/models/sfvb_page_multimedia_request.rb
2322
+ - lib/ultracart_api/models/sfvb_page_refresh_request.rb
2323
+ - lib/ultracart_api/models/sfvb_page_refresh_response.rb
2320
2324
  - lib/ultracart_api/models/sfvb_page_response.rb
2321
2325
  - lib/ultracart_api/models/sfvb_page_selectors.rb
2322
2326
  - lib/ultracart_api/models/sfvb_page_settings_request.rb