ultracart_api 4.1.159 → 4.1.161
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 +50 -2
- data/docs/SfvbApi.md +1123 -10
- data/docs/SfvbBlogPost.md +30 -0
- data/docs/SfvbBlogPostsResponse.md +24 -0
- data/docs/SfvbExperiment.md +36 -0
- data/docs/SfvbExperimentEndRequest.md +18 -0
- data/docs/SfvbExperimentObjective.md +24 -0
- data/docs/SfvbExperimentObjectivesResponse.md +18 -0
- data/docs/SfvbExperimentStartRequest.md +40 -0
- data/docs/SfvbExperimentStartVariation.md +22 -0
- data/docs/SfvbExperimentVariationUpdateRequest.md +18 -0
- data/docs/SfvbExperimentsResponse.md +18 -0
- data/docs/SfvbPageBlogPostSelector.md +26 -0
- data/docs/SfvbPageBlogPostsRequest.md +18 -0
- data/docs/SfvbPageBlogPostsResponse.md +22 -0
- data/docs/SfvbPageCreateRequest.md +34 -0
- data/docs/SfvbPageDuplicateRequest.md +22 -0
- data/docs/SfvbPageItem.md +26 -0
- data/docs/SfvbPageItemSelector.md +42 -0
- data/docs/SfvbPageItemsAddRequest.md +18 -0
- data/docs/SfvbPageItemsRemoveRequest.md +18 -0
- data/docs/SfvbPageItemsResponse.md +24 -0
- data/docs/SfvbPageListResponse.md +18 -0
- data/docs/SfvbPageResponse.md +13 -1
- data/docs/SfvbPageSelectors.md +26 -0
- data/docs/SfvbPageSettingsRequest.md +44 -0
- data/docs/SfvbPageSummary.md +44 -0
- data/docs/SfvbTemplate.md +36 -0
- data/docs/SfvbTemplatesResponse.md +20 -0
- data/lib/ultracart_api/api/sfvb_api.rb +1722 -211
- data/lib/ultracart_api/models/sfvb_blog_post.rb +280 -0
- data/lib/ultracart_api/models/sfvb_blog_posts_response.rb +252 -0
- data/lib/ultracart_api/models/sfvb_experiment.rb +309 -0
- data/lib/ultracart_api/models/sfvb_experiment_end_request.rb +220 -0
- data/lib/ultracart_api/models/sfvb_experiment_objective.rb +250 -0
- data/lib/ultracart_api/models/sfvb_experiment_objectives_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_experiment_start_request.rb +332 -0
- data/lib/ultracart_api/models/sfvb_experiment_start_variation.rb +240 -0
- data/lib/ultracart_api/models/sfvb_experiment_variation_update_request.rb +220 -0
- data/lib/ultracart_api/models/sfvb_experiments_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_page_blog_post_selector.rb +260 -0
- data/lib/ultracart_api/models/sfvb_page_blog_posts_request.rb +222 -0
- data/lib/ultracart_api/models/sfvb_page_blog_posts_response.rb +242 -0
- data/lib/ultracart_api/models/sfvb_page_create_request.rb +300 -0
- data/lib/ultracart_api/models/sfvb_page_duplicate_request.rb +240 -0
- data/lib/ultracart_api/models/sfvb_page_item.rb +260 -0
- data/lib/ultracart_api/models/sfvb_page_item_selector.rb +340 -0
- data/lib/ultracart_api/models/sfvb_page_items_add_request.rb +222 -0
- data/lib/ultracart_api/models/sfvb_page_items_remove_request.rb +222 -0
- data/lib/ultracart_api/models/sfvb_page_items_response.rb +252 -0
- data/lib/ultracart_api/models/sfvb_page_list_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_page_response.rb +64 -4
- data/lib/ultracart_api/models/sfvb_page_selectors.rb +264 -0
- data/lib/ultracart_api/models/sfvb_page_settings_request.rb +350 -0
- data/lib/ultracart_api/models/sfvb_page_summary.rb +350 -0
- data/lib/ultracart_api/models/sfvb_template.rb +310 -0
- data/lib/ultracart_api/models/sfvb_templates_response.rb +232 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +26 -0
- metadata +53 -1
|
@@ -32,6 +32,170 @@ module UltracartClient
|
|
|
32
32
|
UltracartClient::SfvbApi.new(api_client)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# Assign blog posts to a page
|
|
36
|
+
# Adds posts by blog_post_oid, at most 500 at a time. Every oid must be a post on this storefront, and one that is not changes nothing. Refused on a page whose selectors choose its blog posts. Always needs sfvb_publish.
|
|
37
|
+
# @param storefront_oid [Integer]
|
|
38
|
+
# @param path [String] Page path, for example /blog/
|
|
39
|
+
# @param page_blog_posts_request [SfvbPageBlogPostsRequest] Blog posts to assign
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [SfvbPageBlogPostsResponse]
|
|
42
|
+
def add_sfvb_page_blog_posts(storefront_oid, path, page_blog_posts_request, opts = {})
|
|
43
|
+
data, _status_code, _headers = add_sfvb_page_blog_posts_with_http_info(storefront_oid, path, page_blog_posts_request, opts)
|
|
44
|
+
data
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Assign blog posts to a page
|
|
48
|
+
# Adds posts by blog_post_oid, at most 500 at a time. Every oid must be a post on this storefront, and one that is not changes nothing. Refused on a page whose selectors choose its blog posts. Always needs sfvb_publish.
|
|
49
|
+
# @param storefront_oid [Integer]
|
|
50
|
+
# @param path [String] Page path, for example /blog/
|
|
51
|
+
# @param page_blog_posts_request [SfvbPageBlogPostsRequest] Blog posts to assign
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @return [Array<(SfvbPageBlogPostsResponse, Integer, Hash)>] SfvbPageBlogPostsResponse data, response status code and response headers
|
|
54
|
+
def add_sfvb_page_blog_posts_with_http_info(storefront_oid, path, page_blog_posts_request, opts = {})
|
|
55
|
+
if @api_client.config.debugging
|
|
56
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.add_sfvb_page_blog_posts ...'
|
|
57
|
+
end
|
|
58
|
+
# verify the required parameter 'storefront_oid' is set
|
|
59
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
60
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.add_sfvb_page_blog_posts"
|
|
61
|
+
end
|
|
62
|
+
# verify the required parameter 'path' is set
|
|
63
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
64
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.add_sfvb_page_blog_posts"
|
|
65
|
+
end
|
|
66
|
+
# verify the required parameter 'page_blog_posts_request' is set
|
|
67
|
+
if @api_client.config.client_side_validation && page_blog_posts_request.nil?
|
|
68
|
+
fail ArgumentError, "Missing the required parameter 'page_blog_posts_request' when calling SfvbApi.add_sfvb_page_blog_posts"
|
|
69
|
+
end
|
|
70
|
+
# resource path
|
|
71
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/blog_posts/add'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
72
|
+
|
|
73
|
+
# query parameters
|
|
74
|
+
query_params = opts[:query_params] || {}
|
|
75
|
+
query_params[:'path'] = path
|
|
76
|
+
|
|
77
|
+
# header parameters
|
|
78
|
+
header_params = opts[:header_params] || {}
|
|
79
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
80
|
+
# HTTP header 'Accept' (if needed)
|
|
81
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
82
|
+
# HTTP header 'Content-Type'
|
|
83
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
84
|
+
if !content_type.nil?
|
|
85
|
+
header_params['Content-Type'] = content_type
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# form parameters
|
|
89
|
+
form_params = opts[:form_params] || {}
|
|
90
|
+
|
|
91
|
+
# http body (model)
|
|
92
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_blog_posts_request)
|
|
93
|
+
|
|
94
|
+
# return_type
|
|
95
|
+
return_type = opts[:debug_return_type] || 'SfvbPageBlogPostsResponse'
|
|
96
|
+
|
|
97
|
+
# auth_names
|
|
98
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
99
|
+
|
|
100
|
+
new_options = opts.merge(
|
|
101
|
+
:operation => :"SfvbApi.add_sfvb_page_blog_posts",
|
|
102
|
+
:header_params => header_params,
|
|
103
|
+
:query_params => query_params,
|
|
104
|
+
:form_params => form_params,
|
|
105
|
+
:body => post_body,
|
|
106
|
+
:auth_names => auth_names,
|
|
107
|
+
:return_type => return_type
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug "API called: SfvbApi#add_sfvb_page_blog_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
113
|
+
end
|
|
114
|
+
return data, status_code, headers
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Assign items to a page
|
|
118
|
+
# Adds items by item id, at most 500 at a time, or changes the sort order or url part of items already on the page. Every id is checked first and one unknown id changes nothing. Refused on a page whose selectors choose its items. sort_order is refused unless the page sorts its items by a custom order. Always needs sfvb_publish.
|
|
119
|
+
# @param storefront_oid [Integer]
|
|
120
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
121
|
+
# @param page_items_add_request [SfvbPageItemsAddRequest] Items to assign
|
|
122
|
+
# @param [Hash] opts the optional parameters
|
|
123
|
+
# @return [SfvbPageItemsResponse]
|
|
124
|
+
def add_sfvb_page_items(storefront_oid, path, page_items_add_request, opts = {})
|
|
125
|
+
data, _status_code, _headers = add_sfvb_page_items_with_http_info(storefront_oid, path, page_items_add_request, opts)
|
|
126
|
+
data
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Assign items to a page
|
|
130
|
+
# Adds items by item id, at most 500 at a time, or changes the sort order or url part of items already on the page. Every id is checked first and one unknown id changes nothing. Refused on a page whose selectors choose its items. sort_order is refused unless the page sorts its items by a custom order. Always needs sfvb_publish.
|
|
131
|
+
# @param storefront_oid [Integer]
|
|
132
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
133
|
+
# @param page_items_add_request [SfvbPageItemsAddRequest] Items to assign
|
|
134
|
+
# @param [Hash] opts the optional parameters
|
|
135
|
+
# @return [Array<(SfvbPageItemsResponse, Integer, Hash)>] SfvbPageItemsResponse data, response status code and response headers
|
|
136
|
+
def add_sfvb_page_items_with_http_info(storefront_oid, path, page_items_add_request, opts = {})
|
|
137
|
+
if @api_client.config.debugging
|
|
138
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.add_sfvb_page_items ...'
|
|
139
|
+
end
|
|
140
|
+
# verify the required parameter 'storefront_oid' is set
|
|
141
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
142
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.add_sfvb_page_items"
|
|
143
|
+
end
|
|
144
|
+
# verify the required parameter 'path' is set
|
|
145
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
146
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.add_sfvb_page_items"
|
|
147
|
+
end
|
|
148
|
+
# verify the required parameter 'page_items_add_request' is set
|
|
149
|
+
if @api_client.config.client_side_validation && page_items_add_request.nil?
|
|
150
|
+
fail ArgumentError, "Missing the required parameter 'page_items_add_request' when calling SfvbApi.add_sfvb_page_items"
|
|
151
|
+
end
|
|
152
|
+
# resource path
|
|
153
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/items/add'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
154
|
+
|
|
155
|
+
# query parameters
|
|
156
|
+
query_params = opts[:query_params] || {}
|
|
157
|
+
query_params[:'path'] = path
|
|
158
|
+
|
|
159
|
+
# header parameters
|
|
160
|
+
header_params = opts[:header_params] || {}
|
|
161
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
162
|
+
# HTTP header 'Accept' (if needed)
|
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
164
|
+
# HTTP header 'Content-Type'
|
|
165
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
166
|
+
if !content_type.nil?
|
|
167
|
+
header_params['Content-Type'] = content_type
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
|
|
173
|
+
# http body (model)
|
|
174
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_items_add_request)
|
|
175
|
+
|
|
176
|
+
# return_type
|
|
177
|
+
return_type = opts[:debug_return_type] || 'SfvbPageItemsResponse'
|
|
178
|
+
|
|
179
|
+
# auth_names
|
|
180
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
181
|
+
|
|
182
|
+
new_options = opts.merge(
|
|
183
|
+
:operation => :"SfvbApi.add_sfvb_page_items",
|
|
184
|
+
:header_params => header_params,
|
|
185
|
+
:query_params => query_params,
|
|
186
|
+
:form_params => form_params,
|
|
187
|
+
:body => post_body,
|
|
188
|
+
:auth_names => auth_names,
|
|
189
|
+
:return_type => return_type
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
193
|
+
if @api_client.config.debugging
|
|
194
|
+
@api_client.config.logger.debug "API called: SfvbApi#add_sfvb_page_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
195
|
+
end
|
|
196
|
+
return data, status_code, headers
|
|
197
|
+
end
|
|
198
|
+
|
|
35
199
|
# Compile CJSON to Velocity
|
|
36
200
|
# Compiles a container document to Velocity without storing anything. Supply theme_oid to compile with the theme's inherit groups applied; omit it to compile standalone.
|
|
37
201
|
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
@@ -524,6 +688,81 @@ module UltracartClient
|
|
|
524
688
|
return data, status_code, headers
|
|
525
689
|
end
|
|
526
690
|
|
|
691
|
+
# Copy a page to a new path
|
|
692
|
+
# Copies what the store admin's duplicate copies - settings, items, blog posts, permissions, attributes, selectors, images and the page folder with its body. The copy goes to the path you choose, under any existing page, with the same path rules as creating a page, and a 409 with the code sfvb.page_exists when that path is taken. The root page and pages with pages under them cannot be copied. A page whose folder holds a started experiment is refused, because the copy would share the experiment - end it first. Translated title and description text is not copied. Always needs sfvb_publish, because the copy is live as soon as it exists.
|
|
693
|
+
# @param storefront_oid [Integer]
|
|
694
|
+
# @param page_duplicate_request [SfvbPageDuplicateRequest] The page to copy and where
|
|
695
|
+
# @param [Hash] opts the optional parameters
|
|
696
|
+
# @return [SfvbPageResponse]
|
|
697
|
+
def duplicate_sfvb_page(storefront_oid, page_duplicate_request, opts = {})
|
|
698
|
+
data, _status_code, _headers = duplicate_sfvb_page_with_http_info(storefront_oid, page_duplicate_request, opts)
|
|
699
|
+
data
|
|
700
|
+
end
|
|
701
|
+
|
|
702
|
+
# Copy a page to a new path
|
|
703
|
+
# Copies what the store admin's duplicate copies - settings, items, blog posts, permissions, attributes, selectors, images and the page folder with its body. The copy goes to the path you choose, under any existing page, with the same path rules as creating a page, and a 409 with the code sfvb.page_exists when that path is taken. The root page and pages with pages under them cannot be copied. A page whose folder holds a started experiment is refused, because the copy would share the experiment - end it first. Translated title and description text is not copied. Always needs sfvb_publish, because the copy is live as soon as it exists.
|
|
704
|
+
# @param storefront_oid [Integer]
|
|
705
|
+
# @param page_duplicate_request [SfvbPageDuplicateRequest] The page to copy and where
|
|
706
|
+
# @param [Hash] opts the optional parameters
|
|
707
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
708
|
+
def duplicate_sfvb_page_with_http_info(storefront_oid, page_duplicate_request, opts = {})
|
|
709
|
+
if @api_client.config.debugging
|
|
710
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.duplicate_sfvb_page ...'
|
|
711
|
+
end
|
|
712
|
+
# verify the required parameter 'storefront_oid' is set
|
|
713
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
714
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.duplicate_sfvb_page"
|
|
715
|
+
end
|
|
716
|
+
# verify the required parameter 'page_duplicate_request' is set
|
|
717
|
+
if @api_client.config.client_side_validation && page_duplicate_request.nil?
|
|
718
|
+
fail ArgumentError, "Missing the required parameter 'page_duplicate_request' when calling SfvbApi.duplicate_sfvb_page"
|
|
719
|
+
end
|
|
720
|
+
# resource path
|
|
721
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/duplicate'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
722
|
+
|
|
723
|
+
# query parameters
|
|
724
|
+
query_params = opts[:query_params] || {}
|
|
725
|
+
|
|
726
|
+
# header parameters
|
|
727
|
+
header_params = opts[:header_params] || {}
|
|
728
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
729
|
+
# HTTP header 'Accept' (if needed)
|
|
730
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
731
|
+
# HTTP header 'Content-Type'
|
|
732
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
733
|
+
if !content_type.nil?
|
|
734
|
+
header_params['Content-Type'] = content_type
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# form parameters
|
|
738
|
+
form_params = opts[:form_params] || {}
|
|
739
|
+
|
|
740
|
+
# http body (model)
|
|
741
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_duplicate_request)
|
|
742
|
+
|
|
743
|
+
# return_type
|
|
744
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
745
|
+
|
|
746
|
+
# auth_names
|
|
747
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
748
|
+
|
|
749
|
+
new_options = opts.merge(
|
|
750
|
+
:operation => :"SfvbApi.duplicate_sfvb_page",
|
|
751
|
+
:header_params => header_params,
|
|
752
|
+
:query_params => query_params,
|
|
753
|
+
:form_params => form_params,
|
|
754
|
+
:body => post_body,
|
|
755
|
+
:auth_names => auth_names,
|
|
756
|
+
:return_type => return_type
|
|
757
|
+
)
|
|
758
|
+
|
|
759
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
760
|
+
if @api_client.config.debugging
|
|
761
|
+
@api_client.config.logger.debug "API called: SfvbApi#duplicate_sfvb_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
762
|
+
end
|
|
763
|
+
return data, status_code, headers
|
|
764
|
+
end
|
|
765
|
+
|
|
527
766
|
# Duplicate a theme
|
|
528
767
|
# Copies a theme into a new one and returns a job handle to poll. Asynchronous, because copying a theme copies every file in it. Needs sfvb_write rather than sfvb_publish, because the job explicitly does not activate what it creates, so the worst outcome of a mistaken call is a spare theme. This is how you get somewhere safe to work - duplicate, edit the copy with an ordinary write scope, and let a human promote it.
|
|
529
768
|
# @param storefront_oid [Integer]
|
|
@@ -605,6 +844,83 @@ module UltracartClient
|
|
|
605
844
|
return data, status_code, headers
|
|
606
845
|
end
|
|
607
846
|
|
|
847
|
+
# End an experiment
|
|
848
|
+
# Ends a running experiment. With winner_variation_number the winner gets all new visitors, 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. Visitors already assigned to a url experiment keep their page for up to 30 days. Always needs sfvb_publish.
|
|
849
|
+
# @param storefront_oid [Integer]
|
|
850
|
+
# @param experiment_oid [Integer]
|
|
851
|
+
# @param [Hash] opts the optional parameters
|
|
852
|
+
# @option opts [SfvbExperimentEndRequest] :experiment_end_request The winner, if any
|
|
853
|
+
# @return [SfvbExperiment]
|
|
854
|
+
def end_sfvb_experiment(storefront_oid, experiment_oid, opts = {})
|
|
855
|
+
data, _status_code, _headers = end_sfvb_experiment_with_http_info(storefront_oid, experiment_oid, opts)
|
|
856
|
+
data
|
|
857
|
+
end
|
|
858
|
+
|
|
859
|
+
# End an experiment
|
|
860
|
+
# Ends a running experiment. With winner_variation_number the winner gets all new visitors, 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. Visitors already assigned to a url experiment keep their page for up to 30 days. Always needs sfvb_publish.
|
|
861
|
+
# @param storefront_oid [Integer]
|
|
862
|
+
# @param experiment_oid [Integer]
|
|
863
|
+
# @param [Hash] opts the optional parameters
|
|
864
|
+
# @option opts [SfvbExperimentEndRequest] :experiment_end_request The winner, if any
|
|
865
|
+
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
866
|
+
def end_sfvb_experiment_with_http_info(storefront_oid, experiment_oid, opts = {})
|
|
867
|
+
if @api_client.config.debugging
|
|
868
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.end_sfvb_experiment ...'
|
|
869
|
+
end
|
|
870
|
+
# verify the required parameter 'storefront_oid' is set
|
|
871
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
872
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.end_sfvb_experiment"
|
|
873
|
+
end
|
|
874
|
+
# verify the required parameter 'experiment_oid' is set
|
|
875
|
+
if @api_client.config.client_side_validation && experiment_oid.nil?
|
|
876
|
+
fail ArgumentError, "Missing the required parameter 'experiment_oid' when calling SfvbApi.end_sfvb_experiment"
|
|
877
|
+
end
|
|
878
|
+
# resource path
|
|
879
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}/end'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'experiment_oid' + '}', CGI.escape(experiment_oid.to_s))
|
|
880
|
+
|
|
881
|
+
# query parameters
|
|
882
|
+
query_params = opts[:query_params] || {}
|
|
883
|
+
|
|
884
|
+
# header parameters
|
|
885
|
+
header_params = opts[:header_params] || {}
|
|
886
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
887
|
+
# HTTP header 'Accept' (if needed)
|
|
888
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
889
|
+
# HTTP header 'Content-Type'
|
|
890
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
891
|
+
if !content_type.nil?
|
|
892
|
+
header_params['Content-Type'] = content_type
|
|
893
|
+
end
|
|
894
|
+
|
|
895
|
+
# form parameters
|
|
896
|
+
form_params = opts[:form_params] || {}
|
|
897
|
+
|
|
898
|
+
# http body (model)
|
|
899
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'experiment_end_request'])
|
|
900
|
+
|
|
901
|
+
# return_type
|
|
902
|
+
return_type = opts[:debug_return_type] || 'SfvbExperiment'
|
|
903
|
+
|
|
904
|
+
# auth_names
|
|
905
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
906
|
+
|
|
907
|
+
new_options = opts.merge(
|
|
908
|
+
:operation => :"SfvbApi.end_sfvb_experiment",
|
|
909
|
+
:header_params => header_params,
|
|
910
|
+
:query_params => query_params,
|
|
911
|
+
:form_params => form_params,
|
|
912
|
+
:body => post_body,
|
|
913
|
+
:auth_names => auth_names,
|
|
914
|
+
:return_type => return_type
|
|
915
|
+
)
|
|
916
|
+
|
|
917
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
918
|
+
if @api_client.config.debugging
|
|
919
|
+
@api_client.config.logger.debug "API called: SfvbApi#end_sfvb_experiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
920
|
+
end
|
|
921
|
+
return data, status_code, headers
|
|
922
|
+
end
|
|
923
|
+
|
|
608
924
|
# Element types used by a container
|
|
609
925
|
# @param compile_request [SfvbCompileRequest] CJSON to inspect
|
|
610
926
|
# @param [Hash] opts the optional parameters
|
|
@@ -894,40 +1210,43 @@ module UltracartClient
|
|
|
894
1210
|
return data, status_code, headers
|
|
895
1211
|
end
|
|
896
1212
|
|
|
897
|
-
# Read
|
|
898
|
-
#
|
|
1213
|
+
# Read one experiment and its statistics
|
|
1214
|
+
# The experiment, its variations and their statistics, and with daily=true each variation's daily rows. p95_sessions_needed is estimated only after 1000 sessions, and sessions_needed_computed_dts says when. For a url experiment, router_url is the address visitors must enter through.
|
|
899
1215
|
# @param storefront_oid [Integer]
|
|
1216
|
+
# @param experiment_oid [Integer]
|
|
900
1217
|
# @param [Hash] opts the optional parameters
|
|
901
|
-
# @option opts [
|
|
902
|
-
# @
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
data, _status_code, _headers = get_sfvb_file_content_with_http_info(storefront_oid, opts)
|
|
1218
|
+
# @option opts [Boolean] :daily Include each variation's daily statistics
|
|
1219
|
+
# @return [SfvbExperiment]
|
|
1220
|
+
def get_sfvb_experiment(storefront_oid, experiment_oid, opts = {})
|
|
1221
|
+
data, _status_code, _headers = get_sfvb_experiment_with_http_info(storefront_oid, experiment_oid, opts)
|
|
906
1222
|
data
|
|
907
1223
|
end
|
|
908
1224
|
|
|
909
|
-
# Read
|
|
910
|
-
#
|
|
1225
|
+
# Read one experiment and its statistics
|
|
1226
|
+
# The experiment, its variations and their statistics, and with daily=true each variation's daily rows. p95_sessions_needed is estimated only after 1000 sessions, and sessions_needed_computed_dts says when. For a url experiment, router_url is the address visitors must enter through.
|
|
911
1227
|
# @param storefront_oid [Integer]
|
|
1228
|
+
# @param experiment_oid [Integer]
|
|
912
1229
|
# @param [Hash] opts the optional parameters
|
|
913
|
-
# @option opts [
|
|
914
|
-
# @
|
|
915
|
-
|
|
916
|
-
def get_sfvb_file_content_with_http_info(storefront_oid, opts = {})
|
|
1230
|
+
# @option opts [Boolean] :daily Include each variation's daily statistics
|
|
1231
|
+
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
1232
|
+
def get_sfvb_experiment_with_http_info(storefront_oid, experiment_oid, opts = {})
|
|
917
1233
|
if @api_client.config.debugging
|
|
918
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
1234
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_experiment ...'
|
|
919
1235
|
end
|
|
920
1236
|
# verify the required parameter 'storefront_oid' is set
|
|
921
1237
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
922
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
1238
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_experiment"
|
|
1239
|
+
end
|
|
1240
|
+
# verify the required parameter 'experiment_oid' is set
|
|
1241
|
+
if @api_client.config.client_side_validation && experiment_oid.nil?
|
|
1242
|
+
fail ArgumentError, "Missing the required parameter 'experiment_oid' when calling SfvbApi.get_sfvb_experiment"
|
|
923
1243
|
end
|
|
924
1244
|
# resource path
|
|
925
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
1245
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'experiment_oid' + '}', CGI.escape(experiment_oid.to_s))
|
|
926
1246
|
|
|
927
1247
|
# query parameters
|
|
928
1248
|
query_params = opts[:query_params] || {}
|
|
929
|
-
query_params[:'
|
|
930
|
-
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1249
|
+
query_params[:'daily'] = opts[:'daily'] if !opts[:'daily'].nil?
|
|
931
1250
|
|
|
932
1251
|
# header parameters
|
|
933
1252
|
header_params = opts[:header_params] || {}
|
|
@@ -942,13 +1261,13 @@ module UltracartClient
|
|
|
942
1261
|
post_body = opts[:debug_body]
|
|
943
1262
|
|
|
944
1263
|
# return_type
|
|
945
|
-
return_type = opts[:debug_return_type] || '
|
|
1264
|
+
return_type = opts[:debug_return_type] || 'SfvbExperiment'
|
|
946
1265
|
|
|
947
1266
|
# auth_names
|
|
948
1267
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
949
1268
|
|
|
950
1269
|
new_options = opts.merge(
|
|
951
|
-
:operation => :"SfvbApi.
|
|
1270
|
+
:operation => :"SfvbApi.get_sfvb_experiment",
|
|
952
1271
|
:header_params => header_params,
|
|
953
1272
|
:query_params => query_params,
|
|
954
1273
|
:form_params => form_params,
|
|
@@ -959,29 +1278,163 @@ module UltracartClient
|
|
|
959
1278
|
|
|
960
1279
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
961
1280
|
if @api_client.config.debugging
|
|
962
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
1281
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_experiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
963
1282
|
end
|
|
964
1283
|
return data, status_code, headers
|
|
965
1284
|
end
|
|
966
1285
|
|
|
967
|
-
#
|
|
968
|
-
#
|
|
1286
|
+
# List the objectives an experiment can optimize
|
|
1287
|
+
# Each objective with what is measured per session and compared between variations, the usual optimization type, and whether it needs an event name.
|
|
969
1288
|
# @param storefront_oid [Integer]
|
|
970
|
-
# @param extension [String]
|
|
971
1289
|
# @param [Hash] opts the optional parameters
|
|
972
|
-
# @return [
|
|
973
|
-
def
|
|
974
|
-
data, _status_code, _headers =
|
|
1290
|
+
# @return [SfvbExperimentObjectivesResponse]
|
|
1291
|
+
def get_sfvb_experiment_objectives(storefront_oid, opts = {})
|
|
1292
|
+
data, _status_code, _headers = get_sfvb_experiment_objectives_with_http_info(storefront_oid, opts)
|
|
975
1293
|
data
|
|
976
1294
|
end
|
|
977
1295
|
|
|
978
|
-
#
|
|
979
|
-
#
|
|
1296
|
+
# List the objectives an experiment can optimize
|
|
1297
|
+
# Each objective with what is measured per session and compared between variations, the usual optimization type, and whether it needs an event name.
|
|
980
1298
|
# @param storefront_oid [Integer]
|
|
981
|
-
# @param extension [String]
|
|
982
1299
|
# @param [Hash] opts the optional parameters
|
|
983
|
-
# @return [Array<(
|
|
984
|
-
def
|
|
1300
|
+
# @return [Array<(SfvbExperimentObjectivesResponse, Integer, Hash)>] SfvbExperimentObjectivesResponse data, response status code and response headers
|
|
1301
|
+
def get_sfvb_experiment_objectives_with_http_info(storefront_oid, opts = {})
|
|
1302
|
+
if @api_client.config.debugging
|
|
1303
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_experiment_objectives ...'
|
|
1304
|
+
end
|
|
1305
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1306
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1307
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_experiment_objectives"
|
|
1308
|
+
end
|
|
1309
|
+
# resource path
|
|
1310
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments/objectives'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1311
|
+
|
|
1312
|
+
# query parameters
|
|
1313
|
+
query_params = opts[:query_params] || {}
|
|
1314
|
+
|
|
1315
|
+
# header parameters
|
|
1316
|
+
header_params = opts[:header_params] || {}
|
|
1317
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1318
|
+
# HTTP header 'Accept' (if needed)
|
|
1319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1320
|
+
|
|
1321
|
+
# form parameters
|
|
1322
|
+
form_params = opts[:form_params] || {}
|
|
1323
|
+
|
|
1324
|
+
# http body (model)
|
|
1325
|
+
post_body = opts[:debug_body]
|
|
1326
|
+
|
|
1327
|
+
# return_type
|
|
1328
|
+
return_type = opts[:debug_return_type] || 'SfvbExperimentObjectivesResponse'
|
|
1329
|
+
|
|
1330
|
+
# auth_names
|
|
1331
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1332
|
+
|
|
1333
|
+
new_options = opts.merge(
|
|
1334
|
+
:operation => :"SfvbApi.get_sfvb_experiment_objectives",
|
|
1335
|
+
:header_params => header_params,
|
|
1336
|
+
:query_params => query_params,
|
|
1337
|
+
:form_params => form_params,
|
|
1338
|
+
:body => post_body,
|
|
1339
|
+
:auth_names => auth_names,
|
|
1340
|
+
:return_type => return_type
|
|
1341
|
+
)
|
|
1342
|
+
|
|
1343
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1344
|
+
if @api_client.config.debugging
|
|
1345
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_experiment_objectives\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1346
|
+
end
|
|
1347
|
+
return data, status_code, headers
|
|
1348
|
+
end
|
|
1349
|
+
|
|
1350
|
+
# Read a storefront file
|
|
1351
|
+
# Returns the current content, or an earlier version when version is supplied. Send the body's hash_sha256 back as If-Match when writing. The ETag header carries the same hash, but a compressing proxy may append a suffix such as -gzip to it, so prefer the body value.
|
|
1352
|
+
# @param storefront_oid [Integer]
|
|
1353
|
+
# @param [Hash] opts the optional parameters
|
|
1354
|
+
# @option opts [String] :path
|
|
1355
|
+
# @option opts [Integer] :version
|
|
1356
|
+
# @return [SfvbFileContentResponse]
|
|
1357
|
+
def get_sfvb_file_content(storefront_oid, opts = {})
|
|
1358
|
+
data, _status_code, _headers = get_sfvb_file_content_with_http_info(storefront_oid, opts)
|
|
1359
|
+
data
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
# Read a storefront file
|
|
1363
|
+
# Returns the current content, or an earlier version when version is supplied. Send the body's hash_sha256 back as If-Match when writing. The ETag header carries the same hash, but a compressing proxy may append a suffix such as -gzip to it, so prefer the body value.
|
|
1364
|
+
# @param storefront_oid [Integer]
|
|
1365
|
+
# @param [Hash] opts the optional parameters
|
|
1366
|
+
# @option opts [String] :path
|
|
1367
|
+
# @option opts [Integer] :version
|
|
1368
|
+
# @return [Array<(SfvbFileContentResponse, Integer, Hash)>] SfvbFileContentResponse data, response status code and response headers
|
|
1369
|
+
def get_sfvb_file_content_with_http_info(storefront_oid, opts = {})
|
|
1370
|
+
if @api_client.config.debugging
|
|
1371
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_file_content ...'
|
|
1372
|
+
end
|
|
1373
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1374
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1375
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_file_content"
|
|
1376
|
+
end
|
|
1377
|
+
# resource path
|
|
1378
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1379
|
+
|
|
1380
|
+
# query parameters
|
|
1381
|
+
query_params = opts[:query_params] || {}
|
|
1382
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
1383
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
1384
|
+
|
|
1385
|
+
# header parameters
|
|
1386
|
+
header_params = opts[:header_params] || {}
|
|
1387
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1388
|
+
# HTTP header 'Accept' (if needed)
|
|
1389
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1390
|
+
|
|
1391
|
+
# form parameters
|
|
1392
|
+
form_params = opts[:form_params] || {}
|
|
1393
|
+
|
|
1394
|
+
# http body (model)
|
|
1395
|
+
post_body = opts[:debug_body]
|
|
1396
|
+
|
|
1397
|
+
# return_type
|
|
1398
|
+
return_type = opts[:debug_return_type] || 'SfvbFileContentResponse'
|
|
1399
|
+
|
|
1400
|
+
# auth_names
|
|
1401
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1402
|
+
|
|
1403
|
+
new_options = opts.merge(
|
|
1404
|
+
:operation => :"SfvbApi.get_sfvb_file_content",
|
|
1405
|
+
:header_params => header_params,
|
|
1406
|
+
:query_params => query_params,
|
|
1407
|
+
:form_params => form_params,
|
|
1408
|
+
:body => post_body,
|
|
1409
|
+
:auth_names => auth_names,
|
|
1410
|
+
:return_type => return_type
|
|
1411
|
+
)
|
|
1412
|
+
|
|
1413
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1414
|
+
if @api_client.config.debugging
|
|
1415
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_file_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1416
|
+
end
|
|
1417
|
+
return data, status_code, headers
|
|
1418
|
+
end
|
|
1419
|
+
|
|
1420
|
+
# Get a URL to upload a binary asset to
|
|
1421
|
+
# Binary content does not travel through this API as JSON, so uploading an image, font, video or PDF is two steps. Ask here for a URL, PUT the raw bytes straight to it, then call uploadSfvbFile quoting the key you were given. The bytes never pass through the API server. The extension is checked against the accepted type list before a URL is issued, so an unsupported type fails here rather than after you have sent the file. The URL is short lived and the key is bound to your account.
|
|
1422
|
+
# @param storefront_oid [Integer]
|
|
1423
|
+
# @param extension [String]
|
|
1424
|
+
# @param [Hash] opts the optional parameters
|
|
1425
|
+
# @return [SfvbFileUploadUrlResponse]
|
|
1426
|
+
def get_sfvb_file_upload_url(storefront_oid, extension, opts = {})
|
|
1427
|
+
data, _status_code, _headers = get_sfvb_file_upload_url_with_http_info(storefront_oid, extension, opts)
|
|
1428
|
+
data
|
|
1429
|
+
end
|
|
1430
|
+
|
|
1431
|
+
# Get a URL to upload a binary asset to
|
|
1432
|
+
# Binary content does not travel through this API as JSON, so uploading an image, font, video or PDF is two steps. Ask here for a URL, PUT the raw bytes straight to it, then call uploadSfvbFile quoting the key you were given. The bytes never pass through the API server. The extension is checked against the accepted type list before a URL is issued, so an unsupported type fails here rather than after you have sent the file. The URL is short lived and the key is bound to your account.
|
|
1433
|
+
# @param storefront_oid [Integer]
|
|
1434
|
+
# @param extension [String]
|
|
1435
|
+
# @param [Hash] opts the optional parameters
|
|
1436
|
+
# @return [Array<(SfvbFileUploadUrlResponse, Integer, Hash)>] SfvbFileUploadUrlResponse data, response status code and response headers
|
|
1437
|
+
def get_sfvb_file_upload_url_with_http_info(storefront_oid, extension, opts = {})
|
|
985
1438
|
if @api_client.config.debugging
|
|
986
1439
|
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_file_upload_url ...'
|
|
987
1440
|
end
|
|
@@ -1309,43 +1762,41 @@ module UltracartClient
|
|
|
1309
1762
|
return data, status_code, headers
|
|
1310
1763
|
end
|
|
1311
1764
|
|
|
1312
|
-
#
|
|
1313
|
-
#
|
|
1765
|
+
# Read the blog posts assigned to a page
|
|
1766
|
+
# The posts the page shows. uses_selectors is true when the page's blog post selectors choose them instead.
|
|
1314
1767
|
# @param storefront_oid [Integer]
|
|
1315
|
-
# @param
|
|
1768
|
+
# @param path [String] Page path, for example /blog/
|
|
1316
1769
|
# @param [Hash] opts the optional parameters
|
|
1317
|
-
# @
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
data, _status_code, _headers = get_sfvb_preview_url_with_http_info(storefront_oid, preview_session_id, opts)
|
|
1770
|
+
# @return [SfvbPageBlogPostsResponse]
|
|
1771
|
+
def get_sfvb_page_blog_posts(storefront_oid, path, opts = {})
|
|
1772
|
+
data, _status_code, _headers = get_sfvb_page_blog_posts_with_http_info(storefront_oid, path, opts)
|
|
1321
1773
|
data
|
|
1322
1774
|
end
|
|
1323
1775
|
|
|
1324
|
-
#
|
|
1325
|
-
#
|
|
1776
|
+
# Read the blog posts assigned to a page
|
|
1777
|
+
# The posts the page shows. uses_selectors is true when the page's blog post selectors choose them instead.
|
|
1326
1778
|
# @param storefront_oid [Integer]
|
|
1327
|
-
# @param
|
|
1779
|
+
# @param path [String] Page path, for example /blog/
|
|
1328
1780
|
# @param [Hash] opts the optional parameters
|
|
1329
|
-
# @
|
|
1330
|
-
|
|
1331
|
-
def get_sfvb_preview_url_with_http_info(storefront_oid, preview_session_id, opts = {})
|
|
1781
|
+
# @return [Array<(SfvbPageBlogPostsResponse, Integer, Hash)>] SfvbPageBlogPostsResponse data, response status code and response headers
|
|
1782
|
+
def get_sfvb_page_blog_posts_with_http_info(storefront_oid, path, opts = {})
|
|
1332
1783
|
if @api_client.config.debugging
|
|
1333
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
1784
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_page_blog_posts ...'
|
|
1334
1785
|
end
|
|
1335
1786
|
# verify the required parameter 'storefront_oid' is set
|
|
1336
1787
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1337
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
1788
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_page_blog_posts"
|
|
1338
1789
|
end
|
|
1339
|
-
# verify the required parameter '
|
|
1340
|
-
if @api_client.config.client_side_validation &&
|
|
1341
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1790
|
+
# verify the required parameter 'path' is set
|
|
1791
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
1792
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.get_sfvb_page_blog_posts"
|
|
1342
1793
|
end
|
|
1343
1794
|
# resource path
|
|
1344
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
1795
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/blog_posts'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1345
1796
|
|
|
1346
1797
|
# query parameters
|
|
1347
1798
|
query_params = opts[:query_params] || {}
|
|
1348
|
-
query_params[:'path'] =
|
|
1799
|
+
query_params[:'path'] = path
|
|
1349
1800
|
|
|
1350
1801
|
# header parameters
|
|
1351
1802
|
header_params = opts[:header_params] || {}
|
|
@@ -1360,13 +1811,13 @@ module UltracartClient
|
|
|
1360
1811
|
post_body = opts[:debug_body]
|
|
1361
1812
|
|
|
1362
1813
|
# return_type
|
|
1363
|
-
return_type = opts[:debug_return_type] || '
|
|
1814
|
+
return_type = opts[:debug_return_type] || 'SfvbPageBlogPostsResponse'
|
|
1364
1815
|
|
|
1365
1816
|
# auth_names
|
|
1366
1817
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1367
1818
|
|
|
1368
1819
|
new_options = opts.merge(
|
|
1369
|
-
:operation => :"SfvbApi.
|
|
1820
|
+
:operation => :"SfvbApi.get_sfvb_page_blog_posts",
|
|
1370
1821
|
:header_params => header_params,
|
|
1371
1822
|
:query_params => query_params,
|
|
1372
1823
|
:form_params => form_params,
|
|
@@ -1377,39 +1828,46 @@ module UltracartClient
|
|
|
1377
1828
|
|
|
1378
1829
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1379
1830
|
if @api_client.config.debugging
|
|
1380
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
1831
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_page_blog_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1381
1832
|
end
|
|
1382
1833
|
return data, status_code, headers
|
|
1383
1834
|
end
|
|
1384
1835
|
|
|
1385
|
-
# Read
|
|
1386
|
-
# The
|
|
1836
|
+
# Read the items assigned to a page
|
|
1837
|
+
# The items on the page with their sort order and url part. uses_selectors is true when the page's selectors choose its items instead.
|
|
1387
1838
|
# @param storefront_oid [Integer]
|
|
1839
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
1388
1840
|
# @param [Hash] opts the optional parameters
|
|
1389
|
-
# @return [
|
|
1390
|
-
def
|
|
1391
|
-
data, _status_code, _headers =
|
|
1841
|
+
# @return [SfvbPageItemsResponse]
|
|
1842
|
+
def get_sfvb_page_items(storefront_oid, path, opts = {})
|
|
1843
|
+
data, _status_code, _headers = get_sfvb_page_items_with_http_info(storefront_oid, path, opts)
|
|
1392
1844
|
data
|
|
1393
1845
|
end
|
|
1394
1846
|
|
|
1395
|
-
# Read
|
|
1396
|
-
# The
|
|
1847
|
+
# Read the items assigned to a page
|
|
1848
|
+
# The items on the page with their sort order and url part. uses_selectors is true when the page's selectors choose its items instead.
|
|
1397
1849
|
# @param storefront_oid [Integer]
|
|
1850
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
1398
1851
|
# @param [Hash] opts the optional parameters
|
|
1399
|
-
# @return [Array<(
|
|
1400
|
-
def
|
|
1852
|
+
# @return [Array<(SfvbPageItemsResponse, Integer, Hash)>] SfvbPageItemsResponse data, response status code and response headers
|
|
1853
|
+
def get_sfvb_page_items_with_http_info(storefront_oid, path, opts = {})
|
|
1401
1854
|
if @api_client.config.debugging
|
|
1402
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
1855
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_page_items ...'
|
|
1403
1856
|
end
|
|
1404
1857
|
# verify the required parameter 'storefront_oid' is set
|
|
1405
1858
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1406
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
1859
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_page_items"
|
|
1860
|
+
end
|
|
1861
|
+
# verify the required parameter 'path' is set
|
|
1862
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
1863
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.get_sfvb_page_items"
|
|
1407
1864
|
end
|
|
1408
1865
|
# resource path
|
|
1409
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
1866
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/items'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1410
1867
|
|
|
1411
1868
|
# query parameters
|
|
1412
1869
|
query_params = opts[:query_params] || {}
|
|
1870
|
+
query_params[:'path'] = path
|
|
1413
1871
|
|
|
1414
1872
|
# header parameters
|
|
1415
1873
|
header_params = opts[:header_params] || {}
|
|
@@ -1424,13 +1882,13 @@ module UltracartClient
|
|
|
1424
1882
|
post_body = opts[:debug_body]
|
|
1425
1883
|
|
|
1426
1884
|
# return_type
|
|
1427
|
-
return_type = opts[:debug_return_type] || '
|
|
1885
|
+
return_type = opts[:debug_return_type] || 'SfvbPageItemsResponse'
|
|
1428
1886
|
|
|
1429
1887
|
# auth_names
|
|
1430
1888
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1431
1889
|
|
|
1432
1890
|
new_options = opts.merge(
|
|
1433
|
-
:operation => :"SfvbApi.
|
|
1891
|
+
:operation => :"SfvbApi.get_sfvb_page_items",
|
|
1434
1892
|
:header_params => header_params,
|
|
1435
1893
|
:query_params => query_params,
|
|
1436
1894
|
:form_params => form_params,
|
|
@@ -1441,43 +1899,46 @@ module UltracartClient
|
|
|
1441
1899
|
|
|
1442
1900
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1443
1901
|
if @api_client.config.debugging
|
|
1444
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
1902
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_page_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1445
1903
|
end
|
|
1446
1904
|
return data, status_code, headers
|
|
1447
1905
|
end
|
|
1448
1906
|
|
|
1449
|
-
#
|
|
1907
|
+
# Read a page's selectors
|
|
1908
|
+
# The conditions that choose the page's items and blog posts, and whether each set must all match.
|
|
1450
1909
|
# @param storefront_oid [Integer]
|
|
1451
|
-
# @param
|
|
1910
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
1452
1911
|
# @param [Hash] opts the optional parameters
|
|
1453
|
-
# @return [
|
|
1454
|
-
def
|
|
1455
|
-
data, _status_code, _headers =
|
|
1912
|
+
# @return [SfvbPageSelectors]
|
|
1913
|
+
def get_sfvb_page_selectors(storefront_oid, path, opts = {})
|
|
1914
|
+
data, _status_code, _headers = get_sfvb_page_selectors_with_http_info(storefront_oid, path, opts)
|
|
1456
1915
|
data
|
|
1457
1916
|
end
|
|
1458
1917
|
|
|
1459
|
-
#
|
|
1918
|
+
# Read a page's selectors
|
|
1919
|
+
# The conditions that choose the page's items and blog posts, and whether each set must all match.
|
|
1460
1920
|
# @param storefront_oid [Integer]
|
|
1461
|
-
# @param
|
|
1921
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
1462
1922
|
# @param [Hash] opts the optional parameters
|
|
1463
|
-
# @return [Array<(
|
|
1464
|
-
def
|
|
1923
|
+
# @return [Array<(SfvbPageSelectors, Integer, Hash)>] SfvbPageSelectors data, response status code and response headers
|
|
1924
|
+
def get_sfvb_page_selectors_with_http_info(storefront_oid, path, opts = {})
|
|
1465
1925
|
if @api_client.config.debugging
|
|
1466
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
1926
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_page_selectors ...'
|
|
1467
1927
|
end
|
|
1468
1928
|
# verify the required parameter 'storefront_oid' is set
|
|
1469
1929
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1470
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
1930
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_page_selectors"
|
|
1471
1931
|
end
|
|
1472
|
-
# verify the required parameter '
|
|
1473
|
-
if @api_client.config.client_side_validation &&
|
|
1474
|
-
fail ArgumentError, "Missing the required parameter '
|
|
1932
|
+
# verify the required parameter 'path' is set
|
|
1933
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
1934
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.get_sfvb_page_selectors"
|
|
1475
1935
|
end
|
|
1476
1936
|
# resource path
|
|
1477
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
1937
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/selectors'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1478
1938
|
|
|
1479
1939
|
# query parameters
|
|
1480
1940
|
query_params = opts[:query_params] || {}
|
|
1941
|
+
query_params[:'path'] = path
|
|
1481
1942
|
|
|
1482
1943
|
# header parameters
|
|
1483
1944
|
header_params = opts[:header_params] || {}
|
|
@@ -1492,13 +1953,13 @@ module UltracartClient
|
|
|
1492
1953
|
post_body = opts[:debug_body]
|
|
1493
1954
|
|
|
1494
1955
|
# return_type
|
|
1495
|
-
return_type = opts[:debug_return_type] || '
|
|
1956
|
+
return_type = opts[:debug_return_type] || 'SfvbPageSelectors'
|
|
1496
1957
|
|
|
1497
1958
|
# auth_names
|
|
1498
1959
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1499
1960
|
|
|
1500
1961
|
new_options = opts.merge(
|
|
1501
|
-
:operation => :"SfvbApi.
|
|
1962
|
+
:operation => :"SfvbApi.get_sfvb_page_selectors",
|
|
1502
1963
|
:header_params => header_params,
|
|
1503
1964
|
:query_params => query_params,
|
|
1504
1965
|
:form_params => form_params,
|
|
@@ -1509,45 +1970,48 @@ module UltracartClient
|
|
|
1509
1970
|
|
|
1510
1971
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1511
1972
|
if @api_client.config.debugging
|
|
1512
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
1973
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_page_selectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1513
1974
|
end
|
|
1514
1975
|
return data, status_code, headers
|
|
1515
1976
|
end
|
|
1516
1977
|
|
|
1517
|
-
#
|
|
1518
|
-
#
|
|
1978
|
+
# URL that renders a preview session
|
|
1979
|
+
# 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.
|
|
1519
1980
|
# @param storefront_oid [Integer]
|
|
1520
|
-
# @param
|
|
1981
|
+
# @param preview_session_id [String]
|
|
1521
1982
|
# @param [Hash] opts the optional parameters
|
|
1522
|
-
# @
|
|
1523
|
-
|
|
1524
|
-
|
|
1983
|
+
# @option opts [String] :path
|
|
1984
|
+
# @return [SfvbPreviewUrlResponse]
|
|
1985
|
+
def get_sfvb_preview_url(storefront_oid, preview_session_id, opts = {})
|
|
1986
|
+
data, _status_code, _headers = get_sfvb_preview_url_with_http_info(storefront_oid, preview_session_id, opts)
|
|
1525
1987
|
data
|
|
1526
1988
|
end
|
|
1527
1989
|
|
|
1528
|
-
#
|
|
1529
|
-
#
|
|
1990
|
+
# URL that renders a preview session
|
|
1991
|
+
# 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.
|
|
1530
1992
|
# @param storefront_oid [Integer]
|
|
1531
|
-
# @param
|
|
1993
|
+
# @param preview_session_id [String]
|
|
1532
1994
|
# @param [Hash] opts the optional parameters
|
|
1533
|
-
# @
|
|
1534
|
-
|
|
1995
|
+
# @option opts [String] :path
|
|
1996
|
+
# @return [Array<(SfvbPreviewUrlResponse, Integer, Hash)>] SfvbPreviewUrlResponse data, response status code and response headers
|
|
1997
|
+
def get_sfvb_preview_url_with_http_info(storefront_oid, preview_session_id, opts = {})
|
|
1535
1998
|
if @api_client.config.debugging
|
|
1536
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
1999
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_preview_url ...'
|
|
1537
2000
|
end
|
|
1538
2001
|
# verify the required parameter 'storefront_oid' is set
|
|
1539
2002
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1540
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
2003
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_preview_url"
|
|
1541
2004
|
end
|
|
1542
|
-
# verify the required parameter '
|
|
1543
|
-
if @api_client.config.client_side_validation &&
|
|
1544
|
-
fail ArgumentError, "Missing the required parameter '
|
|
2005
|
+
# verify the required parameter 'preview_session_id' is set
|
|
2006
|
+
if @api_client.config.client_side_validation && preview_session_id.nil?
|
|
2007
|
+
fail ArgumentError, "Missing the required parameter 'preview_session_id' when calling SfvbApi.get_sfvb_preview_url"
|
|
1545
2008
|
end
|
|
1546
2009
|
# resource path
|
|
1547
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
2010
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id}/url'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'preview_session_id' + '}', CGI.escape(preview_session_id.to_s))
|
|
1548
2011
|
|
|
1549
2012
|
# query parameters
|
|
1550
2013
|
query_params = opts[:query_params] || {}
|
|
2014
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
1551
2015
|
|
|
1552
2016
|
# header parameters
|
|
1553
2017
|
header_params = opts[:header_params] || {}
|
|
@@ -1562,13 +2026,13 @@ module UltracartClient
|
|
|
1562
2026
|
post_body = opts[:debug_body]
|
|
1563
2027
|
|
|
1564
2028
|
# return_type
|
|
1565
|
-
return_type = opts[:debug_return_type] || '
|
|
2029
|
+
return_type = opts[:debug_return_type] || 'SfvbPreviewUrlResponse'
|
|
1566
2030
|
|
|
1567
2031
|
# auth_names
|
|
1568
2032
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1569
2033
|
|
|
1570
2034
|
new_options = opts.merge(
|
|
1571
|
-
:operation => :"SfvbApi.
|
|
2035
|
+
:operation => :"SfvbApi.get_sfvb_preview_url",
|
|
1572
2036
|
:header_params => header_params,
|
|
1573
2037
|
:query_params => query_params,
|
|
1574
2038
|
:form_params => form_params,
|
|
@@ -1579,28 +2043,230 @@ module UltracartClient
|
|
|
1579
2043
|
|
|
1580
2044
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1581
2045
|
if @api_client.config.debugging
|
|
1582
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
2046
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1583
2047
|
end
|
|
1584
2048
|
return data, status_code, headers
|
|
1585
2049
|
end
|
|
1586
2050
|
|
|
1587
|
-
#
|
|
1588
|
-
#
|
|
2051
|
+
# Read a storefront's site attributes
|
|
2052
|
+
# The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template's default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1589
2053
|
# @param storefront_oid [Integer]
|
|
1590
|
-
# @param job_id [Integer]
|
|
1591
2054
|
# @param [Hash] opts the optional parameters
|
|
1592
|
-
# @return [
|
|
1593
|
-
def
|
|
1594
|
-
data, _status_code, _headers =
|
|
2055
|
+
# @return [SfvbSiteAttributesResponse]
|
|
2056
|
+
def get_sfvb_site_attributes(storefront_oid, opts = {})
|
|
2057
|
+
data, _status_code, _headers = get_sfvb_site_attributes_with_http_info(storefront_oid, opts)
|
|
1595
2058
|
data
|
|
1596
2059
|
end
|
|
1597
2060
|
|
|
1598
|
-
#
|
|
1599
|
-
#
|
|
2061
|
+
# Read a storefront's site attributes
|
|
2062
|
+
# The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template's default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
|
|
1600
2063
|
# @param storefront_oid [Integer]
|
|
1601
|
-
# @param job_id [Integer]
|
|
1602
2064
|
# @param [Hash] opts the optional parameters
|
|
1603
|
-
# @return [Array<(
|
|
2065
|
+
# @return [Array<(SfvbSiteAttributesResponse, Integer, Hash)>] SfvbSiteAttributesResponse data, response status code and response headers
|
|
2066
|
+
def get_sfvb_site_attributes_with_http_info(storefront_oid, opts = {})
|
|
2067
|
+
if @api_client.config.debugging
|
|
2068
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_site_attributes ...'
|
|
2069
|
+
end
|
|
2070
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2071
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2072
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_site_attributes"
|
|
2073
|
+
end
|
|
2074
|
+
# resource path
|
|
2075
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2076
|
+
|
|
2077
|
+
# query parameters
|
|
2078
|
+
query_params = opts[:query_params] || {}
|
|
2079
|
+
|
|
2080
|
+
# header parameters
|
|
2081
|
+
header_params = opts[:header_params] || {}
|
|
2082
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2083
|
+
# HTTP header 'Accept' (if needed)
|
|
2084
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2085
|
+
|
|
2086
|
+
# form parameters
|
|
2087
|
+
form_params = opts[:form_params] || {}
|
|
2088
|
+
|
|
2089
|
+
# http body (model)
|
|
2090
|
+
post_body = opts[:debug_body]
|
|
2091
|
+
|
|
2092
|
+
# return_type
|
|
2093
|
+
return_type = opts[:debug_return_type] || 'SfvbSiteAttributesResponse'
|
|
2094
|
+
|
|
2095
|
+
# auth_names
|
|
2096
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2097
|
+
|
|
2098
|
+
new_options = opts.merge(
|
|
2099
|
+
:operation => :"SfvbApi.get_sfvb_site_attributes",
|
|
2100
|
+
:header_params => header_params,
|
|
2101
|
+
:query_params => query_params,
|
|
2102
|
+
:form_params => form_params,
|
|
2103
|
+
:body => post_body,
|
|
2104
|
+
:auth_names => auth_names,
|
|
2105
|
+
:return_type => return_type
|
|
2106
|
+
)
|
|
2107
|
+
|
|
2108
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2109
|
+
if @api_client.config.debugging
|
|
2110
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_site_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2111
|
+
end
|
|
2112
|
+
return data, status_code, headers
|
|
2113
|
+
end
|
|
2114
|
+
|
|
2115
|
+
# Get a theme
|
|
2116
|
+
# @param storefront_oid [Integer]
|
|
2117
|
+
# @param theme_oid [Integer]
|
|
2118
|
+
# @param [Hash] opts the optional parameters
|
|
2119
|
+
# @return [SfvbTheme]
|
|
2120
|
+
def get_sfvb_theme(storefront_oid, theme_oid, opts = {})
|
|
2121
|
+
data, _status_code, _headers = get_sfvb_theme_with_http_info(storefront_oid, theme_oid, opts)
|
|
2122
|
+
data
|
|
2123
|
+
end
|
|
2124
|
+
|
|
2125
|
+
# Get a theme
|
|
2126
|
+
# @param storefront_oid [Integer]
|
|
2127
|
+
# @param theme_oid [Integer]
|
|
2128
|
+
# @param [Hash] opts the optional parameters
|
|
2129
|
+
# @return [Array<(SfvbTheme, Integer, Hash)>] SfvbTheme data, response status code and response headers
|
|
2130
|
+
def get_sfvb_theme_with_http_info(storefront_oid, theme_oid, opts = {})
|
|
2131
|
+
if @api_client.config.debugging
|
|
2132
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme ...'
|
|
2133
|
+
end
|
|
2134
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2135
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2136
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme"
|
|
2137
|
+
end
|
|
2138
|
+
# verify the required parameter 'theme_oid' is set
|
|
2139
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
2140
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.get_sfvb_theme"
|
|
2141
|
+
end
|
|
2142
|
+
# resource path
|
|
2143
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes/{theme_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'theme_oid' + '}', CGI.escape(theme_oid.to_s))
|
|
2144
|
+
|
|
2145
|
+
# query parameters
|
|
2146
|
+
query_params = opts[:query_params] || {}
|
|
2147
|
+
|
|
2148
|
+
# header parameters
|
|
2149
|
+
header_params = opts[:header_params] || {}
|
|
2150
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2151
|
+
# HTTP header 'Accept' (if needed)
|
|
2152
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2153
|
+
|
|
2154
|
+
# form parameters
|
|
2155
|
+
form_params = opts[:form_params] || {}
|
|
2156
|
+
|
|
2157
|
+
# http body (model)
|
|
2158
|
+
post_body = opts[:debug_body]
|
|
2159
|
+
|
|
2160
|
+
# return_type
|
|
2161
|
+
return_type = opts[:debug_return_type] || 'SfvbTheme'
|
|
2162
|
+
|
|
2163
|
+
# auth_names
|
|
2164
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2165
|
+
|
|
2166
|
+
new_options = opts.merge(
|
|
2167
|
+
:operation => :"SfvbApi.get_sfvb_theme",
|
|
2168
|
+
:header_params => header_params,
|
|
2169
|
+
:query_params => query_params,
|
|
2170
|
+
:form_params => form_params,
|
|
2171
|
+
:body => post_body,
|
|
2172
|
+
:auth_names => auth_names,
|
|
2173
|
+
:return_type => return_type
|
|
2174
|
+
)
|
|
2175
|
+
|
|
2176
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2177
|
+
if @api_client.config.debugging
|
|
2178
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2179
|
+
end
|
|
2180
|
+
return data, status_code, headers
|
|
2181
|
+
end
|
|
2182
|
+
|
|
2183
|
+
# Read a theme's colors, fonts and settings
|
|
2184
|
+
# 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.
|
|
2185
|
+
# @param storefront_oid [Integer]
|
|
2186
|
+
# @param theme_oid [Integer]
|
|
2187
|
+
# @param [Hash] opts the optional parameters
|
|
2188
|
+
# @return [SfvbThemeAttributesResponse]
|
|
2189
|
+
def get_sfvb_theme_attributes(storefront_oid, theme_oid, opts = {})
|
|
2190
|
+
data, _status_code, _headers = get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, opts)
|
|
2191
|
+
data
|
|
2192
|
+
end
|
|
2193
|
+
|
|
2194
|
+
# Read a theme's colors, fonts and settings
|
|
2195
|
+
# 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.
|
|
2196
|
+
# @param storefront_oid [Integer]
|
|
2197
|
+
# @param theme_oid [Integer]
|
|
2198
|
+
# @param [Hash] opts the optional parameters
|
|
2199
|
+
# @return [Array<(SfvbThemeAttributesResponse, Integer, Hash)>] SfvbThemeAttributesResponse data, response status code and response headers
|
|
2200
|
+
def get_sfvb_theme_attributes_with_http_info(storefront_oid, theme_oid, opts = {})
|
|
2201
|
+
if @api_client.config.debugging
|
|
2202
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_attributes ...'
|
|
2203
|
+
end
|
|
2204
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2205
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2206
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme_attributes"
|
|
2207
|
+
end
|
|
2208
|
+
# verify the required parameter 'theme_oid' is set
|
|
2209
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
2210
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.get_sfvb_theme_attributes"
|
|
2211
|
+
end
|
|
2212
|
+
# resource path
|
|
2213
|
+
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))
|
|
2214
|
+
|
|
2215
|
+
# query parameters
|
|
2216
|
+
query_params = opts[:query_params] || {}
|
|
2217
|
+
|
|
2218
|
+
# header parameters
|
|
2219
|
+
header_params = opts[:header_params] || {}
|
|
2220
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2221
|
+
# HTTP header 'Accept' (if needed)
|
|
2222
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2223
|
+
|
|
2224
|
+
# form parameters
|
|
2225
|
+
form_params = opts[:form_params] || {}
|
|
2226
|
+
|
|
2227
|
+
# http body (model)
|
|
2228
|
+
post_body = opts[:debug_body]
|
|
2229
|
+
|
|
2230
|
+
# return_type
|
|
2231
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeAttributesResponse'
|
|
2232
|
+
|
|
2233
|
+
# auth_names
|
|
2234
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2235
|
+
|
|
2236
|
+
new_options = opts.merge(
|
|
2237
|
+
:operation => :"SfvbApi.get_sfvb_theme_attributes",
|
|
2238
|
+
:header_params => header_params,
|
|
2239
|
+
:query_params => query_params,
|
|
2240
|
+
:form_params => form_params,
|
|
2241
|
+
:body => post_body,
|
|
2242
|
+
:auth_names => auth_names,
|
|
2243
|
+
:return_type => return_type
|
|
2244
|
+
)
|
|
2245
|
+
|
|
2246
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2247
|
+
if @api_client.config.debugging
|
|
2248
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2249
|
+
end
|
|
2250
|
+
return data, status_code, headers
|
|
2251
|
+
end
|
|
2252
|
+
|
|
2253
|
+
# Status of an asynchronous theme job
|
|
2254
|
+
# 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.
|
|
2255
|
+
# @param storefront_oid [Integer]
|
|
2256
|
+
# @param job_id [Integer]
|
|
2257
|
+
# @param [Hash] opts the optional parameters
|
|
2258
|
+
# @return [SfvbThemeJobResponse]
|
|
2259
|
+
def get_sfvb_theme_job(storefront_oid, job_id, opts = {})
|
|
2260
|
+
data, _status_code, _headers = get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts)
|
|
2261
|
+
data
|
|
2262
|
+
end
|
|
2263
|
+
|
|
2264
|
+
# Status of an asynchronous theme job
|
|
2265
|
+
# 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.
|
|
2266
|
+
# @param storefront_oid [Integer]
|
|
2267
|
+
# @param job_id [Integer]
|
|
2268
|
+
# @param [Hash] opts the optional parameters
|
|
2269
|
+
# @return [Array<(SfvbThemeJobResponse, Integer, Hash)>] SfvbThemeJobResponse data, response status code and response headers
|
|
1604
2270
|
def get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts = {})
|
|
1605
2271
|
if @api_client.config.debugging
|
|
1606
2272
|
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_job ...'
|
|
@@ -1770,6 +2436,81 @@ module UltracartClient
|
|
|
1770
2436
|
return data, status_code, headers
|
|
1771
2437
|
end
|
|
1772
2438
|
|
|
2439
|
+
# Create a page
|
|
2440
|
+
# Creates the page and its folder, the way the store admin's add page does. The parent page must already exist, and the last part of the path may only contain letters, digits, hyphens and underscores - it is refused, not cleaned. A path that already has a page is refused with a 409 and the code sfvb.page_exists. Without a group_template the page inherits its parent's templates, or catalog_group.vm directly under the root. Set attributes and images afterwards with the page attribute and image endpoints, and push the body to the page folder. Always needs sfvb_publish, because the page is live as soon as it exists. Deleting, moving and renaming pages stay in the store admin.
|
|
2441
|
+
# @param storefront_oid [Integer]
|
|
2442
|
+
# @param page_create_request [SfvbPageCreateRequest] The page to create
|
|
2443
|
+
# @param [Hash] opts the optional parameters
|
|
2444
|
+
# @return [SfvbPageResponse]
|
|
2445
|
+
def insert_sfvb_page(storefront_oid, page_create_request, opts = {})
|
|
2446
|
+
data, _status_code, _headers = insert_sfvb_page_with_http_info(storefront_oid, page_create_request, opts)
|
|
2447
|
+
data
|
|
2448
|
+
end
|
|
2449
|
+
|
|
2450
|
+
# Create a page
|
|
2451
|
+
# Creates the page and its folder, the way the store admin's add page does. The parent page must already exist, and the last part of the path may only contain letters, digits, hyphens and underscores - it is refused, not cleaned. A path that already has a page is refused with a 409 and the code sfvb.page_exists. Without a group_template the page inherits its parent's templates, or catalog_group.vm directly under the root. Set attributes and images afterwards with the page attribute and image endpoints, and push the body to the page folder. Always needs sfvb_publish, because the page is live as soon as it exists. Deleting, moving and renaming pages stay in the store admin.
|
|
2452
|
+
# @param storefront_oid [Integer]
|
|
2453
|
+
# @param page_create_request [SfvbPageCreateRequest] The page to create
|
|
2454
|
+
# @param [Hash] opts the optional parameters
|
|
2455
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
2456
|
+
def insert_sfvb_page_with_http_info(storefront_oid, page_create_request, opts = {})
|
|
2457
|
+
if @api_client.config.debugging
|
|
2458
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_page ...'
|
|
2459
|
+
end
|
|
2460
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2461
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2462
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.insert_sfvb_page"
|
|
2463
|
+
end
|
|
2464
|
+
# verify the required parameter 'page_create_request' is set
|
|
2465
|
+
if @api_client.config.client_side_validation && page_create_request.nil?
|
|
2466
|
+
fail ArgumentError, "Missing the required parameter 'page_create_request' when calling SfvbApi.insert_sfvb_page"
|
|
2467
|
+
end
|
|
2468
|
+
# resource path
|
|
2469
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2470
|
+
|
|
2471
|
+
# query parameters
|
|
2472
|
+
query_params = opts[:query_params] || {}
|
|
2473
|
+
|
|
2474
|
+
# header parameters
|
|
2475
|
+
header_params = opts[:header_params] || {}
|
|
2476
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2477
|
+
# HTTP header 'Accept' (if needed)
|
|
2478
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2479
|
+
# HTTP header 'Content-Type'
|
|
2480
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
2481
|
+
if !content_type.nil?
|
|
2482
|
+
header_params['Content-Type'] = content_type
|
|
2483
|
+
end
|
|
2484
|
+
|
|
2485
|
+
# form parameters
|
|
2486
|
+
form_params = opts[:form_params] || {}
|
|
2487
|
+
|
|
2488
|
+
# http body (model)
|
|
2489
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_create_request)
|
|
2490
|
+
|
|
2491
|
+
# return_type
|
|
2492
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
2493
|
+
|
|
2494
|
+
# auth_names
|
|
2495
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2496
|
+
|
|
2497
|
+
new_options = opts.merge(
|
|
2498
|
+
:operation => :"SfvbApi.insert_sfvb_page",
|
|
2499
|
+
:header_params => header_params,
|
|
2500
|
+
:query_params => query_params,
|
|
2501
|
+
:form_params => form_params,
|
|
2502
|
+
:body => post_body,
|
|
2503
|
+
:auth_names => auth_names,
|
|
2504
|
+
:return_type => return_type
|
|
2505
|
+
)
|
|
2506
|
+
|
|
2507
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2508
|
+
if @api_client.config.debugging
|
|
2509
|
+
@api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2510
|
+
end
|
|
2511
|
+
return data, status_code, headers
|
|
2512
|
+
end
|
|
2513
|
+
|
|
1773
2514
|
# Install a library entry into a storefront
|
|
1774
2515
|
# Copies the fragment's referenced assets into the storefront file system and returns the CJSON with its paths resolved, ready to place. This writes, which is why it is a POST rather than the GET the internal admin endpoint uses. It also requires sfvb_publish, because the assets land in the shared storefront file system, which is served to shoppers regardless of which theme is active, so no amount of working inside a duplicate theme isolates them.
|
|
1775
2516
|
# @param storefront_oid [Integer]
|
|
@@ -1840,6 +2581,79 @@ module UltracartClient
|
|
|
1840
2581
|
return data, status_code, headers
|
|
1841
2582
|
end
|
|
1842
2583
|
|
|
2584
|
+
# List the storefront's blog posts
|
|
2585
|
+
# One page of blog posts, newest first, without their bodies. search matches the title, body, excerpt, url part or author, or a tag exactly. unassigned marks posts no page shows yet. Use a post's blog_post_oid to assign it to a page.
|
|
2586
|
+
# @param storefront_oid [Integer]
|
|
2587
|
+
# @param [Hash] opts the optional parameters
|
|
2588
|
+
# @option opts [String] :search Text to search for
|
|
2589
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
2590
|
+
# @option opts [Integer] :page_size Posts per page, 1 to 100, default 50
|
|
2591
|
+
# @return [SfvbBlogPostsResponse]
|
|
2592
|
+
def list_sfvb_blog_posts(storefront_oid, opts = {})
|
|
2593
|
+
data, _status_code, _headers = list_sfvb_blog_posts_with_http_info(storefront_oid, opts)
|
|
2594
|
+
data
|
|
2595
|
+
end
|
|
2596
|
+
|
|
2597
|
+
# List the storefront's blog posts
|
|
2598
|
+
# One page of blog posts, newest first, without their bodies. search matches the title, body, excerpt, url part or author, or a tag exactly. unassigned marks posts no page shows yet. Use a post's blog_post_oid to assign it to a page.
|
|
2599
|
+
# @param storefront_oid [Integer]
|
|
2600
|
+
# @param [Hash] opts the optional parameters
|
|
2601
|
+
# @option opts [String] :search Text to search for
|
|
2602
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
2603
|
+
# @option opts [Integer] :page_size Posts per page, 1 to 100, default 50
|
|
2604
|
+
# @return [Array<(SfvbBlogPostsResponse, Integer, Hash)>] SfvbBlogPostsResponse data, response status code and response headers
|
|
2605
|
+
def list_sfvb_blog_posts_with_http_info(storefront_oid, opts = {})
|
|
2606
|
+
if @api_client.config.debugging
|
|
2607
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_blog_posts ...'
|
|
2608
|
+
end
|
|
2609
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2610
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2611
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_blog_posts"
|
|
2612
|
+
end
|
|
2613
|
+
# resource path
|
|
2614
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/blog_posts'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2615
|
+
|
|
2616
|
+
# query parameters
|
|
2617
|
+
query_params = opts[:query_params] || {}
|
|
2618
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
2619
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
2620
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
2621
|
+
|
|
2622
|
+
# header parameters
|
|
2623
|
+
header_params = opts[:header_params] || {}
|
|
2624
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2625
|
+
# HTTP header 'Accept' (if needed)
|
|
2626
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2627
|
+
|
|
2628
|
+
# form parameters
|
|
2629
|
+
form_params = opts[:form_params] || {}
|
|
2630
|
+
|
|
2631
|
+
# http body (model)
|
|
2632
|
+
post_body = opts[:debug_body]
|
|
2633
|
+
|
|
2634
|
+
# return_type
|
|
2635
|
+
return_type = opts[:debug_return_type] || 'SfvbBlogPostsResponse'
|
|
2636
|
+
|
|
2637
|
+
# auth_names
|
|
2638
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2639
|
+
|
|
2640
|
+
new_options = opts.merge(
|
|
2641
|
+
:operation => :"SfvbApi.list_sfvb_blog_posts",
|
|
2642
|
+
:header_params => header_params,
|
|
2643
|
+
:query_params => query_params,
|
|
2644
|
+
:form_params => form_params,
|
|
2645
|
+
:body => post_body,
|
|
2646
|
+
:auth_names => auth_names,
|
|
2647
|
+
:return_type => return_type
|
|
2648
|
+
)
|
|
2649
|
+
|
|
2650
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2651
|
+
if @api_client.config.debugging
|
|
2652
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_blog_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2653
|
+
end
|
|
2654
|
+
return data, status_code, headers
|
|
2655
|
+
end
|
|
2656
|
+
|
|
1843
2657
|
# Version history for a container stored outside the file system
|
|
1844
2658
|
# Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
1845
2659
|
# @param storefront_oid [Integer]
|
|
@@ -1971,6 +2785,79 @@ module UltracartClient
|
|
|
1971
2785
|
return data, status_code, headers
|
|
1972
2786
|
end
|
|
1973
2787
|
|
|
2788
|
+
# List the storefront's experiments
|
|
2789
|
+
# Every experiment that is not deleted, with its variations and their statistics - the same numbers the store admin shows. Filter by status, by type (page, url, theme, openai), or by the page an experiment runs on. auto_ends_at says when the engine will end an experiment by itself, and p_value is a one-way ANOVA across all variations. Read one experiment for its daily statistics.
|
|
2790
|
+
# @param storefront_oid [Integer]
|
|
2791
|
+
# @param [Hash] opts the optional parameters
|
|
2792
|
+
# @option opts [String] :status Running or Ended
|
|
2793
|
+
# @option opts [String] :type page, url, theme or openai
|
|
2794
|
+
# @option opts [String] :path Only experiments on this page, for example /lp/spring-sale/
|
|
2795
|
+
# @return [SfvbExperimentsResponse]
|
|
2796
|
+
def list_sfvb_experiments(storefront_oid, opts = {})
|
|
2797
|
+
data, _status_code, _headers = list_sfvb_experiments_with_http_info(storefront_oid, opts)
|
|
2798
|
+
data
|
|
2799
|
+
end
|
|
2800
|
+
|
|
2801
|
+
# List the storefront's experiments
|
|
2802
|
+
# Every experiment that is not deleted, with its variations and their statistics - the same numbers the store admin shows. Filter by status, by type (page, url, theme, openai), or by the page an experiment runs on. auto_ends_at says when the engine will end an experiment by itself, and p_value is a one-way ANOVA across all variations. Read one experiment for its daily statistics.
|
|
2803
|
+
# @param storefront_oid [Integer]
|
|
2804
|
+
# @param [Hash] opts the optional parameters
|
|
2805
|
+
# @option opts [String] :status Running or Ended
|
|
2806
|
+
# @option opts [String] :type page, url, theme or openai
|
|
2807
|
+
# @option opts [String] :path Only experiments on this page, for example /lp/spring-sale/
|
|
2808
|
+
# @return [Array<(SfvbExperimentsResponse, Integer, Hash)>] SfvbExperimentsResponse data, response status code and response headers
|
|
2809
|
+
def list_sfvb_experiments_with_http_info(storefront_oid, opts = {})
|
|
2810
|
+
if @api_client.config.debugging
|
|
2811
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_experiments ...'
|
|
2812
|
+
end
|
|
2813
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2814
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2815
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_experiments"
|
|
2816
|
+
end
|
|
2817
|
+
# resource path
|
|
2818
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2819
|
+
|
|
2820
|
+
# query parameters
|
|
2821
|
+
query_params = opts[:query_params] || {}
|
|
2822
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
2823
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
|
2824
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
2825
|
+
|
|
2826
|
+
# header parameters
|
|
2827
|
+
header_params = opts[:header_params] || {}
|
|
2828
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2829
|
+
# HTTP header 'Accept' (if needed)
|
|
2830
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2831
|
+
|
|
2832
|
+
# form parameters
|
|
2833
|
+
form_params = opts[:form_params] || {}
|
|
2834
|
+
|
|
2835
|
+
# http body (model)
|
|
2836
|
+
post_body = opts[:debug_body]
|
|
2837
|
+
|
|
2838
|
+
# return_type
|
|
2839
|
+
return_type = opts[:debug_return_type] || 'SfvbExperimentsResponse'
|
|
2840
|
+
|
|
2841
|
+
# auth_names
|
|
2842
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2843
|
+
|
|
2844
|
+
new_options = opts.merge(
|
|
2845
|
+
:operation => :"SfvbApi.list_sfvb_experiments",
|
|
2846
|
+
:header_params => header_params,
|
|
2847
|
+
:query_params => query_params,
|
|
2848
|
+
:form_params => form_params,
|
|
2849
|
+
:body => post_body,
|
|
2850
|
+
:auth_names => auth_names,
|
|
2851
|
+
:return_type => return_type
|
|
2852
|
+
)
|
|
2853
|
+
|
|
2854
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2855
|
+
if @api_client.config.debugging
|
|
2856
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_experiments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2857
|
+
end
|
|
2858
|
+
return data, status_code, headers
|
|
2859
|
+
end
|
|
2860
|
+
|
|
1974
2861
|
# Version history for a storefront file
|
|
1975
2862
|
# Version history is the undo for anything in the storefront file system, which is what makes an agent's writes recoverable.
|
|
1976
2863
|
# @param storefront_oid [Integer]
|
|
@@ -2063,21 +2950,144 @@ module UltracartClient
|
|
|
2063
2950
|
# @return [Array<(SfvbFilesResponse, Integer, Hash)>] SfvbFilesResponse data, response status code and response headers
|
|
2064
2951
|
def list_sfvb_files_with_http_info(storefront_oid, opts = {})
|
|
2065
2952
|
if @api_client.config.debugging
|
|
2066
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_files ...'
|
|
2067
|
-
end
|
|
2068
|
-
# verify the required parameter 'storefront_oid' is set
|
|
2069
|
-
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2070
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_files"
|
|
2953
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_files ...'
|
|
2954
|
+
end
|
|
2955
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2956
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2957
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_files"
|
|
2958
|
+
end
|
|
2959
|
+
# resource path
|
|
2960
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2961
|
+
|
|
2962
|
+
# query parameters
|
|
2963
|
+
query_params = opts[:query_params] || {}
|
|
2964
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
2965
|
+
query_params[:'storefront_fs_directory_oid'] = opts[:'storefront_fs_directory_oid'] if !opts[:'storefront_fs_directory_oid'].nil?
|
|
2966
|
+
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
2967
|
+
query_params[:'max_entries'] = opts[:'max_entries'] if !opts[:'max_entries'].nil?
|
|
2968
|
+
|
|
2969
|
+
# header parameters
|
|
2970
|
+
header_params = opts[:header_params] || {}
|
|
2971
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2972
|
+
# HTTP header 'Accept' (if needed)
|
|
2973
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2974
|
+
|
|
2975
|
+
# form parameters
|
|
2976
|
+
form_params = opts[:form_params] || {}
|
|
2977
|
+
|
|
2978
|
+
# http body (model)
|
|
2979
|
+
post_body = opts[:debug_body]
|
|
2980
|
+
|
|
2981
|
+
# return_type
|
|
2982
|
+
return_type = opts[:debug_return_type] || 'SfvbFilesResponse'
|
|
2983
|
+
|
|
2984
|
+
# auth_names
|
|
2985
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2986
|
+
|
|
2987
|
+
new_options = opts.merge(
|
|
2988
|
+
:operation => :"SfvbApi.list_sfvb_files",
|
|
2989
|
+
:header_params => header_params,
|
|
2990
|
+
:query_params => query_params,
|
|
2991
|
+
:form_params => form_params,
|
|
2992
|
+
:body => post_body,
|
|
2993
|
+
:auth_names => auth_names,
|
|
2994
|
+
:return_type => return_type
|
|
2995
|
+
)
|
|
2996
|
+
|
|
2997
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2998
|
+
if @api_client.config.debugging
|
|
2999
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3000
|
+
end
|
|
3001
|
+
return data, status_code, headers
|
|
3002
|
+
end
|
|
3003
|
+
|
|
3004
|
+
# List the storefront's pages
|
|
3005
|
+
# Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
3006
|
+
# @param storefront_oid [Integer]
|
|
3007
|
+
# @param [Hash] opts the optional parameters
|
|
3008
|
+
# @option opts [String] :under Only this page and the pages below it, for example /lp/
|
|
3009
|
+
# @return [SfvbPageListResponse]
|
|
3010
|
+
def list_sfvb_pages(storefront_oid, opts = {})
|
|
3011
|
+
data, _status_code, _headers = list_sfvb_pages_with_http_info(storefront_oid, opts)
|
|
3012
|
+
data
|
|
3013
|
+
end
|
|
3014
|
+
|
|
3015
|
+
# List the storefront's pages
|
|
3016
|
+
# Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
3017
|
+
# @param storefront_oid [Integer]
|
|
3018
|
+
# @param [Hash] opts the optional parameters
|
|
3019
|
+
# @option opts [String] :under Only this page and the pages below it, for example /lp/
|
|
3020
|
+
# @return [Array<(SfvbPageListResponse, Integer, Hash)>] SfvbPageListResponse data, response status code and response headers
|
|
3021
|
+
def list_sfvb_pages_with_http_info(storefront_oid, opts = {})
|
|
3022
|
+
if @api_client.config.debugging
|
|
3023
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_pages ...'
|
|
3024
|
+
end
|
|
3025
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3026
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3027
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_pages"
|
|
3028
|
+
end
|
|
3029
|
+
# resource path
|
|
3030
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/list'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3031
|
+
|
|
3032
|
+
# query parameters
|
|
3033
|
+
query_params = opts[:query_params] || {}
|
|
3034
|
+
query_params[:'under'] = opts[:'under'] if !opts[:'under'].nil?
|
|
3035
|
+
|
|
3036
|
+
# header parameters
|
|
3037
|
+
header_params = opts[:header_params] || {}
|
|
3038
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3039
|
+
# HTTP header 'Accept' (if needed)
|
|
3040
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3041
|
+
|
|
3042
|
+
# form parameters
|
|
3043
|
+
form_params = opts[:form_params] || {}
|
|
3044
|
+
|
|
3045
|
+
# http body (model)
|
|
3046
|
+
post_body = opts[:debug_body]
|
|
3047
|
+
|
|
3048
|
+
# return_type
|
|
3049
|
+
return_type = opts[:debug_return_type] || 'SfvbPageListResponse'
|
|
3050
|
+
|
|
3051
|
+
# auth_names
|
|
3052
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3053
|
+
|
|
3054
|
+
new_options = opts.merge(
|
|
3055
|
+
:operation => :"SfvbApi.list_sfvb_pages",
|
|
3056
|
+
:header_params => header_params,
|
|
3057
|
+
:query_params => query_params,
|
|
3058
|
+
:form_params => form_params,
|
|
3059
|
+
:body => post_body,
|
|
3060
|
+
:auth_names => auth_names,
|
|
3061
|
+
:return_type => return_type
|
|
3062
|
+
)
|
|
3063
|
+
|
|
3064
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3065
|
+
if @api_client.config.debugging
|
|
3066
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3067
|
+
end
|
|
3068
|
+
return data, status_code, headers
|
|
3069
|
+
end
|
|
3070
|
+
|
|
3071
|
+
# List storefronts
|
|
3072
|
+
# @param [Hash] opts the optional parameters
|
|
3073
|
+
# @return [SfvbStorefrontsResponse]
|
|
3074
|
+
def list_sfvb_storefronts(opts = {})
|
|
3075
|
+
data, _status_code, _headers = list_sfvb_storefronts_with_http_info(opts)
|
|
3076
|
+
data
|
|
3077
|
+
end
|
|
3078
|
+
|
|
3079
|
+
# List storefronts
|
|
3080
|
+
# @param [Hash] opts the optional parameters
|
|
3081
|
+
# @return [Array<(SfvbStorefrontsResponse, Integer, Hash)>] SfvbStorefrontsResponse data, response status code and response headers
|
|
3082
|
+
def list_sfvb_storefronts_with_http_info(opts = {})
|
|
3083
|
+
if @api_client.config.debugging
|
|
3084
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_storefronts ...'
|
|
2071
3085
|
end
|
|
2072
3086
|
# resource path
|
|
2073
|
-
local_var_path = '/sfvb/storefronts
|
|
3087
|
+
local_var_path = '/sfvb/storefronts'
|
|
2074
3088
|
|
|
2075
3089
|
# query parameters
|
|
2076
3090
|
query_params = opts[:query_params] || {}
|
|
2077
|
-
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
2078
|
-
query_params[:'storefront_fs_directory_oid'] = opts[:'storefront_fs_directory_oid'] if !opts[:'storefront_fs_directory_oid'].nil?
|
|
2079
|
-
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
2080
|
-
query_params[:'max_entries'] = opts[:'max_entries'] if !opts[:'max_entries'].nil?
|
|
2081
3091
|
|
|
2082
3092
|
# header parameters
|
|
2083
3093
|
header_params = opts[:header_params] || {}
|
|
@@ -2092,13 +3102,13 @@ module UltracartClient
|
|
|
2092
3102
|
post_body = opts[:debug_body]
|
|
2093
3103
|
|
|
2094
3104
|
# return_type
|
|
2095
|
-
return_type = opts[:debug_return_type] || '
|
|
3105
|
+
return_type = opts[:debug_return_type] || 'SfvbStorefrontsResponse'
|
|
2096
3106
|
|
|
2097
3107
|
# auth_names
|
|
2098
3108
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2099
3109
|
|
|
2100
3110
|
new_options = opts.merge(
|
|
2101
|
-
:operation => :"SfvbApi.
|
|
3111
|
+
:operation => :"SfvbApi.list_sfvb_storefronts",
|
|
2102
3112
|
:header_params => header_params,
|
|
2103
3113
|
:query_params => query_params,
|
|
2104
3114
|
:form_params => form_params,
|
|
@@ -2109,31 +3119,42 @@ module UltracartClient
|
|
|
2109
3119
|
|
|
2110
3120
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2111
3121
|
if @api_client.config.debugging
|
|
2112
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
3122
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_storefronts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2113
3123
|
end
|
|
2114
3124
|
return data, status_code, headers
|
|
2115
3125
|
end
|
|
2116
3126
|
|
|
2117
|
-
# List
|
|
3127
|
+
# List the active theme's templates
|
|
3128
|
+
# Each template with the page type it declares and what it can render - items, sub-pages, blog posts, pagination, visual builder containers. A page's group_template names one of these. The storefront's fixed templates, such as checkout and my account, are flagged system and must never be assigned to a page.
|
|
3129
|
+
# @param storefront_oid [Integer]
|
|
2118
3130
|
# @param [Hash] opts the optional parameters
|
|
2119
|
-
# @
|
|
2120
|
-
|
|
2121
|
-
|
|
3131
|
+
# @option opts [String] :page_type Only templates declaring this page type, for example group
|
|
3132
|
+
# @return [SfvbTemplatesResponse]
|
|
3133
|
+
def list_sfvb_templates(storefront_oid, opts = {})
|
|
3134
|
+
data, _status_code, _headers = list_sfvb_templates_with_http_info(storefront_oid, opts)
|
|
2122
3135
|
data
|
|
2123
3136
|
end
|
|
2124
3137
|
|
|
2125
|
-
# List
|
|
3138
|
+
# List the active theme's templates
|
|
3139
|
+
# Each template with the page type it declares and what it can render - items, sub-pages, blog posts, pagination, visual builder containers. A page's group_template names one of these. The storefront's fixed templates, such as checkout and my account, are flagged system and must never be assigned to a page.
|
|
3140
|
+
# @param storefront_oid [Integer]
|
|
2126
3141
|
# @param [Hash] opts the optional parameters
|
|
2127
|
-
# @
|
|
2128
|
-
|
|
3142
|
+
# @option opts [String] :page_type Only templates declaring this page type, for example group
|
|
3143
|
+
# @return [Array<(SfvbTemplatesResponse, Integer, Hash)>] SfvbTemplatesResponse data, response status code and response headers
|
|
3144
|
+
def list_sfvb_templates_with_http_info(storefront_oid, opts = {})
|
|
2129
3145
|
if @api_client.config.debugging
|
|
2130
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
3146
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_templates ...'
|
|
3147
|
+
end
|
|
3148
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3149
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3150
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_templates"
|
|
2131
3151
|
end
|
|
2132
3152
|
# resource path
|
|
2133
|
-
local_var_path = '/sfvb/storefronts'
|
|
3153
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/templates'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2134
3154
|
|
|
2135
3155
|
# query parameters
|
|
2136
3156
|
query_params = opts[:query_params] || {}
|
|
3157
|
+
query_params[:'page_type'] = opts[:'page_type'] if !opts[:'page_type'].nil?
|
|
2137
3158
|
|
|
2138
3159
|
# header parameters
|
|
2139
3160
|
header_params = opts[:header_params] || {}
|
|
@@ -2148,13 +3169,13 @@ module UltracartClient
|
|
|
2148
3169
|
post_body = opts[:debug_body]
|
|
2149
3170
|
|
|
2150
3171
|
# return_type
|
|
2151
|
-
return_type = opts[:debug_return_type] || '
|
|
3172
|
+
return_type = opts[:debug_return_type] || 'SfvbTemplatesResponse'
|
|
2152
3173
|
|
|
2153
3174
|
# auth_names
|
|
2154
3175
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2155
3176
|
|
|
2156
3177
|
new_options = opts.merge(
|
|
2157
|
-
:operation => :"SfvbApi.
|
|
3178
|
+
:operation => :"SfvbApi.list_sfvb_templates",
|
|
2158
3179
|
:header_params => header_params,
|
|
2159
3180
|
:query_params => query_params,
|
|
2160
3181
|
:form_params => form_params,
|
|
@@ -2165,7 +3186,7 @@ module UltracartClient
|
|
|
2165
3186
|
|
|
2166
3187
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2167
3188
|
if @api_client.config.debugging
|
|
2168
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
3189
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2169
3190
|
end
|
|
2170
3191
|
return data, status_code, headers
|
|
2171
3192
|
end
|
|
@@ -2395,6 +3416,93 @@ module UltracartClient
|
|
|
2395
3416
|
return data, status_code, headers
|
|
2396
3417
|
end
|
|
2397
3418
|
|
|
3419
|
+
# Pause or resume a variation
|
|
3420
|
+
# Stops or resumes sending new visitors to one variation of a running experiment. Visitors already assigned keep seeing it. Variation 0 cannot be paused, because the split falls back to it, and the last variation still receiving visitors cannot be paused. Always needs sfvb_publish.
|
|
3421
|
+
# @param storefront_oid [Integer]
|
|
3422
|
+
# @param experiment_oid [Integer]
|
|
3423
|
+
# @param variation_number [Integer]
|
|
3424
|
+
# @param experiment_variation_update_request [SfvbExperimentVariationUpdateRequest] Pause or resume
|
|
3425
|
+
# @param [Hash] opts the optional parameters
|
|
3426
|
+
# @return [SfvbExperiment]
|
|
3427
|
+
def put_sfvb_experiment_variation(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts = {})
|
|
3428
|
+
data, _status_code, _headers = put_sfvb_experiment_variation_with_http_info(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts)
|
|
3429
|
+
data
|
|
3430
|
+
end
|
|
3431
|
+
|
|
3432
|
+
# Pause or resume a variation
|
|
3433
|
+
# Stops or resumes sending new visitors to one variation of a running experiment. Visitors already assigned keep seeing it. Variation 0 cannot be paused, because the split falls back to it, and the last variation still receiving visitors cannot be paused. Always needs sfvb_publish.
|
|
3434
|
+
# @param storefront_oid [Integer]
|
|
3435
|
+
# @param experiment_oid [Integer]
|
|
3436
|
+
# @param variation_number [Integer]
|
|
3437
|
+
# @param experiment_variation_update_request [SfvbExperimentVariationUpdateRequest] Pause or resume
|
|
3438
|
+
# @param [Hash] opts the optional parameters
|
|
3439
|
+
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
3440
|
+
def put_sfvb_experiment_variation_with_http_info(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts = {})
|
|
3441
|
+
if @api_client.config.debugging
|
|
3442
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_experiment_variation ...'
|
|
3443
|
+
end
|
|
3444
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3445
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3446
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_experiment_variation"
|
|
3447
|
+
end
|
|
3448
|
+
# verify the required parameter 'experiment_oid' is set
|
|
3449
|
+
if @api_client.config.client_side_validation && experiment_oid.nil?
|
|
3450
|
+
fail ArgumentError, "Missing the required parameter 'experiment_oid' when calling SfvbApi.put_sfvb_experiment_variation"
|
|
3451
|
+
end
|
|
3452
|
+
# verify the required parameter 'variation_number' is set
|
|
3453
|
+
if @api_client.config.client_side_validation && variation_number.nil?
|
|
3454
|
+
fail ArgumentError, "Missing the required parameter 'variation_number' when calling SfvbApi.put_sfvb_experiment_variation"
|
|
3455
|
+
end
|
|
3456
|
+
# verify the required parameter 'experiment_variation_update_request' is set
|
|
3457
|
+
if @api_client.config.client_side_validation && experiment_variation_update_request.nil?
|
|
3458
|
+
fail ArgumentError, "Missing the required parameter 'experiment_variation_update_request' when calling SfvbApi.put_sfvb_experiment_variation"
|
|
3459
|
+
end
|
|
3460
|
+
# resource path
|
|
3461
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}/variations/{variation_number}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'experiment_oid' + '}', CGI.escape(experiment_oid.to_s)).sub('{' + 'variation_number' + '}', CGI.escape(variation_number.to_s))
|
|
3462
|
+
|
|
3463
|
+
# query parameters
|
|
3464
|
+
query_params = opts[:query_params] || {}
|
|
3465
|
+
|
|
3466
|
+
# header parameters
|
|
3467
|
+
header_params = opts[:header_params] || {}
|
|
3468
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3469
|
+
# HTTP header 'Accept' (if needed)
|
|
3470
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3471
|
+
# HTTP header 'Content-Type'
|
|
3472
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
3473
|
+
if !content_type.nil?
|
|
3474
|
+
header_params['Content-Type'] = content_type
|
|
3475
|
+
end
|
|
3476
|
+
|
|
3477
|
+
# form parameters
|
|
3478
|
+
form_params = opts[:form_params] || {}
|
|
3479
|
+
|
|
3480
|
+
# http body (model)
|
|
3481
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_variation_update_request)
|
|
3482
|
+
|
|
3483
|
+
# return_type
|
|
3484
|
+
return_type = opts[:debug_return_type] || 'SfvbExperiment'
|
|
3485
|
+
|
|
3486
|
+
# auth_names
|
|
3487
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3488
|
+
|
|
3489
|
+
new_options = opts.merge(
|
|
3490
|
+
:operation => :"SfvbApi.put_sfvb_experiment_variation",
|
|
3491
|
+
:header_params => header_params,
|
|
3492
|
+
:query_params => query_params,
|
|
3493
|
+
:form_params => form_params,
|
|
3494
|
+
:body => post_body,
|
|
3495
|
+
:auth_names => auth_names,
|
|
3496
|
+
:return_type => return_type
|
|
3497
|
+
)
|
|
3498
|
+
|
|
3499
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3500
|
+
if @api_client.config.debugging
|
|
3501
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_experiment_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3502
|
+
end
|
|
3503
|
+
return data, status_code, headers
|
|
3504
|
+
end
|
|
3505
|
+
|
|
2398
3506
|
# Write a storefront file
|
|
2399
3507
|
# Runs the template sandbox, Velocity validation and the internationalization check, records a version, and compiles the sibling .vm when the file is a .cjson under a theme. Send If-Match with the hash from the last read to avoid clobbering a concurrent change. Writing into the active theme requires sfvb_publish.
|
|
2400
3508
|
# @param storefront_oid [Integer]
|
|
@@ -2493,35 +3601,200 @@ module UltracartClient
|
|
|
2493
3601
|
data
|
|
2494
3602
|
end
|
|
2495
3603
|
|
|
2496
|
-
# Replace a store menu's entries
|
|
2497
|
-
# A whole menu replace, not a merge - what you send is what the menu holds afterwards, so read it, change the tree and send it back. Omitting items changes only the title; sending an empty array empties the menu. Writing a code that does not exist creates it. Every entry is checked before any of it is written, including that a merchant_item_id and a page_path actually resolve, so a tree with one bad entry changes nothing. Always needs sfvb_publish, because a menu is shared by every theme and there is no dormant copy to change instead.
|
|
3604
|
+
# Replace a store menu's entries
|
|
3605
|
+
# A whole menu replace, not a merge - what you send is what the menu holds afterwards, so read it, change the tree and send it back. Omitting items changes only the title; sending an empty array empties the menu. Writing a code that does not exist creates it. Every entry is checked before any of it is written, including that a merchant_item_id and a page_path actually resolve, so a tree with one bad entry changes nothing. Always needs sfvb_publish, because a menu is shared by every theme and there is no dormant copy to change instead.
|
|
3606
|
+
# @param storefront_oid [Integer]
|
|
3607
|
+
# @param code [String] Menu code, matched without regard to case
|
|
3608
|
+
# @param menu_write_request [SfvbMenuWriteRequest] The menu's replacement contents
|
|
3609
|
+
# @param [Hash] opts the optional parameters
|
|
3610
|
+
# @option opts [String] :if_match Content hash from the last read. Required when the menu already exists; 428 when absent, 412 when stale.
|
|
3611
|
+
# @return [Array<(SfvbMenu, Integer, Hash)>] SfvbMenu data, response status code and response headers
|
|
3612
|
+
def put_sfvb_menu_with_http_info(storefront_oid, code, menu_write_request, opts = {})
|
|
3613
|
+
if @api_client.config.debugging
|
|
3614
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_menu ...'
|
|
3615
|
+
end
|
|
3616
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3617
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3618
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_menu"
|
|
3619
|
+
end
|
|
3620
|
+
# verify the required parameter 'code' is set
|
|
3621
|
+
if @api_client.config.client_side_validation && code.nil?
|
|
3622
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling SfvbApi.put_sfvb_menu"
|
|
3623
|
+
end
|
|
3624
|
+
# verify the required parameter 'menu_write_request' is set
|
|
3625
|
+
if @api_client.config.client_side_validation && menu_write_request.nil?
|
|
3626
|
+
fail ArgumentError, "Missing the required parameter 'menu_write_request' when calling SfvbApi.put_sfvb_menu"
|
|
3627
|
+
end
|
|
3628
|
+
# resource path
|
|
3629
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/menus/{code}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'code' + '}', CGI.escape(code.to_s))
|
|
3630
|
+
|
|
3631
|
+
# query parameters
|
|
3632
|
+
query_params = opts[:query_params] || {}
|
|
3633
|
+
|
|
3634
|
+
# header parameters
|
|
3635
|
+
header_params = opts[:header_params] || {}
|
|
3636
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3637
|
+
# HTTP header 'Accept' (if needed)
|
|
3638
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3639
|
+
# HTTP header 'Content-Type'
|
|
3640
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3641
|
+
if !content_type.nil?
|
|
3642
|
+
header_params['Content-Type'] = content_type
|
|
3643
|
+
end
|
|
3644
|
+
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
3645
|
+
|
|
3646
|
+
# form parameters
|
|
3647
|
+
form_params = opts[:form_params] || {}
|
|
3648
|
+
|
|
3649
|
+
# http body (model)
|
|
3650
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(menu_write_request)
|
|
3651
|
+
|
|
3652
|
+
# return_type
|
|
3653
|
+
return_type = opts[:debug_return_type] || 'SfvbMenu'
|
|
3654
|
+
|
|
3655
|
+
# auth_names
|
|
3656
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3657
|
+
|
|
3658
|
+
new_options = opts.merge(
|
|
3659
|
+
:operation => :"SfvbApi.put_sfvb_menu",
|
|
3660
|
+
:header_params => header_params,
|
|
3661
|
+
:query_params => query_params,
|
|
3662
|
+
:form_params => form_params,
|
|
3663
|
+
:body => post_body,
|
|
3664
|
+
:auth_names => auth_names,
|
|
3665
|
+
:return_type => return_type
|
|
3666
|
+
)
|
|
3667
|
+
|
|
3668
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3669
|
+
if @api_client.config.debugging
|
|
3670
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3671
|
+
end
|
|
3672
|
+
return data, status_code, headers
|
|
3673
|
+
end
|
|
3674
|
+
|
|
3675
|
+
# Change a page's attributes
|
|
3676
|
+
# 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.
|
|
3677
|
+
# @param storefront_oid [Integer]
|
|
3678
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
3679
|
+
# @param page_attribute_update_request [SfvbPageAttributeUpdateRequest] Attributes to change
|
|
3680
|
+
# @param [Hash] opts the optional parameters
|
|
3681
|
+
# @return [SfvbPageResponse]
|
|
3682
|
+
def put_sfvb_page_attributes(storefront_oid, path, page_attribute_update_request, opts = {})
|
|
3683
|
+
data, _status_code, _headers = put_sfvb_page_attributes_with_http_info(storefront_oid, path, page_attribute_update_request, opts)
|
|
3684
|
+
data
|
|
3685
|
+
end
|
|
3686
|
+
|
|
3687
|
+
# Change a page's attributes
|
|
3688
|
+
# 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.
|
|
3689
|
+
# @param storefront_oid [Integer]
|
|
3690
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
3691
|
+
# @param page_attribute_update_request [SfvbPageAttributeUpdateRequest] Attributes to change
|
|
3692
|
+
# @param [Hash] opts the optional parameters
|
|
3693
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
3694
|
+
def put_sfvb_page_attributes_with_http_info(storefront_oid, path, page_attribute_update_request, opts = {})
|
|
3695
|
+
if @api_client.config.debugging
|
|
3696
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_page_attributes ...'
|
|
3697
|
+
end
|
|
3698
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3699
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3700
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_page_attributes"
|
|
3701
|
+
end
|
|
3702
|
+
# verify the required parameter 'path' is set
|
|
3703
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
3704
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.put_sfvb_page_attributes"
|
|
3705
|
+
end
|
|
3706
|
+
# verify the required parameter 'page_attribute_update_request' is set
|
|
3707
|
+
if @api_client.config.client_side_validation && page_attribute_update_request.nil?
|
|
3708
|
+
fail ArgumentError, "Missing the required parameter 'page_attribute_update_request' when calling SfvbApi.put_sfvb_page_attributes"
|
|
3709
|
+
end
|
|
3710
|
+
# resource path
|
|
3711
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3712
|
+
|
|
3713
|
+
# query parameters
|
|
3714
|
+
query_params = opts[:query_params] || {}
|
|
3715
|
+
query_params[:'path'] = path
|
|
3716
|
+
|
|
3717
|
+
# header parameters
|
|
3718
|
+
header_params = opts[:header_params] || {}
|
|
3719
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3720
|
+
# HTTP header 'Accept' (if needed)
|
|
3721
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3722
|
+
# HTTP header 'Content-Type'
|
|
3723
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3724
|
+
if !content_type.nil?
|
|
3725
|
+
header_params['Content-Type'] = content_type
|
|
3726
|
+
end
|
|
3727
|
+
|
|
3728
|
+
# form parameters
|
|
3729
|
+
form_params = opts[:form_params] || {}
|
|
3730
|
+
|
|
3731
|
+
# http body (model)
|
|
3732
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_attribute_update_request)
|
|
3733
|
+
|
|
3734
|
+
# return_type
|
|
3735
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
3736
|
+
|
|
3737
|
+
# auth_names
|
|
3738
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3739
|
+
|
|
3740
|
+
new_options = opts.merge(
|
|
3741
|
+
:operation => :"SfvbApi.put_sfvb_page_attributes",
|
|
3742
|
+
:header_params => header_params,
|
|
3743
|
+
:query_params => query_params,
|
|
3744
|
+
:form_params => form_params,
|
|
3745
|
+
:body => post_body,
|
|
3746
|
+
:auth_names => auth_names,
|
|
3747
|
+
:return_type => return_type
|
|
3748
|
+
)
|
|
3749
|
+
|
|
3750
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3751
|
+
if @api_client.config.debugging
|
|
3752
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_page_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3753
|
+
end
|
|
3754
|
+
return data, status_code, headers
|
|
3755
|
+
end
|
|
3756
|
+
|
|
3757
|
+
# Attach an image to a page
|
|
3758
|
+
# 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.
|
|
3759
|
+
# @param storefront_oid [Integer]
|
|
3760
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
3761
|
+
# @param page_multimedia_request [SfvbPageMultimediaRequest] Image to attach
|
|
3762
|
+
# @param [Hash] opts the optional parameters
|
|
3763
|
+
# @return [SfvbPageResponse]
|
|
3764
|
+
def put_sfvb_page_multimedia(storefront_oid, path, page_multimedia_request, opts = {})
|
|
3765
|
+
data, _status_code, _headers = put_sfvb_page_multimedia_with_http_info(storefront_oid, path, page_multimedia_request, opts)
|
|
3766
|
+
data
|
|
3767
|
+
end
|
|
3768
|
+
|
|
3769
|
+
# Attach an image to a page
|
|
3770
|
+
# 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.
|
|
2498
3771
|
# @param storefront_oid [Integer]
|
|
2499
|
-
# @param
|
|
2500
|
-
# @param
|
|
3772
|
+
# @param path [String] Page path, for example /catalog/dispensers/
|
|
3773
|
+
# @param page_multimedia_request [SfvbPageMultimediaRequest] Image to attach
|
|
2501
3774
|
# @param [Hash] opts the optional parameters
|
|
2502
|
-
# @
|
|
2503
|
-
|
|
2504
|
-
def put_sfvb_menu_with_http_info(storefront_oid, code, menu_write_request, opts = {})
|
|
3775
|
+
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
3776
|
+
def put_sfvb_page_multimedia_with_http_info(storefront_oid, path, page_multimedia_request, opts = {})
|
|
2505
3777
|
if @api_client.config.debugging
|
|
2506
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
3778
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_page_multimedia ...'
|
|
2507
3779
|
end
|
|
2508
3780
|
# verify the required parameter 'storefront_oid' is set
|
|
2509
3781
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2510
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
3782
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_page_multimedia"
|
|
2511
3783
|
end
|
|
2512
|
-
# verify the required parameter '
|
|
2513
|
-
if @api_client.config.client_side_validation &&
|
|
2514
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3784
|
+
# verify the required parameter 'path' is set
|
|
3785
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
3786
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.put_sfvb_page_multimedia"
|
|
2515
3787
|
end
|
|
2516
|
-
# verify the required parameter '
|
|
2517
|
-
if @api_client.config.client_side_validation &&
|
|
2518
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3788
|
+
# verify the required parameter 'page_multimedia_request' is set
|
|
3789
|
+
if @api_client.config.client_side_validation && page_multimedia_request.nil?
|
|
3790
|
+
fail ArgumentError, "Missing the required parameter 'page_multimedia_request' when calling SfvbApi.put_sfvb_page_multimedia"
|
|
2519
3791
|
end
|
|
2520
3792
|
# resource path
|
|
2521
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
3793
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2522
3794
|
|
|
2523
3795
|
# query parameters
|
|
2524
3796
|
query_params = opts[:query_params] || {}
|
|
3797
|
+
query_params[:'path'] = path
|
|
2525
3798
|
|
|
2526
3799
|
# header parameters
|
|
2527
3800
|
header_params = opts[:header_params] || {}
|
|
@@ -2533,22 +3806,21 @@ module UltracartClient
|
|
|
2533
3806
|
if !content_type.nil?
|
|
2534
3807
|
header_params['Content-Type'] = content_type
|
|
2535
3808
|
end
|
|
2536
|
-
header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
|
|
2537
3809
|
|
|
2538
3810
|
# form parameters
|
|
2539
3811
|
form_params = opts[:form_params] || {}
|
|
2540
3812
|
|
|
2541
3813
|
# http body (model)
|
|
2542
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3814
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_multimedia_request)
|
|
2543
3815
|
|
|
2544
3816
|
# return_type
|
|
2545
|
-
return_type = opts[:debug_return_type] || '
|
|
3817
|
+
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
2546
3818
|
|
|
2547
3819
|
# auth_names
|
|
2548
3820
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2549
3821
|
|
|
2550
3822
|
new_options = opts.merge(
|
|
2551
|
-
:operation => :"SfvbApi.
|
|
3823
|
+
:operation => :"SfvbApi.put_sfvb_page_multimedia",
|
|
2552
3824
|
:header_params => header_params,
|
|
2553
3825
|
:query_params => query_params,
|
|
2554
3826
|
:form_params => form_params,
|
|
@@ -2559,48 +3831,48 @@ module UltracartClient
|
|
|
2559
3831
|
|
|
2560
3832
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2561
3833
|
if @api_client.config.debugging
|
|
2562
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
3834
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_page_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2563
3835
|
end
|
|
2564
3836
|
return data, status_code, headers
|
|
2565
3837
|
end
|
|
2566
3838
|
|
|
2567
|
-
#
|
|
2568
|
-
#
|
|
3839
|
+
# Replace a page's selectors
|
|
3840
|
+
# Each list you send replaces that whole set, and an empty list clears it. A list you leave out is not touched. The page's items or blog posts are recalculated from the new selectors straight away. While a page has item selectors its items cannot be assigned by hand. Always needs sfvb_publish.
|
|
2569
3841
|
# @param storefront_oid [Integer]
|
|
2570
|
-
# @param path [String] Page path, for example /
|
|
2571
|
-
# @param
|
|
3842
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
3843
|
+
# @param page_selectors_request [SfvbPageSelectors] The selector sets to replace
|
|
2572
3844
|
# @param [Hash] opts the optional parameters
|
|
2573
|
-
# @return [
|
|
2574
|
-
def
|
|
2575
|
-
data, _status_code, _headers =
|
|
3845
|
+
# @return [SfvbPageSelectors]
|
|
3846
|
+
def put_sfvb_page_selectors(storefront_oid, path, page_selectors_request, opts = {})
|
|
3847
|
+
data, _status_code, _headers = put_sfvb_page_selectors_with_http_info(storefront_oid, path, page_selectors_request, opts)
|
|
2576
3848
|
data
|
|
2577
3849
|
end
|
|
2578
3850
|
|
|
2579
|
-
#
|
|
2580
|
-
#
|
|
3851
|
+
# Replace a page's selectors
|
|
3852
|
+
# Each list you send replaces that whole set, and an empty list clears it. A list you leave out is not touched. The page's items or blog posts are recalculated from the new selectors straight away. While a page has item selectors its items cannot be assigned by hand. Always needs sfvb_publish.
|
|
2581
3853
|
# @param storefront_oid [Integer]
|
|
2582
|
-
# @param path [String] Page path, for example /
|
|
2583
|
-
# @param
|
|
3854
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
3855
|
+
# @param page_selectors_request [SfvbPageSelectors] The selector sets to replace
|
|
2584
3856
|
# @param [Hash] opts the optional parameters
|
|
2585
|
-
# @return [Array<(
|
|
2586
|
-
def
|
|
3857
|
+
# @return [Array<(SfvbPageSelectors, Integer, Hash)>] SfvbPageSelectors data, response status code and response headers
|
|
3858
|
+
def put_sfvb_page_selectors_with_http_info(storefront_oid, path, page_selectors_request, opts = {})
|
|
2587
3859
|
if @api_client.config.debugging
|
|
2588
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
3860
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_page_selectors ...'
|
|
2589
3861
|
end
|
|
2590
3862
|
# verify the required parameter 'storefront_oid' is set
|
|
2591
3863
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2592
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
3864
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_page_selectors"
|
|
2593
3865
|
end
|
|
2594
3866
|
# verify the required parameter 'path' is set
|
|
2595
3867
|
if @api_client.config.client_side_validation && path.nil?
|
|
2596
|
-
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.
|
|
3868
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.put_sfvb_page_selectors"
|
|
2597
3869
|
end
|
|
2598
|
-
# verify the required parameter '
|
|
2599
|
-
if @api_client.config.client_side_validation &&
|
|
2600
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3870
|
+
# verify the required parameter 'page_selectors_request' is set
|
|
3871
|
+
if @api_client.config.client_side_validation && page_selectors_request.nil?
|
|
3872
|
+
fail ArgumentError, "Missing the required parameter 'page_selectors_request' when calling SfvbApi.put_sfvb_page_selectors"
|
|
2601
3873
|
end
|
|
2602
3874
|
# resource path
|
|
2603
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/
|
|
3875
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/selectors'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2604
3876
|
|
|
2605
3877
|
# query parameters
|
|
2606
3878
|
query_params = opts[:query_params] || {}
|
|
@@ -2612,7 +3884,7 @@ module UltracartClient
|
|
|
2612
3884
|
# HTTP header 'Accept' (if needed)
|
|
2613
3885
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2614
3886
|
# HTTP header 'Content-Type'
|
|
2615
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3887
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
2616
3888
|
if !content_type.nil?
|
|
2617
3889
|
header_params['Content-Type'] = content_type
|
|
2618
3890
|
end
|
|
@@ -2621,16 +3893,16 @@ module UltracartClient
|
|
|
2621
3893
|
form_params = opts[:form_params] || {}
|
|
2622
3894
|
|
|
2623
3895
|
# http body (model)
|
|
2624
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3896
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_selectors_request)
|
|
2625
3897
|
|
|
2626
3898
|
# return_type
|
|
2627
|
-
return_type = opts[:debug_return_type] || '
|
|
3899
|
+
return_type = opts[:debug_return_type] || 'SfvbPageSelectors'
|
|
2628
3900
|
|
|
2629
3901
|
# auth_names
|
|
2630
3902
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2631
3903
|
|
|
2632
3904
|
new_options = opts.merge(
|
|
2633
|
-
:operation => :"SfvbApi.
|
|
3905
|
+
:operation => :"SfvbApi.put_sfvb_page_selectors",
|
|
2634
3906
|
:header_params => header_params,
|
|
2635
3907
|
:query_params => query_params,
|
|
2636
3908
|
:form_params => form_params,
|
|
@@ -2641,48 +3913,48 @@ module UltracartClient
|
|
|
2641
3913
|
|
|
2642
3914
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2643
3915
|
if @api_client.config.debugging
|
|
2644
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
3916
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_page_selectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2645
3917
|
end
|
|
2646
3918
|
return data, status_code, headers
|
|
2647
3919
|
end
|
|
2648
3920
|
|
|
2649
|
-
#
|
|
2650
|
-
#
|
|
3921
|
+
# Change a page's settings
|
|
3922
|
+
# A partial update. Only the fields you send change - title, description, templates, visibility, sitemap exclusion, sort orders, items per page and page type. Unlike the store admin's page save, the page's attributes, images, items, selectors and permissions are left exactly as they are. Fields that would move or rename the page, and fields this endpoint does not know, are refused. The root page cannot be hidden. Always needs sfvb_publish, because page settings are live.
|
|
2651
3923
|
# @param storefront_oid [Integer]
|
|
2652
|
-
# @param path [String] Page path, for example /
|
|
2653
|
-
# @param
|
|
3924
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
3925
|
+
# @param page_settings_request [SfvbPageSettingsRequest] The settings to change
|
|
2654
3926
|
# @param [Hash] opts the optional parameters
|
|
2655
3927
|
# @return [SfvbPageResponse]
|
|
2656
|
-
def
|
|
2657
|
-
data, _status_code, _headers =
|
|
3928
|
+
def put_sfvb_page_settings(storefront_oid, path, page_settings_request, opts = {})
|
|
3929
|
+
data, _status_code, _headers = put_sfvb_page_settings_with_http_info(storefront_oid, path, page_settings_request, opts)
|
|
2658
3930
|
data
|
|
2659
3931
|
end
|
|
2660
3932
|
|
|
2661
|
-
#
|
|
2662
|
-
#
|
|
3933
|
+
# Change a page's settings
|
|
3934
|
+
# A partial update. Only the fields you send change - title, description, templates, visibility, sitemap exclusion, sort orders, items per page and page type. Unlike the store admin's page save, the page's attributes, images, items, selectors and permissions are left exactly as they are. Fields that would move or rename the page, and fields this endpoint does not know, are refused. The root page cannot be hidden. Always needs sfvb_publish, because page settings are live.
|
|
2663
3935
|
# @param storefront_oid [Integer]
|
|
2664
|
-
# @param path [String] Page path, for example /
|
|
2665
|
-
# @param
|
|
3936
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
3937
|
+
# @param page_settings_request [SfvbPageSettingsRequest] The settings to change
|
|
2666
3938
|
# @param [Hash] opts the optional parameters
|
|
2667
3939
|
# @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
|
|
2668
|
-
def
|
|
3940
|
+
def put_sfvb_page_settings_with_http_info(storefront_oid, path, page_settings_request, opts = {})
|
|
2669
3941
|
if @api_client.config.debugging
|
|
2670
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
3942
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_page_settings ...'
|
|
2671
3943
|
end
|
|
2672
3944
|
# verify the required parameter 'storefront_oid' is set
|
|
2673
3945
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2674
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
3946
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_page_settings"
|
|
2675
3947
|
end
|
|
2676
3948
|
# verify the required parameter 'path' is set
|
|
2677
3949
|
if @api_client.config.client_side_validation && path.nil?
|
|
2678
|
-
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.
|
|
3950
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.put_sfvb_page_settings"
|
|
2679
3951
|
end
|
|
2680
|
-
# verify the required parameter '
|
|
2681
|
-
if @api_client.config.client_side_validation &&
|
|
2682
|
-
fail ArgumentError, "Missing the required parameter '
|
|
3952
|
+
# verify the required parameter 'page_settings_request' is set
|
|
3953
|
+
if @api_client.config.client_side_validation && page_settings_request.nil?
|
|
3954
|
+
fail ArgumentError, "Missing the required parameter 'page_settings_request' when calling SfvbApi.put_sfvb_page_settings"
|
|
2683
3955
|
end
|
|
2684
3956
|
# resource path
|
|
2685
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/
|
|
3957
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/settings'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2686
3958
|
|
|
2687
3959
|
# query parameters
|
|
2688
3960
|
query_params = opts[:query_params] || {}
|
|
@@ -2694,7 +3966,7 @@ module UltracartClient
|
|
|
2694
3966
|
# HTTP header 'Accept' (if needed)
|
|
2695
3967
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2696
3968
|
# HTTP header 'Content-Type'
|
|
2697
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3969
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
2698
3970
|
if !content_type.nil?
|
|
2699
3971
|
header_params['Content-Type'] = content_type
|
|
2700
3972
|
end
|
|
@@ -2703,7 +3975,7 @@ module UltracartClient
|
|
|
2703
3975
|
form_params = opts[:form_params] || {}
|
|
2704
3976
|
|
|
2705
3977
|
# http body (model)
|
|
2706
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
3978
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_settings_request)
|
|
2707
3979
|
|
|
2708
3980
|
# return_type
|
|
2709
3981
|
return_type = opts[:debug_return_type] || 'SfvbPageResponse'
|
|
@@ -2712,7 +3984,7 @@ module UltracartClient
|
|
|
2712
3984
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2713
3985
|
|
|
2714
3986
|
new_options = opts.merge(
|
|
2715
|
-
:operation => :"SfvbApi.
|
|
3987
|
+
:operation => :"SfvbApi.put_sfvb_page_settings",
|
|
2716
3988
|
:header_params => header_params,
|
|
2717
3989
|
:query_params => query_params,
|
|
2718
3990
|
:form_params => form_params,
|
|
@@ -2723,7 +3995,7 @@ module UltracartClient
|
|
|
2723
3995
|
|
|
2724
3996
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2725
3997
|
if @api_client.config.debugging
|
|
2726
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
3998
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_page_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2727
3999
|
end
|
|
2728
4000
|
return data, status_code, headers
|
|
2729
4001
|
end
|
|
@@ -2968,6 +4240,170 @@ module UltracartClient
|
|
|
2968
4240
|
return data, status_code, headers
|
|
2969
4241
|
end
|
|
2970
4242
|
|
|
4243
|
+
# Take blog posts off a page
|
|
4244
|
+
# Removes posts by blog_post_oid, at most 500 at a time. Every oid must be on the page, and one that is not changes nothing. The posts themselves are not touched. Always needs sfvb_publish.
|
|
4245
|
+
# @param storefront_oid [Integer]
|
|
4246
|
+
# @param path [String] Page path, for example /blog/
|
|
4247
|
+
# @param page_blog_posts_request [SfvbPageBlogPostsRequest] Blog posts to take off the page
|
|
4248
|
+
# @param [Hash] opts the optional parameters
|
|
4249
|
+
# @return [SfvbPageBlogPostsResponse]
|
|
4250
|
+
def remove_sfvb_page_blog_posts(storefront_oid, path, page_blog_posts_request, opts = {})
|
|
4251
|
+
data, _status_code, _headers = remove_sfvb_page_blog_posts_with_http_info(storefront_oid, path, page_blog_posts_request, opts)
|
|
4252
|
+
data
|
|
4253
|
+
end
|
|
4254
|
+
|
|
4255
|
+
# Take blog posts off a page
|
|
4256
|
+
# Removes posts by blog_post_oid, at most 500 at a time. Every oid must be on the page, and one that is not changes nothing. The posts themselves are not touched. Always needs sfvb_publish.
|
|
4257
|
+
# @param storefront_oid [Integer]
|
|
4258
|
+
# @param path [String] Page path, for example /blog/
|
|
4259
|
+
# @param page_blog_posts_request [SfvbPageBlogPostsRequest] Blog posts to take off the page
|
|
4260
|
+
# @param [Hash] opts the optional parameters
|
|
4261
|
+
# @return [Array<(SfvbPageBlogPostsResponse, Integer, Hash)>] SfvbPageBlogPostsResponse data, response status code and response headers
|
|
4262
|
+
def remove_sfvb_page_blog_posts_with_http_info(storefront_oid, path, page_blog_posts_request, opts = {})
|
|
4263
|
+
if @api_client.config.debugging
|
|
4264
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.remove_sfvb_page_blog_posts ...'
|
|
4265
|
+
end
|
|
4266
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4267
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4268
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.remove_sfvb_page_blog_posts"
|
|
4269
|
+
end
|
|
4270
|
+
# verify the required parameter 'path' is set
|
|
4271
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
4272
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.remove_sfvb_page_blog_posts"
|
|
4273
|
+
end
|
|
4274
|
+
# verify the required parameter 'page_blog_posts_request' is set
|
|
4275
|
+
if @api_client.config.client_side_validation && page_blog_posts_request.nil?
|
|
4276
|
+
fail ArgumentError, "Missing the required parameter 'page_blog_posts_request' when calling SfvbApi.remove_sfvb_page_blog_posts"
|
|
4277
|
+
end
|
|
4278
|
+
# resource path
|
|
4279
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/blog_posts/remove'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4280
|
+
|
|
4281
|
+
# query parameters
|
|
4282
|
+
query_params = opts[:query_params] || {}
|
|
4283
|
+
query_params[:'path'] = path
|
|
4284
|
+
|
|
4285
|
+
# header parameters
|
|
4286
|
+
header_params = opts[:header_params] || {}
|
|
4287
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4288
|
+
# HTTP header 'Accept' (if needed)
|
|
4289
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4290
|
+
# HTTP header 'Content-Type'
|
|
4291
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
4292
|
+
if !content_type.nil?
|
|
4293
|
+
header_params['Content-Type'] = content_type
|
|
4294
|
+
end
|
|
4295
|
+
|
|
4296
|
+
# form parameters
|
|
4297
|
+
form_params = opts[:form_params] || {}
|
|
4298
|
+
|
|
4299
|
+
# http body (model)
|
|
4300
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_blog_posts_request)
|
|
4301
|
+
|
|
4302
|
+
# return_type
|
|
4303
|
+
return_type = opts[:debug_return_type] || 'SfvbPageBlogPostsResponse'
|
|
4304
|
+
|
|
4305
|
+
# auth_names
|
|
4306
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4307
|
+
|
|
4308
|
+
new_options = opts.merge(
|
|
4309
|
+
:operation => :"SfvbApi.remove_sfvb_page_blog_posts",
|
|
4310
|
+
:header_params => header_params,
|
|
4311
|
+
:query_params => query_params,
|
|
4312
|
+
:form_params => form_params,
|
|
4313
|
+
:body => post_body,
|
|
4314
|
+
:auth_names => auth_names,
|
|
4315
|
+
:return_type => return_type
|
|
4316
|
+
)
|
|
4317
|
+
|
|
4318
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4319
|
+
if @api_client.config.debugging
|
|
4320
|
+
@api_client.config.logger.debug "API called: SfvbApi#remove_sfvb_page_blog_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4321
|
+
end
|
|
4322
|
+
return data, status_code, headers
|
|
4323
|
+
end
|
|
4324
|
+
|
|
4325
|
+
# Take items off a page
|
|
4326
|
+
# Removes items by item id, at most 500 at a time. Every id must be on the page, and one that is not changes nothing. The items themselves are not touched. Refused on a page whose selectors choose its items. Always needs sfvb_publish.
|
|
4327
|
+
# @param storefront_oid [Integer]
|
|
4328
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
4329
|
+
# @param page_items_remove_request [SfvbPageItemsRemoveRequest] Items to take off the page
|
|
4330
|
+
# @param [Hash] opts the optional parameters
|
|
4331
|
+
# @return [SfvbPageItemsResponse]
|
|
4332
|
+
def remove_sfvb_page_items(storefront_oid, path, page_items_remove_request, opts = {})
|
|
4333
|
+
data, _status_code, _headers = remove_sfvb_page_items_with_http_info(storefront_oid, path, page_items_remove_request, opts)
|
|
4334
|
+
data
|
|
4335
|
+
end
|
|
4336
|
+
|
|
4337
|
+
# Take items off a page
|
|
4338
|
+
# Removes items by item id, at most 500 at a time. Every id must be on the page, and one that is not changes nothing. The items themselves are not touched. Refused on a page whose selectors choose its items. Always needs sfvb_publish.
|
|
4339
|
+
# @param storefront_oid [Integer]
|
|
4340
|
+
# @param path [String] Page path, for example /lp/spring-sale/
|
|
4341
|
+
# @param page_items_remove_request [SfvbPageItemsRemoveRequest] Items to take off the page
|
|
4342
|
+
# @param [Hash] opts the optional parameters
|
|
4343
|
+
# @return [Array<(SfvbPageItemsResponse, Integer, Hash)>] SfvbPageItemsResponse data, response status code and response headers
|
|
4344
|
+
def remove_sfvb_page_items_with_http_info(storefront_oid, path, page_items_remove_request, opts = {})
|
|
4345
|
+
if @api_client.config.debugging
|
|
4346
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.remove_sfvb_page_items ...'
|
|
4347
|
+
end
|
|
4348
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4349
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4350
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.remove_sfvb_page_items"
|
|
4351
|
+
end
|
|
4352
|
+
# verify the required parameter 'path' is set
|
|
4353
|
+
if @api_client.config.client_side_validation && path.nil?
|
|
4354
|
+
fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.remove_sfvb_page_items"
|
|
4355
|
+
end
|
|
4356
|
+
# verify the required parameter 'page_items_remove_request' is set
|
|
4357
|
+
if @api_client.config.client_side_validation && page_items_remove_request.nil?
|
|
4358
|
+
fail ArgumentError, "Missing the required parameter 'page_items_remove_request' when calling SfvbApi.remove_sfvb_page_items"
|
|
4359
|
+
end
|
|
4360
|
+
# resource path
|
|
4361
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/items/remove'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4362
|
+
|
|
4363
|
+
# query parameters
|
|
4364
|
+
query_params = opts[:query_params] || {}
|
|
4365
|
+
query_params[:'path'] = path
|
|
4366
|
+
|
|
4367
|
+
# header parameters
|
|
4368
|
+
header_params = opts[:header_params] || {}
|
|
4369
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4370
|
+
# HTTP header 'Accept' (if needed)
|
|
4371
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4372
|
+
# HTTP header 'Content-Type'
|
|
4373
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
4374
|
+
if !content_type.nil?
|
|
4375
|
+
header_params['Content-Type'] = content_type
|
|
4376
|
+
end
|
|
4377
|
+
|
|
4378
|
+
# form parameters
|
|
4379
|
+
form_params = opts[:form_params] || {}
|
|
4380
|
+
|
|
4381
|
+
# http body (model)
|
|
4382
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(page_items_remove_request)
|
|
4383
|
+
|
|
4384
|
+
# return_type
|
|
4385
|
+
return_type = opts[:debug_return_type] || 'SfvbPageItemsResponse'
|
|
4386
|
+
|
|
4387
|
+
# auth_names
|
|
4388
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4389
|
+
|
|
4390
|
+
new_options = opts.merge(
|
|
4391
|
+
:operation => :"SfvbApi.remove_sfvb_page_items",
|
|
4392
|
+
:header_params => header_params,
|
|
4393
|
+
:query_params => query_params,
|
|
4394
|
+
:form_params => form_params,
|
|
4395
|
+
:body => post_body,
|
|
4396
|
+
:auth_names => auth_names,
|
|
4397
|
+
:return_type => return_type
|
|
4398
|
+
)
|
|
4399
|
+
|
|
4400
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4401
|
+
if @api_client.config.debugging
|
|
4402
|
+
@api_client.config.logger.debug "API called: SfvbApi#remove_sfvb_page_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4403
|
+
end
|
|
4404
|
+
return data, status_code, headers
|
|
4405
|
+
end
|
|
4406
|
+
|
|
2971
4407
|
# Render a CJSON node to HTML
|
|
2972
4408
|
# 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.
|
|
2973
4409
|
# @param storefront_oid [Integer]
|
|
@@ -3446,6 +4882,81 @@ module UltracartClient
|
|
|
3446
4882
|
return data, status_code, headers
|
|
3447
4883
|
end
|
|
3448
4884
|
|
|
4885
|
+
# Start an experiment
|
|
4886
|
+
# type page starts an experiment element already saved in a page body - send path, slot and widget_id, and its name, objective, duration and variations are read from the element with the builder's rules (2 to 5 variations numbered 0 up with no gaps, 3 to 90 days, traffic on all or none adding up to 100). The new id is written into the element and the body is saved, so pull it again before the next edit. type url splits visitors between existing pages at router_url, and always ends by itself after duration_days. Always needs sfvb_publish, because visitors are split as soon as it starts.
|
|
4887
|
+
# @param storefront_oid [Integer]
|
|
4888
|
+
# @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
|
|
4889
|
+
# @param [Hash] opts the optional parameters
|
|
4890
|
+
# @return [SfvbExperiment]
|
|
4891
|
+
def start_sfvb_experiment(storefront_oid, experiment_start_request, opts = {})
|
|
4892
|
+
data, _status_code, _headers = start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts)
|
|
4893
|
+
data
|
|
4894
|
+
end
|
|
4895
|
+
|
|
4896
|
+
# Start an experiment
|
|
4897
|
+
# type page starts an experiment element already saved in a page body - send path, slot and widget_id, and its name, objective, duration and variations are read from the element with the builder's rules (2 to 5 variations numbered 0 up with no gaps, 3 to 90 days, traffic on all or none adding up to 100). The new id is written into the element and the body is saved, so pull it again before the next edit. type url splits visitors between existing pages at router_url, and always ends by itself after duration_days. Always needs sfvb_publish, because visitors are split as soon as it starts.
|
|
4898
|
+
# @param storefront_oid [Integer]
|
|
4899
|
+
# @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
|
|
4900
|
+
# @param [Hash] opts the optional parameters
|
|
4901
|
+
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
4902
|
+
def start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts = {})
|
|
4903
|
+
if @api_client.config.debugging
|
|
4904
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.start_sfvb_experiment ...'
|
|
4905
|
+
end
|
|
4906
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4907
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4908
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.start_sfvb_experiment"
|
|
4909
|
+
end
|
|
4910
|
+
# verify the required parameter 'experiment_start_request' is set
|
|
4911
|
+
if @api_client.config.client_side_validation && experiment_start_request.nil?
|
|
4912
|
+
fail ArgumentError, "Missing the required parameter 'experiment_start_request' when calling SfvbApi.start_sfvb_experiment"
|
|
4913
|
+
end
|
|
4914
|
+
# resource path
|
|
4915
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4916
|
+
|
|
4917
|
+
# query parameters
|
|
4918
|
+
query_params = opts[:query_params] || {}
|
|
4919
|
+
|
|
4920
|
+
# header parameters
|
|
4921
|
+
header_params = opts[:header_params] || {}
|
|
4922
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4923
|
+
# HTTP header 'Accept' (if needed)
|
|
4924
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4925
|
+
# HTTP header 'Content-Type'
|
|
4926
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
4927
|
+
if !content_type.nil?
|
|
4928
|
+
header_params['Content-Type'] = content_type
|
|
4929
|
+
end
|
|
4930
|
+
|
|
4931
|
+
# form parameters
|
|
4932
|
+
form_params = opts[:form_params] || {}
|
|
4933
|
+
|
|
4934
|
+
# http body (model)
|
|
4935
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_start_request)
|
|
4936
|
+
|
|
4937
|
+
# return_type
|
|
4938
|
+
return_type = opts[:debug_return_type] || 'SfvbExperiment'
|
|
4939
|
+
|
|
4940
|
+
# auth_names
|
|
4941
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4942
|
+
|
|
4943
|
+
new_options = opts.merge(
|
|
4944
|
+
:operation => :"SfvbApi.start_sfvb_experiment",
|
|
4945
|
+
:header_params => header_params,
|
|
4946
|
+
:query_params => query_params,
|
|
4947
|
+
:form_params => form_params,
|
|
4948
|
+
:body => post_body,
|
|
4949
|
+
:auth_names => auth_names,
|
|
4950
|
+
:return_type => return_type
|
|
4951
|
+
)
|
|
4952
|
+
|
|
4953
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
4954
|
+
if @api_client.config.debugging
|
|
4955
|
+
@api_client.config.logger.debug "API called: SfvbApi#start_sfvb_experiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4956
|
+
end
|
|
4957
|
+
return data, status_code, headers
|
|
4958
|
+
end
|
|
4959
|
+
|
|
3449
4960
|
# Store a binary asset that was already uploaded
|
|
3450
4961
|
# The second half of the two step upload. The bytes are fetched from the key, checked against the extension they claim to be, and written exactly as a text write is - so the same If-Match precondition, the same read only refusal and the same publish gate apply. An SVG is sanitized before it is stored. Writing outside /themes/ requires sfvb_publish, because anything served off the storefront root is live by definition.
|
|
3451
4962
|
# @param storefront_oid [Integer]
|