ultracart_api 4.1.173 → 4.1.174
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 +7 -2
- data/docs/SfvbApi.md +57 -1
- data/docs/SfvbTemplateResolveCandidate.md +20 -0
- data/docs/SfvbTemplateResolvePath.md +24 -0
- data/docs/SfvbTemplateResolveResponse.md +30 -0
- data/lib/ultracart_api/api/sfvb_api.rb +76 -2
- data/lib/ultracart_api/models/sfvb_template_resolve_candidate.rb +230 -0
- data/lib/ultracart_api/models/sfvb_template_resolve_path.rb +252 -0
- data/lib/ultracart_api/models/sfvb_template_resolve_response.rb +282 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6744f7bfd2e6e6f44a4483bf87b7b1b8228ae29f1ca7883a3781584423b9e6d7
|
|
4
|
+
data.tar.gz: 3640f3fc644cb45dda4640fe9d924b9411c42deef351cf397512da7a01b31eee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6ffbcca0cf147ebf40b4e2e2cdc4088286b68d122d6d88a7314f97d0722727e656ede9e981276a3263e21600d868255ec2b1c560ff128afc007afda763d988c0
|
|
7
|
+
data.tar.gz: 945b8d5bcfd7fa80e6cfd8458412065338caa3ad9a00ea5717ab2452217684642f326cb21e0f199878fb8621cb8d6a33aecf9a76c0f3a7e1fd5860e6baf5305e
|
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.174
|
|
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.174'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -553,6 +553,7 @@ Class | Method | HTTP request | Description
|
|
|
553
553
|
*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
554
|
*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
|
|
555
555
|
*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
|
|
556
|
+
*UltracartClient::SfvbApi* | [**resolve_sfvb_template**](docs/SfvbApi.md#resolve_sfvb_template) | **GET** /sfvb/storefronts/{storefront_oid}/templates/resolve | Resolve a template name to the file a page renders
|
|
556
557
|
*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
|
|
557
558
|
*UltracartClient::SfvbApi* | [**revert_sfvb_file**](docs/SfvbApi.md#revert_sfvb_file) | **POST** /sfvb/storefronts/{storefront_oid}/files/revert | Revert a storefront file to an earlier version
|
|
558
559
|
*UltracartClient::SfvbApi* | [**search_sfvb_files**](docs/SfvbApi.md#search_sfvb_files) | **POST** /sfvb/storefronts/{storefront_oid}/files/search | Search storefront files
|
|
@@ -1871,6 +1872,9 @@ Class | Method | HTTP request | Description
|
|
|
1871
1872
|
- [UltracartClient::SfvbStorefront](docs/SfvbStorefront.md)
|
|
1872
1873
|
- [UltracartClient::SfvbStorefrontsResponse](docs/SfvbStorefrontsResponse.md)
|
|
1873
1874
|
- [UltracartClient::SfvbTemplate](docs/SfvbTemplate.md)
|
|
1875
|
+
- [UltracartClient::SfvbTemplateResolveCandidate](docs/SfvbTemplateResolveCandidate.md)
|
|
1876
|
+
- [UltracartClient::SfvbTemplateResolvePath](docs/SfvbTemplateResolvePath.md)
|
|
1877
|
+
- [UltracartClient::SfvbTemplateResolveResponse](docs/SfvbTemplateResolveResponse.md)
|
|
1874
1878
|
- [UltracartClient::SfvbTemplatesResponse](docs/SfvbTemplatesResponse.md)
|
|
1875
1879
|
- [UltracartClient::SfvbTheme](docs/SfvbTheme.md)
|
|
1876
1880
|
- [UltracartClient::SfvbThemeAttribute](docs/SfvbThemeAttribute.md)
|
|
@@ -2066,6 +2070,7 @@ Not every change is committed to every SDK.
|
|
|
2066
2070
|
|
|
2067
2071
|
| Version | Date | Comments |
|
|
2068
2072
|
| --: | :-: | --- |
|
|
2073
|
+
| 4.1.174 | 09/25/2026 | sfvb internal testing |
|
|
2069
2074
|
| 4.1.173 | 09/24/2026 | storefront communications flow re-entry setting |
|
|
2070
2075
|
| 4.1.172 | 09/24/2026 | storefront communications flow re-entry setting |
|
|
2071
2076
|
| 4.1.171 | 09/23/2026 | sfvb internal testing |
|
data/docs/SfvbApi.md
CHANGED
|
@@ -85,6 +85,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
85
85
|
| [**remove_sfvb_page_items**](SfvbApi.md#remove_sfvb_page_items) | **POST** /sfvb/storefronts/{storefront_oid}/pages/items/remove | Take items off a page |
|
|
86
86
|
| [**render_sfvb_widgets**](SfvbApi.md#render_sfvb_widgets) | **POST** /sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/render | Render a CJSON node to HTML |
|
|
87
87
|
| [**reserve_sfvb_widget_ids**](SfvbApi.md#reserve_sfvb_widget_ids) | **POST** /sfvb/storefronts/{storefront_oid}/widget_ids | Reserve a block of widget ids |
|
|
88
|
+
| [**resolve_sfvb_template**](SfvbApi.md#resolve_sfvb_template) | **GET** /sfvb/storefronts/{storefront_oid}/templates/resolve | Resolve a template name to the file a page renders |
|
|
88
89
|
| [**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 |
|
|
89
90
|
| [**revert_sfvb_file**](SfvbApi.md#revert_sfvb_file) | **POST** /sfvb/storefronts/{storefront_oid}/files/revert | Revert a storefront file to an earlier version |
|
|
90
91
|
| [**search_sfvb_files**](SfvbApi.md#search_sfvb_files) | **POST** /sfvb/storefronts/{storefront_oid}/files/search | Search storefront files |
|
|
@@ -1086,7 +1087,7 @@ end
|
|
|
1086
1087
|
|
|
1087
1088
|
End an experiment
|
|
1088
1089
|
|
|
1089
|
-
Ends a running experiment. With winner_variation_number the winner gets
|
|
1090
|
+
Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment's winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment's id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1090
1091
|
|
|
1091
1092
|
|
|
1092
1093
|
### Examples
|
|
@@ -4529,6 +4530,61 @@ end
|
|
|
4529
4530
|
- **Accept**: application/json
|
|
4530
4531
|
|
|
4531
4532
|
|
|
4533
|
+
## resolve_sfvb_template
|
|
4534
|
+
|
|
4535
|
+
> <SfvbTemplateResolveResponse> resolve_sfvb_template(storefront_oid, name, opts)
|
|
4536
|
+
|
|
4537
|
+
Resolve a template name to the file a page renders
|
|
4538
|
+
|
|
4539
|
+
A page stores only its template's file name. This runs the storefront's own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme's resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
4540
|
+
|
|
4541
|
+
|
|
4542
|
+
### Examples
|
|
4543
|
+
|
|
4544
|
+
|
|
4545
|
+
(No example for this operation).
|
|
4546
|
+
|
|
4547
|
+
|
|
4548
|
+
#### Using the resolve_sfvb_template_with_http_info variant
|
|
4549
|
+
|
|
4550
|
+
This returns an Array which contains the response data, status code and headers.
|
|
4551
|
+
|
|
4552
|
+
> <Array(<SfvbTemplateResolveResponse>, Integer, Hash)> resolve_sfvb_template_with_http_info(storefront_oid, name, opts)
|
|
4553
|
+
|
|
4554
|
+
```ruby
|
|
4555
|
+
begin
|
|
4556
|
+
# Resolve a template name to the file a page renders
|
|
4557
|
+
data, status_code, headers = api_instance.resolve_sfvb_template_with_http_info(storefront_oid, name, opts)
|
|
4558
|
+
p status_code # => 2xx
|
|
4559
|
+
p headers # => { ... }
|
|
4560
|
+
p data # => <SfvbTemplateResolveResponse>
|
|
4561
|
+
rescue UltracartClient::ApiError => e
|
|
4562
|
+
puts "Error when calling SfvbApi->resolve_sfvb_template_with_http_info: #{e}"
|
|
4563
|
+
end
|
|
4564
|
+
```
|
|
4565
|
+
|
|
4566
|
+
### Parameters
|
|
4567
|
+
|
|
4568
|
+
| Name | Type | Description | Notes |
|
|
4569
|
+
| ---- | ---- | ----------- | ----- |
|
|
4570
|
+
| **storefront_oid** | **Integer** | | |
|
|
4571
|
+
| **name** | **String** | The template file name, such as catalog.vm | |
|
|
4572
|
+
| **theme_oid** | **Integer** | Resolve in this theme instead of the active theme | [optional] |
|
|
4573
|
+
|
|
4574
|
+
### Return type
|
|
4575
|
+
|
|
4576
|
+
[**SfvbTemplateResolveResponse**](SfvbTemplateResolveResponse.md)
|
|
4577
|
+
|
|
4578
|
+
### Authorization
|
|
4579
|
+
|
|
4580
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
4581
|
+
|
|
4582
|
+
### HTTP request headers
|
|
4583
|
+
|
|
4584
|
+
- **Content-Type**: Not defined
|
|
4585
|
+
- **Accept**: application/json
|
|
4586
|
+
|
|
4587
|
+
|
|
4532
4588
|
## revert_sfvb_container
|
|
4533
4589
|
|
|
4534
4590
|
> <SfvbContainerResponse> revert_sfvb_container(storefront_oid, owner_type, owner_object_id, if_match, container_revert_request, opts)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::SfvbTemplateResolveCandidate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **skipped** | **String** | Why the storefront never uses this file for a page, or null. snippets means it sits in the resource path's own snippets folder. | [optional] |
|
|
8
|
+
| **theme_relative_path** | **String** | Where the file sits inside the theme. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::SfvbTemplateResolveCandidate.new(
|
|
16
|
+
skipped: null,
|
|
17
|
+
theme_relative_path: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UltracartClient::SfvbTemplateResolvePath
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **candidates** | [**Array<SfvbTemplateResolveCandidate>**](SfvbTemplateResolveCandidate.md) | Every file of that name below this path, in the order the storefront searches. | [optional] |
|
|
8
|
+
| **directory_found** | **Boolean** | False when the theme has no such directory, so the storefront skips this path. | [optional] |
|
|
9
|
+
| **match** | **String** | The candidate this path supplies, relative to the theme root, or null. It is the first candidate that is not skipped. | [optional] |
|
|
10
|
+
| **resource_path** | **String** | The resource path, relative to the theme root. / is the theme root itself. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ultracart_api'
|
|
16
|
+
|
|
17
|
+
instance = UltracartClient::SfvbTemplateResolvePath.new(
|
|
18
|
+
candidates: null,
|
|
19
|
+
directory_found: null,
|
|
20
|
+
match: null,
|
|
21
|
+
resource_path: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# UltracartClient::SfvbTemplateResolveResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **exists** | **Boolean** | Whether resolved_path is a file. False means a page naming this template cannot render. | [optional] |
|
|
8
|
+
| **fallback** | **Boolean** | True when no resource path held the name, so the storefront fell back to the name at the theme root. | [optional] |
|
|
9
|
+
| **name** | **String** | The template file name that was resolved, as a page's group_template or item_template holds it. | [optional] |
|
|
10
|
+
| **resolved_path** | **String** | The file a page naming this template renders, relative to theme_path. This is the storefront's own answer. | [optional] |
|
|
11
|
+
| **resource_paths** | [**Array<SfvbTemplateResolvePath>**](SfvbTemplateResolvePath.md) | The theme's resource paths in search order, each with the files of that name found below it. The first path with a match wins, which is how a theme copy overrides a shared core copy. | [optional] |
|
|
12
|
+
| **theme_oid** | **Integer** | The theme the name was resolved in. | [optional] |
|
|
13
|
+
| **theme_path** | **String** | The theme's path in the file manager, such as /themes/Elements/. | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'ultracart_api'
|
|
19
|
+
|
|
20
|
+
instance = UltracartClient::SfvbTemplateResolveResponse.new(
|
|
21
|
+
exists: null,
|
|
22
|
+
fallback: null,
|
|
23
|
+
name: null,
|
|
24
|
+
resolved_path: null,
|
|
25
|
+
resource_paths: null,
|
|
26
|
+
theme_oid: null,
|
|
27
|
+
theme_path: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -1355,7 +1355,7 @@ module UltracartClient
|
|
|
1355
1355
|
end
|
|
1356
1356
|
|
|
1357
1357
|
# End an experiment
|
|
1358
|
-
# Ends a running experiment. With winner_variation_number the winner gets
|
|
1358
|
+
# Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment's winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment's id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1359
1359
|
# @param storefront_oid [Integer]
|
|
1360
1360
|
# @param experiment_oid [Integer]
|
|
1361
1361
|
# @param [Hash] opts the optional parameters
|
|
@@ -1367,7 +1367,7 @@ module UltracartClient
|
|
|
1367
1367
|
end
|
|
1368
1368
|
|
|
1369
1369
|
# End an experiment
|
|
1370
|
-
# Ends a running experiment. With winner_variation_number the winner gets
|
|
1370
|
+
# Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment's winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment's id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
|
|
1371
1371
|
# @param storefront_oid [Integer]
|
|
1372
1372
|
# @param experiment_oid [Integer]
|
|
1373
1373
|
# @param [Hash] opts the optional parameters
|
|
@@ -6033,6 +6033,80 @@ module UltracartClient
|
|
|
6033
6033
|
return data, status_code, headers
|
|
6034
6034
|
end
|
|
6035
6035
|
|
|
6036
|
+
# Resolve a template name to the file a page renders
|
|
6037
|
+
# A page stores only its template's file name. This runs the storefront's own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme's resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
6038
|
+
# @param storefront_oid [Integer]
|
|
6039
|
+
# @param name [String] The template file name, such as catalog.vm
|
|
6040
|
+
# @param [Hash] opts the optional parameters
|
|
6041
|
+
# @option opts [Integer] :theme_oid Resolve in this theme instead of the active theme
|
|
6042
|
+
# @return [SfvbTemplateResolveResponse]
|
|
6043
|
+
def resolve_sfvb_template(storefront_oid, name, opts = {})
|
|
6044
|
+
data, _status_code, _headers = resolve_sfvb_template_with_http_info(storefront_oid, name, opts)
|
|
6045
|
+
data
|
|
6046
|
+
end
|
|
6047
|
+
|
|
6048
|
+
# Resolve a template name to the file a page renders
|
|
6049
|
+
# A page stores only its template's file name. This runs the storefront's own template search for that name and returns the file a page naming it renders, relative to the theme. It also lists the theme's resource paths in search order with every file of that name below each, so a theme copy overriding a shared core copy, or a copy in a snippets folder that is never used, is visible. exists is false when a page naming the template cannot render.
|
|
6050
|
+
# @param storefront_oid [Integer]
|
|
6051
|
+
# @param name [String] The template file name, such as catalog.vm
|
|
6052
|
+
# @param [Hash] opts the optional parameters
|
|
6053
|
+
# @option opts [Integer] :theme_oid Resolve in this theme instead of the active theme
|
|
6054
|
+
# @return [Array<(SfvbTemplateResolveResponse, Integer, Hash)>] SfvbTemplateResolveResponse data, response status code and response headers
|
|
6055
|
+
def resolve_sfvb_template_with_http_info(storefront_oid, name, opts = {})
|
|
6056
|
+
if @api_client.config.debugging
|
|
6057
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.resolve_sfvb_template ...'
|
|
6058
|
+
end
|
|
6059
|
+
# verify the required parameter 'storefront_oid' is set
|
|
6060
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
6061
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.resolve_sfvb_template"
|
|
6062
|
+
end
|
|
6063
|
+
# verify the required parameter 'name' is set
|
|
6064
|
+
if @api_client.config.client_side_validation && name.nil?
|
|
6065
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling SfvbApi.resolve_sfvb_template"
|
|
6066
|
+
end
|
|
6067
|
+
# resource path
|
|
6068
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/templates/resolve'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
6069
|
+
|
|
6070
|
+
# query parameters
|
|
6071
|
+
query_params = opts[:query_params] || {}
|
|
6072
|
+
query_params[:'name'] = name
|
|
6073
|
+
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
6074
|
+
|
|
6075
|
+
# header parameters
|
|
6076
|
+
header_params = opts[:header_params] || {}
|
|
6077
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
6078
|
+
# HTTP header 'Accept' (if needed)
|
|
6079
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
6080
|
+
|
|
6081
|
+
# form parameters
|
|
6082
|
+
form_params = opts[:form_params] || {}
|
|
6083
|
+
|
|
6084
|
+
# http body (model)
|
|
6085
|
+
post_body = opts[:debug_body]
|
|
6086
|
+
|
|
6087
|
+
# return_type
|
|
6088
|
+
return_type = opts[:debug_return_type] || 'SfvbTemplateResolveResponse'
|
|
6089
|
+
|
|
6090
|
+
# auth_names
|
|
6091
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
6092
|
+
|
|
6093
|
+
new_options = opts.merge(
|
|
6094
|
+
:operation => :"SfvbApi.resolve_sfvb_template",
|
|
6095
|
+
:header_params => header_params,
|
|
6096
|
+
:query_params => query_params,
|
|
6097
|
+
:form_params => form_params,
|
|
6098
|
+
:body => post_body,
|
|
6099
|
+
:auth_names => auth_names,
|
|
6100
|
+
:return_type => return_type
|
|
6101
|
+
)
|
|
6102
|
+
|
|
6103
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
6104
|
+
if @api_client.config.debugging
|
|
6105
|
+
@api_client.config.logger.debug "API called: SfvbApi#resolve_sfvb_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
6106
|
+
end
|
|
6107
|
+
return data, status_code, headers
|
|
6108
|
+
end
|
|
6109
|
+
|
|
6036
6110
|
# Revert a container stored outside the file system
|
|
6037
6111
|
# The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does. owner_type also says how owner_object_id is read, so a version written by oid can be reverted by merchant item id and the other way round.
|
|
6038
6112
|
# @param storefront_oid [Integer]
|
|
@@ -0,0 +1,230 @@
|
|
|
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 SfvbTemplateResolveCandidate
|
|
18
|
+
# Why the storefront never uses this file for a page, or null. snippets means it sits in the resource path's own snippets folder.
|
|
19
|
+
attr_accessor :skipped
|
|
20
|
+
|
|
21
|
+
# Where the file sits inside the theme.
|
|
22
|
+
attr_accessor :theme_relative_path
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'skipped' => :'skipped',
|
|
28
|
+
:'theme_relative_path' => :'theme_relative_path'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'skipped' => :'String',
|
|
41
|
+
:'theme_relative_path' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTemplateResolveCandidate` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTemplateResolveCandidate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'skipped')
|
|
67
|
+
self.skipped = attributes[:'skipped']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'theme_relative_path')
|
|
71
|
+
self.theme_relative_path = attributes[:'theme_relative_path']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
skipped == o.skipped &&
|
|
94
|
+
theme_relative_path == o.theme_relative_path
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[skipped, theme_relative_path].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
new.build_from_hash(attributes)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
124
|
+
self.send("#{key}=", nil)
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
self
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = UltracartClient.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
@@ -0,0 +1,252 @@
|
|
|
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 SfvbTemplateResolvePath
|
|
18
|
+
# Every file of that name below this path, in the order the storefront searches.
|
|
19
|
+
attr_accessor :candidates
|
|
20
|
+
|
|
21
|
+
# False when the theme has no such directory, so the storefront skips this path.
|
|
22
|
+
attr_accessor :directory_found
|
|
23
|
+
|
|
24
|
+
# The candidate this path supplies, relative to the theme root, or null. It is the first candidate that is not skipped.
|
|
25
|
+
attr_accessor :match
|
|
26
|
+
|
|
27
|
+
# The resource path, relative to the theme root. / is the theme root itself.
|
|
28
|
+
attr_accessor :resource_path
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'candidates' => :'candidates',
|
|
34
|
+
:'directory_found' => :'directory_found',
|
|
35
|
+
:'match' => :'match',
|
|
36
|
+
:'resource_path' => :'resource_path'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'candidates' => :'Array<SfvbTemplateResolveCandidate>',
|
|
49
|
+
:'directory_found' => :'Boolean',
|
|
50
|
+
:'match' => :'String',
|
|
51
|
+
:'resource_path' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTemplateResolvePath` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTemplateResolvePath`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'candidates')
|
|
77
|
+
if (value = attributes[:'candidates']).is_a?(Array)
|
|
78
|
+
self.candidates = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'directory_found')
|
|
83
|
+
self.directory_found = attributes[:'directory_found']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'match')
|
|
87
|
+
self.match = attributes[:'match']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'resource_path')
|
|
91
|
+
self.resource_path = attributes[:'resource_path']
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
96
|
+
# @return Array for valid properties with the reasons
|
|
97
|
+
def list_invalid_properties
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Checks equality by comparing each attribute.
|
|
109
|
+
# @param [Object] Object to be compared
|
|
110
|
+
def ==(o)
|
|
111
|
+
return true if self.equal?(o)
|
|
112
|
+
self.class == o.class &&
|
|
113
|
+
candidates == o.candidates &&
|
|
114
|
+
directory_found == o.directory_found &&
|
|
115
|
+
match == o.match &&
|
|
116
|
+
resource_path == o.resource_path
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# @see the `==` method
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def eql?(o)
|
|
122
|
+
self == o
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Calculates hash code according to all attributes.
|
|
126
|
+
# @return [Integer] Hash code
|
|
127
|
+
def hash
|
|
128
|
+
[candidates, directory_found, match, resource_path].hash
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Builds the object from hash
|
|
132
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
133
|
+
# @return [Object] Returns the model itself
|
|
134
|
+
def self.build_from_hash(attributes)
|
|
135
|
+
new.build_from_hash(attributes)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Builds the object from hash
|
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
140
|
+
# @return [Object] Returns the model itself
|
|
141
|
+
def build_from_hash(attributes)
|
|
142
|
+
return nil unless attributes.is_a?(Hash)
|
|
143
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
144
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
145
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
146
|
+
self.send("#{key}=", nil)
|
|
147
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
148
|
+
# check to ensure the input is an array given that the attribute
|
|
149
|
+
# is documented as an array but the input is not
|
|
150
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
151
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
152
|
+
end
|
|
153
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
154
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
self
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Deserializes the data based on type
|
|
162
|
+
# @param string type Data type
|
|
163
|
+
# @param string value Value to be deserialized
|
|
164
|
+
# @return [Object] Deserialized data
|
|
165
|
+
def _deserialize(type, value)
|
|
166
|
+
case type.to_sym
|
|
167
|
+
when :Time
|
|
168
|
+
Time.parse(value)
|
|
169
|
+
when :Date
|
|
170
|
+
Date.parse(value)
|
|
171
|
+
when :String
|
|
172
|
+
value.to_s
|
|
173
|
+
when :Integer
|
|
174
|
+
value.to_i
|
|
175
|
+
when :Float
|
|
176
|
+
value.to_f
|
|
177
|
+
when :Boolean
|
|
178
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
179
|
+
true
|
|
180
|
+
else
|
|
181
|
+
false
|
|
182
|
+
end
|
|
183
|
+
when :Object
|
|
184
|
+
# generic object (usually a Hash), return directly
|
|
185
|
+
value
|
|
186
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
187
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
188
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
189
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
190
|
+
k_type = Regexp.last_match[:k_type]
|
|
191
|
+
v_type = Regexp.last_match[:v_type]
|
|
192
|
+
{}.tap do |hash|
|
|
193
|
+
value.each do |k, v|
|
|
194
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
else # model
|
|
198
|
+
# models (e.g. Pet) or oneOf
|
|
199
|
+
klass = UltracartClient.const_get(type)
|
|
200
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
201
|
+
end
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the string representation of the object
|
|
205
|
+
# @return [String] String presentation of the object
|
|
206
|
+
def to_s
|
|
207
|
+
to_hash.to_s
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
|
212
|
+
def to_body
|
|
213
|
+
to_hash
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Returns the object in the form of hash
|
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
|
218
|
+
def to_hash
|
|
219
|
+
hash = {}
|
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
221
|
+
value = self.send(attr)
|
|
222
|
+
if value.nil?
|
|
223
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
hash[param] = _to_hash(value)
|
|
228
|
+
end
|
|
229
|
+
hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Outputs non-array value in the form of hash
|
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
234
|
+
# @param [Object] value Any valid value
|
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
|
236
|
+
def _to_hash(value)
|
|
237
|
+
if value.is_a?(Array)
|
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
|
239
|
+
elsif value.is_a?(Hash)
|
|
240
|
+
{}.tap do |hash|
|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
242
|
+
end
|
|
243
|
+
elsif value.respond_to? :to_hash
|
|
244
|
+
value.to_hash
|
|
245
|
+
else
|
|
246
|
+
value
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|
|
@@ -0,0 +1,282 @@
|
|
|
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 SfvbTemplateResolveResponse
|
|
18
|
+
# Whether resolved_path is a file. False means a page naming this template cannot render.
|
|
19
|
+
attr_accessor :exists
|
|
20
|
+
|
|
21
|
+
# True when no resource path held the name, so the storefront fell back to the name at the theme root.
|
|
22
|
+
attr_accessor :fallback
|
|
23
|
+
|
|
24
|
+
# The template file name that was resolved, as a page's group_template or item_template holds it.
|
|
25
|
+
attr_accessor :name
|
|
26
|
+
|
|
27
|
+
# The file a page naming this template renders, relative to theme_path. This is the storefront's own answer.
|
|
28
|
+
attr_accessor :resolved_path
|
|
29
|
+
|
|
30
|
+
# The theme's resource paths in search order, each with the files of that name found below it. The first path with a match wins, which is how a theme copy overrides a shared core copy.
|
|
31
|
+
attr_accessor :resource_paths
|
|
32
|
+
|
|
33
|
+
# The theme the name was resolved in.
|
|
34
|
+
attr_accessor :theme_oid
|
|
35
|
+
|
|
36
|
+
# The theme's path in the file manager, such as /themes/Elements/.
|
|
37
|
+
attr_accessor :theme_path
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'exists' => :'exists',
|
|
43
|
+
:'fallback' => :'fallback',
|
|
44
|
+
:'name' => :'name',
|
|
45
|
+
:'resolved_path' => :'resolved_path',
|
|
46
|
+
:'resource_paths' => :'resource_paths',
|
|
47
|
+
:'theme_oid' => :'theme_oid',
|
|
48
|
+
:'theme_path' => :'theme_path'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
|
53
|
+
def self.acceptable_attributes
|
|
54
|
+
attribute_map.values
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Attribute type mapping.
|
|
58
|
+
def self.openapi_types
|
|
59
|
+
{
|
|
60
|
+
:'exists' => :'Boolean',
|
|
61
|
+
:'fallback' => :'Boolean',
|
|
62
|
+
:'name' => :'String',
|
|
63
|
+
:'resolved_path' => :'String',
|
|
64
|
+
:'resource_paths' => :'Array<SfvbTemplateResolvePath>',
|
|
65
|
+
:'theme_oid' => :'Integer',
|
|
66
|
+
:'theme_path' => :'String'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# List of attributes with nullable: true
|
|
71
|
+
def self.openapi_nullable
|
|
72
|
+
Set.new([
|
|
73
|
+
])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Initializes the object
|
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
78
|
+
def initialize(attributes = {})
|
|
79
|
+
if (!attributes.is_a?(Hash))
|
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTemplateResolveResponse` initialize method"
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTemplateResolveResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
87
|
+
end
|
|
88
|
+
h[k.to_sym] = v
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if attributes.key?(:'exists')
|
|
92
|
+
self.exists = attributes[:'exists']
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'fallback')
|
|
96
|
+
self.fallback = attributes[:'fallback']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'name')
|
|
100
|
+
self.name = attributes[:'name']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'resolved_path')
|
|
104
|
+
self.resolved_path = attributes[:'resolved_path']
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if attributes.key?(:'resource_paths')
|
|
108
|
+
if (value = attributes[:'resource_paths']).is_a?(Array)
|
|
109
|
+
self.resource_paths = value
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'theme_oid')
|
|
114
|
+
self.theme_oid = attributes[:'theme_oid']
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'theme_path')
|
|
118
|
+
self.theme_path = attributes[:'theme_path']
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
123
|
+
# @return Array for valid properties with the reasons
|
|
124
|
+
def list_invalid_properties
|
|
125
|
+
invalid_properties = Array.new
|
|
126
|
+
invalid_properties
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Check to see if the all the properties in the model are valid
|
|
130
|
+
# @return true if the model is valid
|
|
131
|
+
def valid?
|
|
132
|
+
true
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Checks equality by comparing each attribute.
|
|
136
|
+
# @param [Object] Object to be compared
|
|
137
|
+
def ==(o)
|
|
138
|
+
return true if self.equal?(o)
|
|
139
|
+
self.class == o.class &&
|
|
140
|
+
exists == o.exists &&
|
|
141
|
+
fallback == o.fallback &&
|
|
142
|
+
name == o.name &&
|
|
143
|
+
resolved_path == o.resolved_path &&
|
|
144
|
+
resource_paths == o.resource_paths &&
|
|
145
|
+
theme_oid == o.theme_oid &&
|
|
146
|
+
theme_path == o.theme_path
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# @see the `==` method
|
|
150
|
+
# @param [Object] Object to be compared
|
|
151
|
+
def eql?(o)
|
|
152
|
+
self == o
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Calculates hash code according to all attributes.
|
|
156
|
+
# @return [Integer] Hash code
|
|
157
|
+
def hash
|
|
158
|
+
[exists, fallback, name, resolved_path, resource_paths, theme_oid, theme_path].hash
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Builds the object from hash
|
|
162
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
163
|
+
# @return [Object] Returns the model itself
|
|
164
|
+
def self.build_from_hash(attributes)
|
|
165
|
+
new.build_from_hash(attributes)
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Builds the object from hash
|
|
169
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
170
|
+
# @return [Object] Returns the model itself
|
|
171
|
+
def build_from_hash(attributes)
|
|
172
|
+
return nil unless attributes.is_a?(Hash)
|
|
173
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
174
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
175
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
176
|
+
self.send("#{key}=", nil)
|
|
177
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
178
|
+
# check to ensure the input is an array given that the attribute
|
|
179
|
+
# is documented as an array but the input is not
|
|
180
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
181
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
182
|
+
end
|
|
183
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
184
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
self
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Deserializes the data based on type
|
|
192
|
+
# @param string type Data type
|
|
193
|
+
# @param string value Value to be deserialized
|
|
194
|
+
# @return [Object] Deserialized data
|
|
195
|
+
def _deserialize(type, value)
|
|
196
|
+
case type.to_sym
|
|
197
|
+
when :Time
|
|
198
|
+
Time.parse(value)
|
|
199
|
+
when :Date
|
|
200
|
+
Date.parse(value)
|
|
201
|
+
when :String
|
|
202
|
+
value.to_s
|
|
203
|
+
when :Integer
|
|
204
|
+
value.to_i
|
|
205
|
+
when :Float
|
|
206
|
+
value.to_f
|
|
207
|
+
when :Boolean
|
|
208
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
209
|
+
true
|
|
210
|
+
else
|
|
211
|
+
false
|
|
212
|
+
end
|
|
213
|
+
when :Object
|
|
214
|
+
# generic object (usually a Hash), return directly
|
|
215
|
+
value
|
|
216
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
217
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
218
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
219
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
220
|
+
k_type = Regexp.last_match[:k_type]
|
|
221
|
+
v_type = Regexp.last_match[:v_type]
|
|
222
|
+
{}.tap do |hash|
|
|
223
|
+
value.each do |k, v|
|
|
224
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
else # model
|
|
228
|
+
# models (e.g. Pet) or oneOf
|
|
229
|
+
klass = UltracartClient.const_get(type)
|
|
230
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the string representation of the object
|
|
235
|
+
# @return [String] String presentation of the object
|
|
236
|
+
def to_s
|
|
237
|
+
to_hash.to_s
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
|
242
|
+
def to_body
|
|
243
|
+
to_hash
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Returns the object in the form of hash
|
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
|
248
|
+
def to_hash
|
|
249
|
+
hash = {}
|
|
250
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
251
|
+
value = self.send(attr)
|
|
252
|
+
if value.nil?
|
|
253
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
254
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
hash[param] = _to_hash(value)
|
|
258
|
+
end
|
|
259
|
+
hash
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Outputs non-array value in the form of hash
|
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
264
|
+
# @param [Object] value Any valid value
|
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
|
266
|
+
def _to_hash(value)
|
|
267
|
+
if value.is_a?(Array)
|
|
268
|
+
value.compact.map { |v| _to_hash(v) }
|
|
269
|
+
elsif value.is_a?(Hash)
|
|
270
|
+
{}.tap do |hash|
|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
272
|
+
end
|
|
273
|
+
elsif value.respond_to? :to_hash
|
|
274
|
+
value.to_hash
|
|
275
|
+
else
|
|
276
|
+
value
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1067,6 +1067,9 @@ require 'ultracart_api/models/sfvb_site_attributes_response'
|
|
|
1067
1067
|
require 'ultracart_api/models/sfvb_storefront'
|
|
1068
1068
|
require 'ultracart_api/models/sfvb_storefronts_response'
|
|
1069
1069
|
require 'ultracart_api/models/sfvb_template'
|
|
1070
|
+
require 'ultracart_api/models/sfvb_template_resolve_candidate'
|
|
1071
|
+
require 'ultracart_api/models/sfvb_template_resolve_path'
|
|
1072
|
+
require 'ultracart_api/models/sfvb_template_resolve_response'
|
|
1070
1073
|
require 'ultracart_api/models/sfvb_templates_response'
|
|
1071
1074
|
require 'ultracart_api/models/sfvb_theme'
|
|
1072
1075
|
require 'ultracart_api/models/sfvb_theme_attribute'
|
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.
|
|
4
|
+
version: 4.1.174
|
|
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-
|
|
11
|
+
date: 2026-09-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1129,6 +1129,9 @@ files:
|
|
|
1129
1129
|
- docs/SfvbStorefront.md
|
|
1130
1130
|
- docs/SfvbStorefrontsResponse.md
|
|
1131
1131
|
- docs/SfvbTemplate.md
|
|
1132
|
+
- docs/SfvbTemplateResolveCandidate.md
|
|
1133
|
+
- docs/SfvbTemplateResolvePath.md
|
|
1134
|
+
- docs/SfvbTemplateResolveResponse.md
|
|
1132
1135
|
- docs/SfvbTemplatesResponse.md
|
|
1133
1136
|
- docs/SfvbTheme.md
|
|
1134
1137
|
- docs/SfvbThemeAttribute.md
|
|
@@ -2332,6 +2335,9 @@ files:
|
|
|
2332
2335
|
- lib/ultracart_api/models/sfvb_storefront.rb
|
|
2333
2336
|
- lib/ultracart_api/models/sfvb_storefronts_response.rb
|
|
2334
2337
|
- lib/ultracart_api/models/sfvb_template.rb
|
|
2338
|
+
- lib/ultracart_api/models/sfvb_template_resolve_candidate.rb
|
|
2339
|
+
- lib/ultracart_api/models/sfvb_template_resolve_path.rb
|
|
2340
|
+
- lib/ultracart_api/models/sfvb_template_resolve_response.rb
|
|
2335
2341
|
- lib/ultracart_api/models/sfvb_templates_response.rb
|
|
2336
2342
|
- lib/ultracart_api/models/sfvb_theme.rb
|
|
2337
2343
|
- lib/ultracart_api/models/sfvb_theme_attribute.rb
|