ultracart_api 4.1.151 → 4.1.153
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 +4 -4
- data/README.md +22 -2
- data/docs/SfvbApi.md +335 -0
- data/docs/SfvbPageAttribute.md +32 -0
- data/docs/SfvbPageAttributeUpdate.md +22 -0
- data/docs/SfvbPageAttributeUpdateRequest.md +18 -0
- data/docs/SfvbPageMultimedia.md +30 -0
- data/docs/SfvbPageMultimediaRequest.md +24 -0
- data/docs/SfvbPageResponse.md +22 -0
- data/docs/SfvbThemeAttribute.md +34 -0
- data/docs/SfvbThemeAttributeUpdate.md +24 -0
- data/docs/SfvbThemeAttributeUpdateRequest.md +18 -0
- data/docs/SfvbThemeAttributesResponse.md +24 -0
- data/docs/SfvbThemeFont.md +22 -0
- data/docs/SfvbThemeFontFamily.md +22 -0
- data/lib/ultracart_api/api/sfvb_api.rb +463 -0
- data/lib/ultracart_api/models/sfvb_page_attribute.rb +324 -0
- data/lib/ultracart_api/models/sfvb_page_attribute_update.rb +274 -0
- data/lib/ultracart_api/models/sfvb_page_attribute_update_request.rb +222 -0
- data/lib/ultracart_api/models/sfvb_page_multimedia.rb +280 -0
- data/lib/ultracart_api/models/sfvb_page_multimedia_request.rb +250 -0
- data/lib/ultracart_api/models/sfvb_page_response.rb +244 -0
- data/lib/ultracart_api/models/sfvb_theme_attribute.rb +333 -0
- data/lib/ultracart_api/models/sfvb_theme_attribute_update.rb +283 -0
- data/lib/ultracart_api/models/sfvb_theme_attribute_update_request.rb +222 -0
- data/lib/ultracart_api/models/sfvb_theme_attributes_response.rb +252 -0
- data/lib/ultracart_api/models/sfvb_theme_font.rb +242 -0
- data/lib/ultracart_api/models/sfvb_theme_font_family.rb +274 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +12 -0
- metadata +26 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# UltracartClient::SfvbThemeAttribute
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **default_value** | **String** | What the declaring template falls back to when this slot has no value. | [optional] |
|
|
8
|
+
| **deprecated** | **Boolean** | True when the theme marks this slot as on its way out. Prefer not to build on it. | [optional] |
|
|
9
|
+
| **description** | **String** | What this slot is for, where the theme author documented it. | [optional] |
|
|
10
|
+
| **font** | [**SfvbThemeFont**](SfvbThemeFont.md) | | [optional] |
|
|
11
|
+
| **name** | **String** | Slot name, for example Theme Color 01. Returned in the casing the theme's templates declare, which may differ from the casing you wrote. Compare case insensitively. | [optional] |
|
|
12
|
+
| **type** | **String** | What kind of slot this is, taken from the template that declares it rather than guessed from the value. orphan means nothing declares it. | [optional] |
|
|
13
|
+
| **undeclared** | **Boolean** | True when no template in this theme references this name. Writing such a name is allowed and is how the builder stores its own settings, but if you did not mean to create one this is a misspelling and the write changed nothing visible. | [optional] |
|
|
14
|
+
| **unused** | **Boolean** | True when the slot is declared but nothing in the theme actually reads it, so setting it has no visible effect. | [optional] |
|
|
15
|
+
| **value** | **String** | The applied value. For a colour this is a hex or rgb string, for a boolean the text true or false, for a font the raw JSON document also given in the font field. When the stored value is empty the current preset's default is filled in here. | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'ultracart_api'
|
|
21
|
+
|
|
22
|
+
instance = UltracartClient::SfvbThemeAttribute.new(
|
|
23
|
+
default_value: null,
|
|
24
|
+
deprecated: null,
|
|
25
|
+
description: null,
|
|
26
|
+
font: null,
|
|
27
|
+
name: null,
|
|
28
|
+
type: null,
|
|
29
|
+
undeclared: null,
|
|
30
|
+
unused: null,
|
|
31
|
+
value: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UltracartClient::SfvbThemeAttributeUpdate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **font** | [**SfvbThemeFont**](SfvbThemeFont.md) | | [optional] |
|
|
8
|
+
| **name** | **String** | Slot name. Matched without regard to case against what the theme already has, so you do not have to reproduce the exact casing. A name nothing matches creates a new slot. | [optional] |
|
|
9
|
+
| **type** | **String** | Only consulted when creating a slot the theme does not already have. For a slot that exists the declared type always wins, because the templates decide it and not the caller. | [optional] |
|
|
10
|
+
| **value** | **String** | The value to store. An empty string clears the slot, which makes it fall back to the theme's default rather than removing it. Ignored for a font when the font field is supplied. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ultracart_api'
|
|
16
|
+
|
|
17
|
+
instance = UltracartClient::SfvbThemeAttributeUpdate.new(
|
|
18
|
+
font: null,
|
|
19
|
+
name: null,
|
|
20
|
+
type: null,
|
|
21
|
+
value: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UltracartClient::SfvbThemeAttributeUpdateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **attributes** | [**Array<SfvbThemeAttributeUpdate>**](SfvbThemeAttributeUpdate.md) | The slots to change. Sending several in one call is preferred over one call each - they are applied together, so a palette lands as a single change rather than as a sequence a shopper could see halfway through. | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ultracart_api'
|
|
13
|
+
|
|
14
|
+
instance = UltracartClient::SfvbThemeAttributeUpdateRequest.new(
|
|
15
|
+
attributes: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UltracartClient::SfvbThemeAttributesResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **active** | **Boolean** | True when this theme is the one serving live traffic. Changing an active theme's colours changes what shoppers see immediately, so the write requires the sfvb_publish scope. Duplicate the theme and restyle the copy to work with an ordinary write scope. | [optional] |
|
|
8
|
+
| **attributes** | [**Array<SfvbThemeAttribute>**](SfvbThemeAttribute.md) | Every slot this theme has, including ones declared by a template but never set. Sorted by name. | [optional] |
|
|
9
|
+
| **theme_name** | **String** | Theme name, so a caller can confirm it is working on the theme it meant. | [optional] |
|
|
10
|
+
| **theme_oid** | **Integer** | StoreFront theme oid these belong to. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ultracart_api'
|
|
16
|
+
|
|
17
|
+
instance = UltracartClient::SfvbThemeAttributesResponse.new(
|
|
18
|
+
active: null,
|
|
19
|
+
attributes: null,
|
|
20
|
+
theme_name: null,
|
|
21
|
+
theme_oid: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UltracartClient::SfvbThemeFont
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **families** | [**Array<SfvbThemeFontFamily>**](SfvbThemeFontFamily.md) | Ordered font stack. The browser uses the first one it can load, so a generic family belongs last as the fallback. | [optional] |
|
|
8
|
+
| **size** | **String** | Font size as a number without units, for example 16. Empty means the theme decides. | [optional] |
|
|
9
|
+
| **weight** | **String** | CSS font weight, for example 400 or bold. Empty means the theme decides. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'ultracart_api'
|
|
15
|
+
|
|
16
|
+
instance = UltracartClient::SfvbThemeFont.new(
|
|
17
|
+
families: null,
|
|
18
|
+
size: null,
|
|
19
|
+
weight: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UltracartClient::SfvbThemeFontFamily
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **family** | **String** | Family name, for example Montserrat. | [optional] |
|
|
8
|
+
| **kit_id** | **String** | Typekit kit identifier. Only meaningful when type is typekit. | [optional] |
|
|
9
|
+
| **type** | **String** | Where the font comes from. native means a font installed on the shopper's machine, generic means a CSS keyword such as serif or sans-serif and belongs last in the stack. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'ultracart_api'
|
|
15
|
+
|
|
16
|
+
instance = UltracartClient::SfvbThemeFontFamily.new(
|
|
17
|
+
family: null,
|
|
18
|
+
kit_id: null,
|
|
19
|
+
type: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -239,6 +239,83 @@ module UltracartClient
|
|
|
239
239
|
return data, status_code, headers
|
|
240
240
|
end
|
|
241
241
|
|
|
242
|
+
# Detach an image from a page
|
|
243
|
+
# Name exactly one of code or default. Removes the page's copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
244
|
+
# @param storefront_oid [Integer]
|
|
245
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
246
|
+
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @option opts [String] :code Image code to detach
|
|
248
|
+
# @option opts [Boolean] :default True to detach the default image
|
|
249
|
+
# @return [SfvbPageResponse]
|
|
250
|
+
def delete_sfvb_page_multimedia(storefront_oid, path, opts = {})
|
|
251
|
+
data, _status_code, _headers = delete_sfvb_page_multimedia_with_http_info(storefront_oid, path, opts)
|
|
252
|
+
data
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Detach an image from a page
|
|
256
|
+
# Name exactly one of code or default. Removes the page's copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
257
|
+
# @param storefront_oid [Integer]
|
|
258
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
259
|
+
# @param [Hash] opts the optional parameters
|
|
260
|
+
# @option opts [String] :code Image code to detach
|
|
261
|
+
# @option opts [Boolean] :default True to detach the default image
|
|
262
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
263
|
+
def delete_sfvb_page_multimedia_with_http_info(storefront_oid, path, opts = {})
|
|
264
|
+
if @api_client.config.debugging
|
|
265
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_page_multimedia ...'
|
|
266
|
+
end
|
|
267
|
+
# verify the required parameter 'storefront_oid' is set
|
|
268
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
269
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_page_multimedia"
|
|
270
|
+
end
|
|
271
|
+
# verify the required parameter 'path' is set
|
|
272
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
273
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.delete_sfvb_page_multimedia"
|
|
274
|
+
end
|
|
275
|
+
# resource path
|
|
276
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
277
|
+
|
|
278
|
+
# query parameters
|
|
279
|
+
query_params = opts[:query_params] || {}
|
|
280
|
+
query_params[:'path'] = path
|
|
281
|
+
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
|
282
|
+
query_params[:'default'] = opts[:'default'] if !opts[:'default'].nil?
|
|
283
|
+
|
|
284
|
+
# header parameters
|
|
285
|
+
header_params = opts[:header_params] || {}
|
|
286
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
287
|
+
# HTTP header 'Accept' (if needed)
|
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
289
|
+
|
|
290
|
+
# form parameters
|
|
291
|
+
form_params = opts[:form_params] || {}
|
|
292
|
+
|
|
293
|
+
# http body (model)
|
|
294
|
+
post_body = opts[:debug_body]
|
|
295
|
+
|
|
296
|
+
# return_type
|
|
297
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
298
|
+
|
|
299
|
+
# auth_names
|
|
300
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
301
|
+
|
|
302
|
+
new_options = opts.merge(
|
|
303
|
+
:operation => :"SfvbApi.delete_sfvb_page_multimedia",
|
|
304
|
+
:header_params => header_params,
|
|
305
|
+
:query_params => query_params,
|
|
306
|
+
:form_params => form_params,
|
|
307
|
+
:body => post_body,
|
|
308
|
+
:auth_names => auth_names,
|
|
309
|
+
:return_type => return_type
|
|
310
|
+
)
|
|
311
|
+
|
|
312
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
313
|
+
if @api_client.config.debugging
|
|
314
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_page_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
315
|
+
end
|
|
316
|
+
return data, status_code, headers
|
|
317
|
+
end
|
|
318
|
+
|
|
242
319
|
# Delete a preview session
|
|
243
320
|
# Releases the session before its eight hour expiry. Without this the only way to free one is to wait, which is a poor answer for a tool that may open a dozen in an afternoon.
|
|
244
321
|
# @param storefront_oid [Integer]
|
|
@@ -954,6 +1031,77 @@ module UltracartClient
|
|
|
954
1031
|
return data, status_code, headers
|
|
955
1032
|
end
|
|
956
1033
|
|
|
1034
|
+
# Read a page's attributes and images
|
|
1035
|
+
# What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
1036
|
+
# @param storefront_oid [Integer]
|
|
1037
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
1038
|
+
# @param [Hash] opts the optional parameters
|
|
1039
|
+
# @return [SfvbPageResponse]
|
|
1040
|
+
def get_sfvb_page(storefront_oid, path, opts = {})
|
|
1041
|
+
data, _status_code, _headers = get_sfvb_page_with_http_info(storefront_oid, path, opts)
|
|
1042
|
+
data
|
|
1043
|
+
end
|
|
1044
|
+
|
|
1045
|
+
# Read a page's attributes and images
|
|
1046
|
+
# What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
|
|
1047
|
+
# @param storefront_oid [Integer]
|
|
1048
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
1049
|
+
# @param [Hash] opts the optional parameters
|
|
1050
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
1051
|
+
def get_sfvb_page_with_http_info(storefront_oid, path, opts = {})
|
|
1052
|
+
if @api_client.config.debugging
|
|
1053
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_page ...'
|
|
1054
|
+
end
|
|
1055
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1056
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1057
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_page"
|
|
1058
|
+
end
|
|
1059
|
+
# verify the required parameter 'path' is set
|
|
1060
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
1061
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.get_sfvb_page"
|
|
1062
|
+
end
|
|
1063
|
+
# resource path
|
|
1064
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1065
|
+
|
|
1066
|
+
# query parameters
|
|
1067
|
+
query_params = opts[:query_params] || {}
|
|
1068
|
+
query_params[:'path'] = path
|
|
1069
|
+
|
|
1070
|
+
# header parameters
|
|
1071
|
+
header_params = opts[:header_params] || {}
|
|
1072
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1073
|
+
# HTTP header 'Accept' (if needed)
|
|
1074
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1075
|
+
|
|
1076
|
+
# form parameters
|
|
1077
|
+
form_params = opts[:form_params] || {}
|
|
1078
|
+
|
|
1079
|
+
# http body (model)
|
|
1080
|
+
post_body = opts[:debug_body]
|
|
1081
|
+
|
|
1082
|
+
# return_type
|
|
1083
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
1084
|
+
|
|
1085
|
+
# auth_names
|
|
1086
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1087
|
+
|
|
1088
|
+
new_options = opts.merge(
|
|
1089
|
+
:operation => :"SfvbApi.get_sfvb_page",
|
|
1090
|
+
:header_params => header_params,
|
|
1091
|
+
:query_params => query_params,
|
|
1092
|
+
:form_params => form_params,
|
|
1093
|
+
:body => post_body,
|
|
1094
|
+
:auth_names => auth_names,
|
|
1095
|
+
:return_type => return_type
|
|
1096
|
+
)
|
|
1097
|
+
|
|
1098
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1099
|
+
if @api_client.config.debugging
|
|
1100
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1101
|
+
end
|
|
1102
|
+
return data, status_code, headers
|
|
1103
|
+
end
|
|
1104
|
+
|
|
957
1105
|
# URL that renders a preview session
|
|
958
1106
|
# Refuses a session that does not exist, so a URL you receive is for a session that was really there. expires_in_seconds is the time actually remaining, not the configured lifetime. Needs a token that resolves to a user, because a preview session belongs to the person who created it.
|
|
959
1107
|
# @param storefront_oid [Integer]
|
|
@@ -1095,6 +1243,76 @@ module UltracartClient
|
|
|
1095
1243
|
return data, status_code, headers
|
|
1096
1244
|
end
|
|
1097
1245
|
|
|
1246
|
+
# Read a theme's colors, fonts and settings
|
|
1247
|
+
# The values theme.css and the compiled containers resolve at render time. These do NOT live in any file. settings.json contains a palette and looks like the answer, but it is the theme's factory template - it supplies defaults for slots that have never been set and is ignored for slots that have, so editing it will not change a color and reading it will not tell you the current one. Slots a template declares but nothing has ever set are included here, carrying the default they will render with, so the response describes the whole theme rather than the rows that happen to exist.
|
|
1248
|
+
# @param storefront_oid [Integer]
|
|
1249
|
+
# @param theme_oid [Integer]
|
|
1250
|
+
# @param [Hash] opts the optional parameters
|
|
1251
|
+
# @return [SfvbThemeAttributesResponse]
|
|
1252
|
+
def get_sfvb_theme_attributes(storefront_oid, theme_oid, opts = {})
|
|
1253
|
+
data, _status_code, _headers = get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, opts)
|
|
1254
|
+
data
|
|
1255
|
+
end
|
|
1256
|
+
|
|
1257
|
+
# Read a theme's colors, fonts and settings
|
|
1258
|
+
# The values theme.css and the compiled containers resolve at render time. These do NOT live in any file. settings.json contains a palette and looks like the answer, but it is the theme's factory template - it supplies defaults for slots that have never been set and is ignored for slots that have, so editing it will not change a color and reading it will not tell you the current one. Slots a template declares but nothing has ever set are included here, carrying the default they will render with, so the response describes the whole theme rather than the rows that happen to exist.
|
|
1259
|
+
# @param storefront_oid [Integer]
|
|
1260
|
+
# @param theme_oid [Integer]
|
|
1261
|
+
# @param [Hash] opts the optional parameters
|
|
1262
|
+
# @return [Array<(SfvbThemeAttributesResponse, Integer, Hash)>] SfvbThemeAttributesResponse data, response status code and response headers
|
|
1263
|
+
def get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, opts = {})
|
|
1264
|
+
if @api_client.config.debugging
|
|
1265
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_attributes ...'
|
|
1266
|
+
end
|
|
1267
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1268
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1269
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme_attributes"
|
|
1270
|
+
end
|
|
1271
|
+
# verify the required parameter 'theme_oid' is set
|
|
1272
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
1273
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.get_sfvb_theme_attributes"
|
|
1274
|
+
end
|
|
1275
|
+
# resource path
|
|
1276
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'theme_oid' + '}', CGI.escape(theme_oid.to_s))
|
|
1277
|
+
|
|
1278
|
+
# query parameters
|
|
1279
|
+
query_params = opts[:query_params] || {}
|
|
1280
|
+
|
|
1281
|
+
# header parameters
|
|
1282
|
+
header_params = opts[:header_params] || {}
|
|
1283
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1284
|
+
# HTTP header 'Accept' (if needed)
|
|
1285
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1286
|
+
|
|
1287
|
+
# form parameters
|
|
1288
|
+
form_params = opts[:form_params] || {}
|
|
1289
|
+
|
|
1290
|
+
# http body (model)
|
|
1291
|
+
post_body = opts[:debug_body]
|
|
1292
|
+
|
|
1293
|
+
# return_type
|
|
1294
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeAttributesResponse'
|
|
1295
|
+
|
|
1296
|
+
# auth_names
|
|
1297
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1298
|
+
|
|
1299
|
+
new_options = opts.merge(
|
|
1300
|
+
:operation => :"SfvbApi.get_sfvb_theme_attributes",
|
|
1301
|
+
:header_params => header_params,
|
|
1302
|
+
:query_params => query_params,
|
|
1303
|
+
:form_params => form_params,
|
|
1304
|
+
:body => post_body,
|
|
1305
|
+
:auth_names => auth_names,
|
|
1306
|
+
:return_type => return_type
|
|
1307
|
+
)
|
|
1308
|
+
|
|
1309
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1310
|
+
if @api_client.config.debugging
|
|
1311
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1312
|
+
end
|
|
1313
|
+
return data, status_code, headers
|
|
1314
|
+
end
|
|
1315
|
+
|
|
1098
1316
|
# Status of an asynchronous theme job
|
|
1099
1317
|
# Poll until complete is true, then check success. Note that the new theme's oid is not returned. The job's product is a plain text report rather than a structured result, so once it completes, list themes and match on the target_path the start call gave you.
|
|
1100
1318
|
# @param storefront_oid [Integer]
|
|
@@ -1989,6 +2207,170 @@ module UltracartClient
|
|
|
1989
2207
|
return data, status_code, headers
|
|
1990
2208
|
end
|
|
1991
2209
|
|
|
2210
|
+
# Change a page's attributes
|
|
2211
|
+
# A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page's attributes are shared by every theme and there is no dormant copy to change instead.
|
|
2212
|
+
# @param storefront_oid [Integer]
|
|
2213
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
2214
|
+
# @param page_attribute_update_request [SfvbPageAttributeUpdateRequest] Attributes to change
|
|
2215
|
+
# @param [Hash] opts the optional parameters
|
|
2216
|
+
# @return [SfvbPageResponse]
|
|
2217
|
+
def put_sfvb_page_attributes(storefront_oid, path, page_attribute_update_request, opts = {})
|
|
2218
|
+
data, _status_code, _headers = put_sfvb_page_attributes_with_http_info(storefront_oid, path, page_attribute_update_request, opts)
|
|
2219
|
+
data
|
|
2220
|
+
end
|
|
2221
|
+
|
|
2222
|
+
# Change a page's attributes
|
|
2223
|
+
# A partial update. Only the attributes you name are changed. Every entry is checked before any is written. List, slider, item set, page collection and video list attributes are refused - edit those in the page editor. Always needs sfvb_publish, because a page's attributes are shared by every theme and there is no dormant copy to change instead.
|
|
2224
|
+
# @param storefront_oid [Integer]
|
|
2225
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
2226
|
+
# @param page_attribute_update_request [SfvbPageAttributeUpdateRequest] Attributes to change
|
|
2227
|
+
# @param [Hash] opts the optional parameters
|
|
2228
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
2229
|
+
def put_sfvb_page_attributes_with_http_info(storefront_oid, path, page_attribute_update_request, opts = {})
|
|
2230
|
+
if @api_client.config.debugging
|
|
2231
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_page_attributes ...'
|
|
2232
|
+
end
|
|
2233
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2234
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2235
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_page_attributes"
|
|
2236
|
+
end
|
|
2237
|
+
# verify the required parameter 'path' is set
|
|
2238
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
2239
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.put_sfvb_page_attributes"
|
|
2240
|
+
end
|
|
2241
|
+
# verify the required parameter 'page_attribute_update_request' is set
|
|
2242
|
+
if @api_client.config.client_side_validation && page_attribute_update_request.nil?
|
|
2243
|
+
fail ArgumentError, "Missing the required parameter 'page_attribute_update_request' when calling SfvbApi.put_sfvb_page_attributes"
|
|
2244
|
+
end
|
|
2245
|
+
# resource path
|
|
2246
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2247
|
+
|
|
2248
|
+
# query parameters
|
|
2249
|
+
query_params = opts[:query_params] || {}
|
|
2250
|
+
query_params[:'path'] = path
|
|
2251
|
+
|
|
2252
|
+
# header parameters
|
|
2253
|
+
header_params = opts[:header_params] || {}
|
|
2254
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2255
|
+
# HTTP header 'Accept' (if needed)
|
|
2256
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2257
|
+
# HTTP header 'Content-Type'
|
|
2258
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2259
|
+
if !content_type.nil?
|
|
2260
|
+
header_params['Content-Type'] = content_type
|
|
2261
|
+
end
|
|
2262
|
+
|
|
2263
|
+
# form parameters
|
|
2264
|
+
form_params = opts[:form_params] || {}
|
|
2265
|
+
|
|
2266
|
+
# http body (model)
|
|
2267
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_attribute_update_request)
|
|
2268
|
+
|
|
2269
|
+
# return_type
|
|
2270
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
2271
|
+
|
|
2272
|
+
# auth_names
|
|
2273
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2274
|
+
|
|
2275
|
+
new_options = opts.merge(
|
|
2276
|
+
:operation => :"SfvbApi.put_sfvb_page_attributes",
|
|
2277
|
+
:header_params => header_params,
|
|
2278
|
+
:query_params => query_params,
|
|
2279
|
+
:form_params => form_params,
|
|
2280
|
+
:body => post_body,
|
|
2281
|
+
:auth_names => auth_names,
|
|
2282
|
+
:return_type => return_type
|
|
2283
|
+
)
|
|
2284
|
+
|
|
2285
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2286
|
+
if @api_client.config.debugging
|
|
2287
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_page_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2288
|
+
end
|
|
2289
|
+
return data, status_code, headers
|
|
2290
|
+
end
|
|
2291
|
+
|
|
2292
|
+
# Attach an image to a page
|
|
2293
|
+
# Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
2294
|
+
# @param storefront_oid [Integer]
|
|
2295
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
2296
|
+
# @param page_multimedia_request [SfvbPageMultimediaRequest] Image to attach
|
|
2297
|
+
# @param [Hash] opts the optional parameters
|
|
2298
|
+
# @return [SfvbPageResponse]
|
|
2299
|
+
def put_sfvb_page_multimedia(storefront_oid, path, page_multimedia_request, opts = {})
|
|
2300
|
+
data, _status_code, _headers = put_sfvb_page_multimedia_with_http_info(storefront_oid, path, page_multimedia_request, opts)
|
|
2301
|
+
data
|
|
2302
|
+
end
|
|
2303
|
+
|
|
2304
|
+
# Attach an image to a page
|
|
2305
|
+
# Upload the image with files/upload to the page path followed by a filename first, then name that filename here as either the default image or an image code. The default image is what a pageimage element with no pageImageCode renders, and what a subgroup tile shows. Replaces whatever that slot held. Always needs sfvb_publish.
|
|
2306
|
+
# @param storefront_oid [Integer]
|
|
2307
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
2308
|
+
# @param page_multimedia_request [SfvbPageMultimediaRequest] Image to attach
|
|
2309
|
+
# @param [Hash] opts the optional parameters
|
|
2310
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
2311
|
+
def put_sfvb_page_multimedia_with_http_info(storefront_oid, path, page_multimedia_request, opts = {})
|
|
2312
|
+
if @api_client.config.debugging
|
|
2313
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_page_multimedia ...'
|
|
2314
|
+
end
|
|
2315
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2316
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2317
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_page_multimedia"
|
|
2318
|
+
end
|
|
2319
|
+
# verify the required parameter 'path' is set
|
|
2320
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
2321
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.put_sfvb_page_multimedia"
|
|
2322
|
+
end
|
|
2323
|
+
# verify the required parameter 'page_multimedia_request' is set
|
|
2324
|
+
if @api_client.config.client_side_validation && page_multimedia_request.nil?
|
|
2325
|
+
fail ArgumentError, "Missing the required parameter 'page_multimedia_request' when calling SfvbApi.put_sfvb_page_multimedia"
|
|
2326
|
+
end
|
|
2327
|
+
# resource path
|
|
2328
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2329
|
+
|
|
2330
|
+
# query parameters
|
|
2331
|
+
query_params = opts[:query_params] || {}
|
|
2332
|
+
query_params[:'path'] = path
|
|
2333
|
+
|
|
2334
|
+
# header parameters
|
|
2335
|
+
header_params = opts[:header_params] || {}
|
|
2336
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2337
|
+
# HTTP header 'Accept' (if needed)
|
|
2338
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2339
|
+
# HTTP header 'Content-Type'
|
|
2340
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2341
|
+
if !content_type.nil?
|
|
2342
|
+
header_params['Content-Type'] = content_type
|
|
2343
|
+
end
|
|
2344
|
+
|
|
2345
|
+
# form parameters
|
|
2346
|
+
form_params = opts[:form_params] || {}
|
|
2347
|
+
|
|
2348
|
+
# http body (model)
|
|
2349
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_multimedia_request)
|
|
2350
|
+
|
|
2351
|
+
# return_type
|
|
2352
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
2353
|
+
|
|
2354
|
+
# auth_names
|
|
2355
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2356
|
+
|
|
2357
|
+
new_options = opts.merge(
|
|
2358
|
+
:operation => :"SfvbApi.put_sfvb_page_multimedia",
|
|
2359
|
+
:header_params => header_params,
|
|
2360
|
+
:query_params => query_params,
|
|
2361
|
+
:form_params => form_params,
|
|
2362
|
+
:body => post_body,
|
|
2363
|
+
:auth_names => auth_names,
|
|
2364
|
+
:return_type => return_type
|
|
2365
|
+
)
|
|
2366
|
+
|
|
2367
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2368
|
+
if @api_client.config.debugging
|
|
2369
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_page_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2370
|
+
end
|
|
2371
|
+
return data, status_code, headers
|
|
2372
|
+
end
|
|
2373
|
+
|
|
1992
2374
|
# Push containers into a preview session
|
|
1993
2375
|
# Stores compiled containers against a session created by createSfvbPreviewSession. Replaces whatever the session held. The session must exist - this does not create one, so a deleted, expired or never issued id is a 404 rather than a new session. Nothing durable is written. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1994
2376
|
# @param storefront_oid [Integer]
|
|
@@ -2073,6 +2455,87 @@ module UltracartClient
|
|
|
2073
2455
|
return data, status_code, headers
|
|
2074
2456
|
end
|
|
2075
2457
|
|
|
2458
|
+
# Change a theme's colors, fonts and settings
|
|
2459
|
+
# A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
2460
|
+
# @param storefront_oid [Integer]
|
|
2461
|
+
# @param theme_oid [Integer]
|
|
2462
|
+
# @param attribute_update_request [SfvbThemeAttributeUpdateRequest] Slots to change
|
|
2463
|
+
# @param [Hash] opts the optional parameters
|
|
2464
|
+
# @return [SfvbThemeAttributesResponse]
|
|
2465
|
+
def put_sfvb_theme_attributes(storefront_oid, theme_oid, attribute_update_request, opts = {})
|
|
2466
|
+
data, _status_code, _headers = put_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, attribute_update_request, opts)
|
|
2467
|
+
data
|
|
2468
|
+
end
|
|
2469
|
+
|
|
2470
|
+
# Change a theme's colors, fonts and settings
|
|
2471
|
+
# A partial update. Only the slots you name are changed and every other slot on the theme keeps its value, so there is no need to send the whole set back to change one color. Send a whole palette in one call rather than one call per color - they are applied together, so the storefront never renders half of a change. Needs sfvb_publish when the theme is the one serving live traffic, because a color is referenced by name from every template that uses it and one write repaints the whole storefront at once. On a dormant theme sfvb_write is enough, which is what makes duplicate-then-restyle work.
|
|
2472
|
+
# @param storefront_oid [Integer]
|
|
2473
|
+
# @param theme_oid [Integer]
|
|
2474
|
+
# @param attribute_update_request [SfvbThemeAttributeUpdateRequest] Slots to change
|
|
2475
|
+
# @param [Hash] opts the optional parameters
|
|
2476
|
+
# @return [Array<(SfvbThemeAttributesResponse, Integer, Hash)>] SfvbThemeAttributesResponse data, response status code and response headers
|
|
2477
|
+
def put_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, attribute_update_request, opts = {})
|
|
2478
|
+
if @api_client.config.debugging
|
|
2479
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_theme_attributes ...'
|
|
2480
|
+
end
|
|
2481
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2482
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2483
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_theme_attributes"
|
|
2484
|
+
end
|
|
2485
|
+
# verify the required parameter 'theme_oid' is set
|
|
2486
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
2487
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.put_sfvb_theme_attributes"
|
|
2488
|
+
end
|
|
2489
|
+
# verify the required parameter 'attribute_update_request' is set
|
|
2490
|
+
if @api_client.config.client_side_validation && attribute_update_request.nil?
|
|
2491
|
+
fail ArgumentError, "Missing the required parameter 'attribute_update_request' when calling SfvbApi.put_sfvb_theme_attributes"
|
|
2492
|
+
end
|
|
2493
|
+
# resource path
|
|
2494
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'theme_oid' + '}', CGI.escape(theme_oid.to_s))
|
|
2495
|
+
|
|
2496
|
+
# query parameters
|
|
2497
|
+
query_params = opts[:query_params] || {}
|
|
2498
|
+
|
|
2499
|
+
# header parameters
|
|
2500
|
+
header_params = opts[:header_params] || {}
|
|
2501
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2502
|
+
# HTTP header 'Accept' (if needed)
|
|
2503
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2504
|
+
# HTTP header 'Content-Type'
|
|
2505
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2506
|
+
if !content_type.nil?
|
|
2507
|
+
header_params['Content-Type'] = content_type
|
|
2508
|
+
end
|
|
2509
|
+
|
|
2510
|
+
# form parameters
|
|
2511
|
+
form_params = opts[:form_params] || {}
|
|
2512
|
+
|
|
2513
|
+
# http body (model)
|
|
2514
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(attribute_update_request)
|
|
2515
|
+
|
|
2516
|
+
# return_type
|
|
2517
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeAttributesResponse'
|
|
2518
|
+
|
|
2519
|
+
# auth_names
|
|
2520
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2521
|
+
|
|
2522
|
+
new_options = opts.merge(
|
|
2523
|
+
:operation => :"SfvbApi.put_sfvb_theme_attributes",
|
|
2524
|
+
:header_params => header_params,
|
|
2525
|
+
:query_params => query_params,
|
|
2526
|
+
:form_params => form_params,
|
|
2527
|
+
:body => post_body,
|
|
2528
|
+
:auth_names => auth_names,
|
|
2529
|
+
:return_type => return_type
|
|
2530
|
+
)
|
|
2531
|
+
|
|
2532
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2533
|
+
if @api_client.config.debugging
|
|
2534
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2535
|
+
end
|
|
2536
|
+
return data, status_code, headers
|
|
2537
|
+
end
|
|
2538
|
+
|
|
2076
2539
|
# Render a CJSON node to HTML
|
|
2077
2540
|
# Renders one node in the context of a theme and a page. Unlike compile this is stateful. Rendering resolves merchant data, so an element bound to an item renders wrongly, and silently, without a context item id. One node per call, so a node that fails to render fails on its own rather than taking a batch with it, and a failure says why.
|
|
2078
2541
|
# @param storefront_oid [Integer]
|