ultracart_api 4.1.151 → 4.1.152
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 +11 -2
- data/docs/SfvbApi.md +111 -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 +151 -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 +6 -0
- metadata +14 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0ea0de2841710ce3dec7e18831851afe0ed6050c7032c7fb438545e70dfd728
|
|
4
|
+
data.tar.gz: fdd7b997d12a5ad7e6e554fba251212dc8385dc0f33ab34d8994613dd8edb224
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07e8aa7717a139f16a11934a5935d4c373fc14ad444ceb8ee9d239aec4ba0b14e60a5144027001c41db199316ac082ffc0c8228672050bd47efb8d1ee3777bd2
|
|
7
|
+
data.tar.gz: 36700814e5460576a8233647604a6a7fcfa744079b364b81ad0ef0785eef69183fcf3db282a7ada0a060baf0ae1b165cc287e938fac601d24c85a6a788777225
|
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.
|
|
10
|
+
- Package version: 4.1.152
|
|
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.
|
|
19
|
+
gem 'ultracart_api', '4.1.152'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -487,6 +487,7 @@ Class | Method | HTTP request | Description
|
|
|
487
487
|
*UltracartClient::SfvbApi* | [**get_sfvb_library_entry**](docs/SfvbApi.md#get_sfvb_library_entry) | **GET** /sfvb/storefronts/{storefront_oid}/library/{library_oid} | Read one library entry including its CJSON
|
|
488
488
|
*UltracartClient::SfvbApi* | [**get_sfvb_preview_url**](docs/SfvbApi.md#get_sfvb_preview_url) | **GET** /sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id}/url | URL that renders a preview session
|
|
489
489
|
*UltracartClient::SfvbApi* | [**get_sfvb_theme**](docs/SfvbApi.md#get_sfvb_theme) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid} | Get a theme
|
|
490
|
+
*UltracartClient::SfvbApi* | [**get_sfvb_theme_attributes**](docs/SfvbApi.md#get_sfvb_theme_attributes) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes | Read a theme's colors, fonts and settings
|
|
490
491
|
*UltracartClient::SfvbApi* | [**get_sfvb_theme_job**](docs/SfvbApi.md#get_sfvb_theme_job) | **GET** /sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id} | Status of an asynchronous theme job
|
|
491
492
|
*UltracartClient::SfvbApi* | [**get_sfvb_version**](docs/SfvbApi.md#get_sfvb_version) | **GET** /sfvb/version | Compiler version for this merchant
|
|
492
493
|
*UltracartClient::SfvbApi* | [**get_sfvb_whoami**](docs/SfvbApi.md#get_sfvb_whoami) | **GET** /sfvb/whoami | Who this token is
|
|
@@ -501,6 +502,7 @@ Class | Method | HTTP request | Description
|
|
|
501
502
|
*UltracartClient::SfvbApi* | [**put_sfvb_container**](docs/SfvbApi.md#put_sfvb_container) | **PUT** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id} | Write a container stored outside the file system
|
|
502
503
|
*UltracartClient::SfvbApi* | [**put_sfvb_file_content**](docs/SfvbApi.md#put_sfvb_file_content) | **PUT** /sfvb/storefronts/{storefront_oid}/files/content | Write a storefront file
|
|
503
504
|
*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
|
|
505
|
+
*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
|
|
504
506
|
*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
|
|
505
507
|
*UltracartClient::SfvbApi* | [**reserve_sfvb_widget_ids**](docs/SfvbApi.md#reserve_sfvb_widget_ids) | **POST** /sfvb/storefronts/{storefront_oid}/widget_ids | Reserve a block of widget ids
|
|
506
508
|
*UltracartClient::SfvbApi* | [**revert_sfvb_container**](docs/SfvbApi.md#revert_sfvb_container) | **POST** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert | Revert a container stored outside the file system
|
|
@@ -1760,7 +1762,13 @@ Class | Method | HTTP request | Description
|
|
|
1760
1762
|
- [UltracartClient::SfvbStorefront](docs/SfvbStorefront.md)
|
|
1761
1763
|
- [UltracartClient::SfvbStorefrontsResponse](docs/SfvbStorefrontsResponse.md)
|
|
1762
1764
|
- [UltracartClient::SfvbTheme](docs/SfvbTheme.md)
|
|
1765
|
+
- [UltracartClient::SfvbThemeAttribute](docs/SfvbThemeAttribute.md)
|
|
1766
|
+
- [UltracartClient::SfvbThemeAttributeUpdate](docs/SfvbThemeAttributeUpdate.md)
|
|
1767
|
+
- [UltracartClient::SfvbThemeAttributeUpdateRequest](docs/SfvbThemeAttributeUpdateRequest.md)
|
|
1768
|
+
- [UltracartClient::SfvbThemeAttributesResponse](docs/SfvbThemeAttributesResponse.md)
|
|
1763
1769
|
- [UltracartClient::SfvbThemeDuplicateRequest](docs/SfvbThemeDuplicateRequest.md)
|
|
1770
|
+
- [UltracartClient::SfvbThemeFont](docs/SfvbThemeFont.md)
|
|
1771
|
+
- [UltracartClient::SfvbThemeFontFamily](docs/SfvbThemeFontFamily.md)
|
|
1764
1772
|
- [UltracartClient::SfvbThemeJobResponse](docs/SfvbThemeJobResponse.md)
|
|
1765
1773
|
- [UltracartClient::SfvbThemesResponse](docs/SfvbThemesResponse.md)
|
|
1766
1774
|
- [UltracartClient::SfvbUpsellOffer](docs/SfvbUpsellOffer.md)
|
|
@@ -1934,6 +1942,7 @@ Not every change is committed to every SDK.
|
|
|
1934
1942
|
|
|
1935
1943
|
| Version | Date | Comments |
|
|
1936
1944
|
| --: | :-: | --- |
|
|
1945
|
+
| 4.1.152 | 09/09/2026 | sfvb - internal testing |
|
|
1937
1946
|
| 4.1.151 | 09/04/2026 | conversations - added ai agent capabilities |
|
|
1938
1947
|
| 4.1.150 | 09/04/2026 | conversations - add ai agent capabilities |
|
|
1939
1948
|
| 4.1.149 | 09/04/2026 | conversations - added ai agent capabilities |
|
data/docs/SfvbApi.md
CHANGED
|
@@ -19,6 +19,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
19
19
|
| [**get_sfvb_library_entry**](SfvbApi.md#get_sfvb_library_entry) | **GET** /sfvb/storefronts/{storefront_oid}/library/{library_oid} | Read one library entry including its CJSON |
|
|
20
20
|
| [**get_sfvb_preview_url**](SfvbApi.md#get_sfvb_preview_url) | **GET** /sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id}/url | URL that renders a preview session |
|
|
21
21
|
| [**get_sfvb_theme**](SfvbApi.md#get_sfvb_theme) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid} | Get a theme |
|
|
22
|
+
| [**get_sfvb_theme_attributes**](SfvbApi.md#get_sfvb_theme_attributes) | **GET** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/attributes | Read a theme's colors, fonts and settings |
|
|
22
23
|
| [**get_sfvb_theme_job**](SfvbApi.md#get_sfvb_theme_job) | **GET** /sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id} | Status of an asynchronous theme job |
|
|
23
24
|
| [**get_sfvb_version**](SfvbApi.md#get_sfvb_version) | **GET** /sfvb/version | Compiler version for this merchant |
|
|
24
25
|
| [**get_sfvb_whoami**](SfvbApi.md#get_sfvb_whoami) | **GET** /sfvb/whoami | Who this token is |
|
|
@@ -33,6 +34,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
33
34
|
| [**put_sfvb_container**](SfvbApi.md#put_sfvb_container) | **PUT** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id} | Write a container stored outside the file system |
|
|
34
35
|
| [**put_sfvb_file_content**](SfvbApi.md#put_sfvb_file_content) | **PUT** /sfvb/storefronts/{storefront_oid}/files/content | Write a storefront file |
|
|
35
36
|
| [**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 |
|
|
37
|
+
| [**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 |
|
|
36
38
|
| [**render_sfvb_widgets**](SfvbApi.md#render_sfvb_widgets) | **POST** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/render | Render a CJSON node to HTML |
|
|
37
39
|
| [**reserve_sfvb_widget_ids**](SfvbApi.md#reserve_sfvb_widget_ids) | **POST** /sfvb/storefronts/{storefront_oid}/widget_ids | Reserve a block of widget ids |
|
|
38
40
|
| [**revert_sfvb_container**](SfvbApi.md#revert_sfvb_container) | **POST** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert | Revert a container stored outside the file system |
|
|
@@ -853,6 +855,60 @@ end
|
|
|
853
855
|
- **Accept**: application/json
|
|
854
856
|
|
|
855
857
|
|
|
858
|
+
## get_sfvb_theme_attributes
|
|
859
|
+
|
|
860
|
+
> <SfvbThemeAttributesResponse> get_sfvb_theme_attributes(storefront_oid, theme_oid)
|
|
861
|
+
|
|
862
|
+
Read a theme's colors, fonts and settings
|
|
863
|
+
|
|
864
|
+
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.
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
### Examples
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
(No example for this operation).
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
#### Using the get_sfvb_theme_attributes_with_http_info variant
|
|
874
|
+
|
|
875
|
+
This returns an Array which contains the response data, status code and headers.
|
|
876
|
+
|
|
877
|
+
> <Array(<SfvbThemeAttributesResponse>, Integer, Hash)> get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid)
|
|
878
|
+
|
|
879
|
+
```ruby
|
|
880
|
+
begin
|
|
881
|
+
# Read a theme's colors, fonts and settings
|
|
882
|
+
data, status_code, headers = api_instance.get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid)
|
|
883
|
+
p status_code # => 2xx
|
|
884
|
+
p headers # => { ... }
|
|
885
|
+
p data # => <SfvbThemeAttributesResponse>
|
|
886
|
+
rescue UltracartClient::ApiError => e
|
|
887
|
+
puts "Error when calling SfvbApi->get_sfvb_theme_attributes_with_http_info: #{e}"
|
|
888
|
+
end
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
### Parameters
|
|
892
|
+
|
|
893
|
+
| Name | Type | Description | Notes |
|
|
894
|
+
| ---- | ---- | ----------- | ----- |
|
|
895
|
+
| **storefront_oid** | **Integer** | | |
|
|
896
|
+
| **theme_oid** | **Integer** | | |
|
|
897
|
+
|
|
898
|
+
### Return type
|
|
899
|
+
|
|
900
|
+
[**SfvbThemeAttributesResponse**](SfvbThemeAttributesResponse.md)
|
|
901
|
+
|
|
902
|
+
### Authorization
|
|
903
|
+
|
|
904
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
905
|
+
|
|
906
|
+
### HTTP request headers
|
|
907
|
+
|
|
908
|
+
- **Content-Type**: Not defined
|
|
909
|
+
- **Accept**: application/json
|
|
910
|
+
|
|
911
|
+
|
|
856
912
|
## get_sfvb_theme_job
|
|
857
913
|
|
|
858
914
|
> <SfvbThemeJobResponse> get_sfvb_theme_job(storefront_oid, job_id)
|
|
@@ -1604,6 +1660,61 @@ end
|
|
|
1604
1660
|
- **Accept**: application/json
|
|
1605
1661
|
|
|
1606
1662
|
|
|
1663
|
+
## put_sfvb_theme_attributes
|
|
1664
|
+
|
|
1665
|
+
> <SfvbThemeAttributesResponse> put_sfvb_theme_attributes(storefront_oid, theme_oid, attribute_update_request)
|
|
1666
|
+
|
|
1667
|
+
Change a theme's colors, fonts and settings
|
|
1668
|
+
|
|
1669
|
+
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.
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
### Examples
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
(No example for this operation).
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
#### Using the put_sfvb_theme_attributes_with_http_info variant
|
|
1679
|
+
|
|
1680
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1681
|
+
|
|
1682
|
+
> <Array(<SfvbThemeAttributesResponse>, Integer, Hash)> put_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, attribute_update_request)
|
|
1683
|
+
|
|
1684
|
+
```ruby
|
|
1685
|
+
begin
|
|
1686
|
+
# Change a theme's colors, fonts and settings
|
|
1687
|
+
data, status_code, headers = api_instance.put_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, attribute_update_request)
|
|
1688
|
+
p status_code # => 2xx
|
|
1689
|
+
p headers # => { ... }
|
|
1690
|
+
p data # => <SfvbThemeAttributesResponse>
|
|
1691
|
+
rescue UltracartClient::ApiError => e
|
|
1692
|
+
puts "Error when calling SfvbApi->put_sfvb_theme_attributes_with_http_info: #{e}"
|
|
1693
|
+
end
|
|
1694
|
+
```
|
|
1695
|
+
|
|
1696
|
+
### Parameters
|
|
1697
|
+
|
|
1698
|
+
| Name | Type | Description | Notes |
|
|
1699
|
+
| ---- | ---- | ----------- | ----- |
|
|
1700
|
+
| **storefront_oid** | **Integer** | | |
|
|
1701
|
+
| **theme_oid** | **Integer** | | |
|
|
1702
|
+
| **attribute_update_request** | [**SfvbThemeAttributeUpdateRequest**](SfvbThemeAttributeUpdateRequest.md) | Slots to change | |
|
|
1703
|
+
|
|
1704
|
+
### Return type
|
|
1705
|
+
|
|
1706
|
+
[**SfvbThemeAttributesResponse**](SfvbThemeAttributesResponse.md)
|
|
1707
|
+
|
|
1708
|
+
### Authorization
|
|
1709
|
+
|
|
1710
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
1711
|
+
|
|
1712
|
+
### HTTP request headers
|
|
1713
|
+
|
|
1714
|
+
- **Content-Type**: application/json
|
|
1715
|
+
- **Accept**: application/json
|
|
1716
|
+
|
|
1717
|
+
|
|
1607
1718
|
## render_sfvb_widgets
|
|
1608
1719
|
|
|
1609
1720
|
> <SfvbRenderResponse> render_sfvb_widgets(storefront_oid, theme_oid, render_request)
|
|
@@ -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
|
+
|
|
@@ -1095,6 +1095,76 @@ module UltracartClient
|
|
|
1095
1095
|
return data, status_code, headers
|
|
1096
1096
|
end
|
|
1097
1097
|
|
|
1098
|
+
# Read a theme's colors, fonts and settings
|
|
1099
|
+
# 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.
|
|
1100
|
+
# @param storefront_oid [Integer]
|
|
1101
|
+
# @param theme_oid [Integer]
|
|
1102
|
+
# @param [Hash] opts the optional parameters
|
|
1103
|
+
# @return [SfvbThemeAttributesResponse]
|
|
1104
|
+
def get_sfvb_theme_attributes(storefront_oid, theme_oid, opts = {})
|
|
1105
|
+
data, _status_code, _headers = get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, opts)
|
|
1106
|
+
data
|
|
1107
|
+
end
|
|
1108
|
+
|
|
1109
|
+
# Read a theme's colors, fonts and settings
|
|
1110
|
+
# 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.
|
|
1111
|
+
# @param storefront_oid [Integer]
|
|
1112
|
+
# @param theme_oid [Integer]
|
|
1113
|
+
# @param [Hash] opts the optional parameters
|
|
1114
|
+
# @return [Array<(SfvbThemeAttributesResponse, Integer, Hash)>] SfvbThemeAttributesResponse data, response status code and response headers
|
|
1115
|
+
def get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, opts = {})
|
|
1116
|
+
if @api_client.config.debugging
|
|
1117
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_attributes ...'
|
|
1118
|
+
end
|
|
1119
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1120
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1121
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme_attributes"
|
|
1122
|
+
end
|
|
1123
|
+
# verify the required parameter 'theme_oid' is set
|
|
1124
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
1125
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.get_sfvb_theme_attributes"
|
|
1126
|
+
end
|
|
1127
|
+
# resource path
|
|
1128
|
+
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))
|
|
1129
|
+
|
|
1130
|
+
# query parameters
|
|
1131
|
+
query_params = opts[:query_params] || {}
|
|
1132
|
+
|
|
1133
|
+
# header parameters
|
|
1134
|
+
header_params = opts[:header_params] || {}
|
|
1135
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1136
|
+
# HTTP header 'Accept' (if needed)
|
|
1137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1138
|
+
|
|
1139
|
+
# form parameters
|
|
1140
|
+
form_params = opts[:form_params] || {}
|
|
1141
|
+
|
|
1142
|
+
# http body (model)
|
|
1143
|
+
post_body = opts[:debug_body]
|
|
1144
|
+
|
|
1145
|
+
# return_type
|
|
1146
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeAttributesResponse'
|
|
1147
|
+
|
|
1148
|
+
# auth_names
|
|
1149
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1150
|
+
|
|
1151
|
+
new_options = opts.merge(
|
|
1152
|
+
:operation => :"SfvbApi.get_sfvb_theme_attributes",
|
|
1153
|
+
:header_params => header_params,
|
|
1154
|
+
:query_params => query_params,
|
|
1155
|
+
:form_params => form_params,
|
|
1156
|
+
:body => post_body,
|
|
1157
|
+
:auth_names => auth_names,
|
|
1158
|
+
:return_type => return_type
|
|
1159
|
+
)
|
|
1160
|
+
|
|
1161
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1162
|
+
if @api_client.config.debugging
|
|
1163
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1164
|
+
end
|
|
1165
|
+
return data, status_code, headers
|
|
1166
|
+
end
|
|
1167
|
+
|
|
1098
1168
|
# Status of an asynchronous theme job
|
|
1099
1169
|
# 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
1170
|
# @param storefront_oid [Integer]
|
|
@@ -2073,6 +2143,87 @@ module UltracartClient
|
|
|
2073
2143
|
return data, status_code, headers
|
|
2074
2144
|
end
|
|
2075
2145
|
|
|
2146
|
+
# Change a theme's colors, fonts and settings
|
|
2147
|
+
# 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.
|
|
2148
|
+
# @param storefront_oid [Integer]
|
|
2149
|
+
# @param theme_oid [Integer]
|
|
2150
|
+
# @param attribute_update_request [SfvbThemeAttributeUpdateRequest] Slots to change
|
|
2151
|
+
# @param [Hash] opts the optional parameters
|
|
2152
|
+
# @return [SfvbThemeAttributesResponse]
|
|
2153
|
+
def put_sfvb_theme_attributes(storefront_oid, theme_oid, attribute_update_request, opts = {})
|
|
2154
|
+
data, _status_code, _headers = put_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, attribute_update_request, opts)
|
|
2155
|
+
data
|
|
2156
|
+
end
|
|
2157
|
+
|
|
2158
|
+
# Change a theme's colors, fonts and settings
|
|
2159
|
+
# 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.
|
|
2160
|
+
# @param storefront_oid [Integer]
|
|
2161
|
+
# @param theme_oid [Integer]
|
|
2162
|
+
# @param attribute_update_request [SfvbThemeAttributeUpdateRequest] Slots to change
|
|
2163
|
+
# @param [Hash] opts the optional parameters
|
|
2164
|
+
# @return [Array<(SfvbThemeAttributesResponse, Integer, Hash)>] SfvbThemeAttributesResponse data, response status code and response headers
|
|
2165
|
+
def put_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, attribute_update_request, opts = {})
|
|
2166
|
+
if @api_client.config.debugging
|
|
2167
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_theme_attributes ...'
|
|
2168
|
+
end
|
|
2169
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2170
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2171
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_theme_attributes"
|
|
2172
|
+
end
|
|
2173
|
+
# verify the required parameter 'theme_oid' is set
|
|
2174
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
2175
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.put_sfvb_theme_attributes"
|
|
2176
|
+
end
|
|
2177
|
+
# verify the required parameter 'attribute_update_request' is set
|
|
2178
|
+
if @api_client.config.client_side_validation && attribute_update_request.nil?
|
|
2179
|
+
fail ArgumentError, "Missing the required parameter 'attribute_update_request' when calling SfvbApi.put_sfvb_theme_attributes"
|
|
2180
|
+
end
|
|
2181
|
+
# resource path
|
|
2182
|
+
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))
|
|
2183
|
+
|
|
2184
|
+
# query parameters
|
|
2185
|
+
query_params = opts[:query_params] || {}
|
|
2186
|
+
|
|
2187
|
+
# header parameters
|
|
2188
|
+
header_params = opts[:header_params] || {}
|
|
2189
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2190
|
+
# HTTP header 'Accept' (if needed)
|
|
2191
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2192
|
+
# HTTP header 'Content-Type'
|
|
2193
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2194
|
+
if !content_type.nil?
|
|
2195
|
+
header_params['Content-Type'] = content_type
|
|
2196
|
+
end
|
|
2197
|
+
|
|
2198
|
+
# form parameters
|
|
2199
|
+
form_params = opts[:form_params] || {}
|
|
2200
|
+
|
|
2201
|
+
# http body (model)
|
|
2202
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(attribute_update_request)
|
|
2203
|
+
|
|
2204
|
+
# return_type
|
|
2205
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeAttributesResponse'
|
|
2206
|
+
|
|
2207
|
+
# auth_names
|
|
2208
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2209
|
+
|
|
2210
|
+
new_options = opts.merge(
|
|
2211
|
+
:operation => :"SfvbApi.put_sfvb_theme_attributes",
|
|
2212
|
+
:header_params => header_params,
|
|
2213
|
+
:query_params => query_params,
|
|
2214
|
+
:form_params => form_params,
|
|
2215
|
+
:body => post_body,
|
|
2216
|
+
:auth_names => auth_names,
|
|
2217
|
+
:return_type => return_type
|
|
2218
|
+
)
|
|
2219
|
+
|
|
2220
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2221
|
+
if @api_client.config.debugging
|
|
2222
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2223
|
+
end
|
|
2224
|
+
return data, status_code, headers
|
|
2225
|
+
end
|
|
2226
|
+
|
|
2076
2227
|
# Render a CJSON node to HTML
|
|
2077
2228
|
# 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
2229
|
# @param storefront_oid [Integer]
|