ultracart_api 4.1.136 → 4.1.140
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 +87 -2
- data/docs/ChannelPartnerOrder.md +2 -0
- data/docs/ConversationApi.md +52 -0
- data/docs/ConversationPbxPayConnector.md +32 -0
- data/docs/ConversationPbxPayConnectorsResponse.md +26 -0
- data/docs/OrderChannelPartner.md +2 -0
- data/docs/SfvbApi.md +1933 -0
- data/docs/SfvbCompileRequest.md +26 -0
- data/docs/SfvbCompileResponse.md +28 -0
- data/docs/SfvbContainerResponse.md +36 -0
- data/docs/SfvbContainerRevertRequest.md +20 -0
- data/docs/SfvbContainerVersion.md +40 -0
- data/docs/SfvbContainerVersionsResponse.md +18 -0
- data/docs/SfvbContainerWriteRequest.md +24 -0
- data/docs/SfvbElement.md +20 -0
- data/docs/SfvbElementSchemaResponse.md +20 -0
- data/docs/SfvbElementsResponse.md +22 -0
- data/docs/SfvbErrorDetail.md +36 -0
- data/docs/SfvbFileContentResponse.md +38 -0
- data/docs/SfvbFileEntry.md +46 -0
- data/docs/SfvbFileRevertRequest.md +22 -0
- data/docs/SfvbFileSearchRequest.md +48 -0
- data/docs/SfvbFileSearchResponse.md +32 -0
- data/docs/SfvbFileVersion.md +34 -0
- data/docs/SfvbFileVersionsResponse.md +22 -0
- data/docs/SfvbFileWriteRequest.md +22 -0
- data/docs/SfvbFileWriteResponse.md +28 -0
- data/docs/SfvbFilesResponse.md +28 -0
- data/docs/SfvbLibraryEntry.md +38 -0
- data/docs/SfvbLibraryFacet.md +22 -0
- data/docs/SfvbLibraryResponse.md +28 -0
- data/docs/SfvbPreviewSessionRequest.md +20 -0
- data/docs/SfvbPreviewSessionResponse.md +30 -0
- data/docs/SfvbPreviewUrlResponse.md +30 -0
- data/docs/SfvbRenderRequest.md +40 -0
- data/docs/SfvbRenderResponse.md +28 -0
- data/docs/SfvbStorefront.md +22 -0
- data/docs/SfvbStorefrontsResponse.md +18 -0
- data/docs/SfvbTheme.md +36 -0
- data/docs/SfvbThemeDuplicateRequest.md +22 -0
- data/docs/SfvbThemeJobResponse.md +40 -0
- data/docs/SfvbThemesResponse.md +20 -0
- data/docs/SfvbUpsellOffer.md +34 -0
- data/docs/SfvbUpsellOffersResponse.md +18 -0
- data/docs/SfvbValidateRequest.md +26 -0
- data/docs/SfvbValidationResponse.md +24 -0
- data/docs/SfvbVelocityValidateRequest.md +20 -0
- data/docs/SfvbVersionResponse.md +36 -0
- data/docs/SfvbWhoamiResponse.md +36 -0
- data/docs/SfvbWidgetIdsResponse.md +22 -0
- data/lib/ultracart_api/api/conversation_api.rb +58 -0
- data/lib/ultracart_api/api/sfvb_api.rb +2565 -0
- data/lib/ultracart_api/models/channel_partner_order.rb +13 -1
- data/lib/ultracart_api/models/conversation_pbx_pay_connector.rb +426 -0
- data/lib/ultracart_api/models/conversation_pbx_pay_connectors_response.rb +258 -0
- data/lib/ultracart_api/models/order_channel_partner.rb +13 -1
- data/lib/ultracart_api/models/sfvb_compile_request.rb +260 -0
- data/lib/ultracart_api/models/sfvb_compile_response.rb +273 -0
- data/lib/ultracart_api/models/sfvb_container_response.rb +344 -0
- data/lib/ultracart_api/models/sfvb_container_revert_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_container_version.rb +376 -0
- data/lib/ultracart_api/models/sfvb_container_versions_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_container_write_request.rb +250 -0
- data/lib/ultracart_api/models/sfvb_element.rb +230 -0
- data/lib/ultracart_api/models/sfvb_element_schema_response.rb +230 -0
- data/lib/ultracart_api/models/sfvb_elements_response.rb +242 -0
- data/lib/ultracart_api/models/sfvb_error_detail.rb +346 -0
- data/lib/ultracart_api/models/sfvb_file_content_response.rb +320 -0
- data/lib/ultracart_api/models/sfvb_file_entry.rb +360 -0
- data/lib/ultracart_api/models/sfvb_file_revert_request.rb +240 -0
- data/lib/ultracart_api/models/sfvb_file_search_request.rb +370 -0
- data/lib/ultracart_api/models/sfvb_file_search_response.rb +292 -0
- data/lib/ultracart_api/models/sfvb_file_version.rb +300 -0
- data/lib/ultracart_api/models/sfvb_file_versions_response.rb +242 -0
- data/lib/ultracart_api/models/sfvb_file_write_request.rb +240 -0
- data/lib/ultracart_api/models/sfvb_file_write_response.rb +268 -0
- data/lib/ultracart_api/models/sfvb_files_response.rb +272 -0
- data/lib/ultracart_api/models/sfvb_library_entry.rb +322 -0
- data/lib/ultracart_api/models/sfvb_library_facet.rb +242 -0
- data/lib/ultracart_api/models/sfvb_library_response.rb +274 -0
- data/lib/ultracart_api/models/sfvb_preview_session_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_preview_session_response.rb +284 -0
- data/lib/ultracart_api/models/sfvb_preview_url_response.rb +280 -0
- data/lib/ultracart_api/models/sfvb_render_request.rb +330 -0
- data/lib/ultracart_api/models/sfvb_render_response.rb +274 -0
- data/lib/ultracart_api/models/sfvb_storefront.rb +240 -0
- data/lib/ultracart_api/models/sfvb_storefronts_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_theme.rb +310 -0
- data/lib/ultracart_api/models/sfvb_theme_duplicate_request.rb +240 -0
- data/lib/ultracart_api/models/sfvb_theme_job_response.rb +364 -0
- data/lib/ultracart_api/models/sfvb_themes_response.rb +232 -0
- data/lib/ultracart_api/models/sfvb_upsell_offer.rb +300 -0
- data/lib/ultracart_api/models/sfvb_upsell_offers_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_validate_request.rb +294 -0
- data/lib/ultracart_api/models/sfvb_validation_response.rb +256 -0
- data/lib/ultracart_api/models/sfvb_velocity_validate_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_version_response.rb +344 -0
- data/lib/ultracart_api/models/sfvb_whoami_response.rb +314 -0
- data/lib/ultracart_api/models/sfvb_widget_ids_response.rb +242 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +46 -0
- metadata +94 -2
|
@@ -0,0 +1,2565 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module UltracartClient
|
|
16
|
+
class SfvbApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
|
|
24
|
+
api_config = Configuration.new
|
|
25
|
+
api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
|
|
26
|
+
api_config.api_version = '2017-03-01'
|
|
27
|
+
api_config.verify_ssl = verify_ssl
|
|
28
|
+
|
|
29
|
+
api_client = ApiClient.new(api_config)
|
|
30
|
+
api_client.config.debugging = debugging
|
|
31
|
+
|
|
32
|
+
UltracartClient::SfvbApi.new(api_client)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Compile CJSON to Velocity
|
|
36
|
+
# 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
|
+
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [SfvbCompileResponse]
|
|
40
|
+
def compile_sfvb_cjson(compile_request, opts = {})
|
|
41
|
+
data, _status_code, _headers = compile_sfvb_cjson_with_http_info(compile_request, opts)
|
|
42
|
+
data
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Compile CJSON to Velocity
|
|
46
|
+
# 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.
|
|
47
|
+
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @return [Array<(SfvbCompileResponse, Integer, Hash)>] SfvbCompileResponse data, response status code and response headers
|
|
50
|
+
def compile_sfvb_cjson_with_http_info(compile_request, opts = {})
|
|
51
|
+
if @api_client.config.debugging
|
|
52
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.compile_sfvb_cjson ...'
|
|
53
|
+
end
|
|
54
|
+
# verify the required parameter 'compile_request' is set
|
|
55
|
+
if @api_client.config.client_side_validation && compile_request.nil?
|
|
56
|
+
fail ArgumentError, "Missing the required parameter 'compile_request' when calling SfvbApi.compile_sfvb_cjson"
|
|
57
|
+
end
|
|
58
|
+
# resource path
|
|
59
|
+
local_var_path = '/sfvb/cjson/compile'
|
|
60
|
+
|
|
61
|
+
# query parameters
|
|
62
|
+
query_params = opts[:query_params] || {}
|
|
63
|
+
|
|
64
|
+
# header parameters
|
|
65
|
+
header_params = opts[:header_params] || {}
|
|
66
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
67
|
+
# HTTP header 'Accept' (if needed)
|
|
68
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
69
|
+
# HTTP header 'Content-Type'
|
|
70
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
71
|
+
if !content_type.nil?
|
|
72
|
+
header_params['Content-Type'] = content_type
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# form parameters
|
|
76
|
+
form_params = opts[:form_params] || {}
|
|
77
|
+
|
|
78
|
+
# http body (model)
|
|
79
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(compile_request)
|
|
80
|
+
|
|
81
|
+
# return_type
|
|
82
|
+
return_type = opts[:debug_return_type] || 'SfvbCompileResponse'
|
|
83
|
+
|
|
84
|
+
# auth_names
|
|
85
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
86
|
+
|
|
87
|
+
new_options = opts.merge(
|
|
88
|
+
:operation => :"SfvbApi.compile_sfvb_cjson",
|
|
89
|
+
:header_params => header_params,
|
|
90
|
+
:query_params => query_params,
|
|
91
|
+
:form_params => form_params,
|
|
92
|
+
:body => post_body,
|
|
93
|
+
:auth_names => auth_names,
|
|
94
|
+
:return_type => return_type
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
98
|
+
if @api_client.config.debugging
|
|
99
|
+
@api_client.config.logger.debug "API called: SfvbApi#compile_sfvb_cjson\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
100
|
+
end
|
|
101
|
+
return data, status_code, headers
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Create a preview session
|
|
105
|
+
# Returns a server generated session id to push containers into. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor's habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
106
|
+
# @param storefront_oid [Integer]
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [SfvbPreviewSessionResponse]
|
|
109
|
+
def create_sfvb_preview_session(storefront_oid, opts = {})
|
|
110
|
+
data, _status_code, _headers = create_sfvb_preview_session_with_http_info(storefront_oid, opts)
|
|
111
|
+
data
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Create a preview session
|
|
115
|
+
# Returns a server generated session id to push containers into. The id is not caller supplied, because concurrent agents choosing their own would be free to collide, and the browser editor's habit of minting one with Math.random is not a property worth carrying into an API. Expires after eight hours and can be deleted sooner. Requires a token that resolves to a user, so use the device authorization flow.
|
|
116
|
+
# @param storefront_oid [Integer]
|
|
117
|
+
# @param [Hash] opts the optional parameters
|
|
118
|
+
# @return [Array<(SfvbPreviewSessionResponse, Integer, Hash)>] SfvbPreviewSessionResponse data, response status code and response headers
|
|
119
|
+
def create_sfvb_preview_session_with_http_info(storefront_oid, opts = {})
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.create_sfvb_preview_session ...'
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'storefront_oid' is set
|
|
124
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.create_sfvb_preview_session"
|
|
126
|
+
end
|
|
127
|
+
# resource path
|
|
128
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/preview_sessions'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
129
|
+
|
|
130
|
+
# query parameters
|
|
131
|
+
query_params = opts[:query_params] || {}
|
|
132
|
+
|
|
133
|
+
# header parameters
|
|
134
|
+
header_params = opts[:header_params] || {}
|
|
135
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
136
|
+
# HTTP header 'Accept' (if needed)
|
|
137
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
138
|
+
|
|
139
|
+
# form parameters
|
|
140
|
+
form_params = opts[:form_params] || {}
|
|
141
|
+
|
|
142
|
+
# http body (model)
|
|
143
|
+
post_body = opts[:debug_body]
|
|
144
|
+
|
|
145
|
+
# return_type
|
|
146
|
+
return_type = opts[:debug_return_type] || 'SfvbPreviewSessionResponse'
|
|
147
|
+
|
|
148
|
+
# auth_names
|
|
149
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
150
|
+
|
|
151
|
+
new_options = opts.merge(
|
|
152
|
+
:operation => :"SfvbApi.create_sfvb_preview_session",
|
|
153
|
+
:header_params => header_params,
|
|
154
|
+
:query_params => query_params,
|
|
155
|
+
:form_params => form_params,
|
|
156
|
+
:body => post_body,
|
|
157
|
+
:auth_names => auth_names,
|
|
158
|
+
:return_type => return_type
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
162
|
+
if @api_client.config.debugging
|
|
163
|
+
@api_client.config.logger.debug "API called: SfvbApi#create_sfvb_preview_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
164
|
+
end
|
|
165
|
+
return data, status_code, headers
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Delete a storefront file
|
|
169
|
+
# Recoverable from the recycle bin.
|
|
170
|
+
# @param storefront_oid [Integer]
|
|
171
|
+
# @param if_match [String] Content hash of the file being deleted. Required; 428 when absent, 412 when stale.
|
|
172
|
+
# @param [Hash] opts the optional parameters
|
|
173
|
+
# @option opts [String] :path
|
|
174
|
+
# @return [nil]
|
|
175
|
+
def delete_sfvb_file(storefront_oid, if_match, opts = {})
|
|
176
|
+
delete_sfvb_file_with_http_info(storefront_oid, if_match, opts)
|
|
177
|
+
nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Delete a storefront file
|
|
181
|
+
# Recoverable from the recycle bin.
|
|
182
|
+
# @param storefront_oid [Integer]
|
|
183
|
+
# @param if_match [String] Content hash of the file being deleted. Required; 428 when absent, 412 when stale.
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @option opts [String] :path
|
|
186
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
187
|
+
def delete_sfvb_file_with_http_info(storefront_oid, if_match, opts = {})
|
|
188
|
+
if @api_client.config.debugging
|
|
189
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_file ...'
|
|
190
|
+
end
|
|
191
|
+
# verify the required parameter 'storefront_oid' is set
|
|
192
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
193
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_file"
|
|
194
|
+
end
|
|
195
|
+
# verify the required parameter 'if_match' is set
|
|
196
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
197
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.delete_sfvb_file"
|
|
198
|
+
end
|
|
199
|
+
# resource path
|
|
200
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
201
|
+
|
|
202
|
+
# query parameters
|
|
203
|
+
query_params = opts[:query_params] || {}
|
|
204
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
205
|
+
|
|
206
|
+
# header parameters
|
|
207
|
+
header_params = opts[:header_params] || {}
|
|
208
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
209
|
+
# HTTP header 'Accept' (if needed)
|
|
210
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
211
|
+
header_params[:'If-Match'] = if_match
|
|
212
|
+
|
|
213
|
+
# form parameters
|
|
214
|
+
form_params = opts[:form_params] || {}
|
|
215
|
+
|
|
216
|
+
# http body (model)
|
|
217
|
+
post_body = opts[:debug_body]
|
|
218
|
+
|
|
219
|
+
# return_type
|
|
220
|
+
return_type = opts[:debug_return_type]
|
|
221
|
+
|
|
222
|
+
# auth_names
|
|
223
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
224
|
+
|
|
225
|
+
new_options = opts.merge(
|
|
226
|
+
:operation => :"SfvbApi.delete_sfvb_file",
|
|
227
|
+
:header_params => header_params,
|
|
228
|
+
:query_params => query_params,
|
|
229
|
+
:form_params => form_params,
|
|
230
|
+
:body => post_body,
|
|
231
|
+
:auth_names => auth_names,
|
|
232
|
+
:return_type => return_type
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
236
|
+
if @api_client.config.debugging
|
|
237
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
238
|
+
end
|
|
239
|
+
return data, status_code, headers
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Delete a preview session
|
|
243
|
+
# Releases the session before its eight hour expiry. Without this the only way to free one is to wait, which is a poor answer for a tool that may open a dozen in an afternoon.
|
|
244
|
+
# @param storefront_oid [Integer]
|
|
245
|
+
# @param preview_session_id [String]
|
|
246
|
+
# @param [Hash] opts the optional parameters
|
|
247
|
+
# @return [nil]
|
|
248
|
+
def delete_sfvb_preview_session(storefront_oid, preview_session_id, opts = {})
|
|
249
|
+
delete_sfvb_preview_session_with_http_info(storefront_oid, preview_session_id, opts)
|
|
250
|
+
nil
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Delete a preview session
|
|
254
|
+
# Releases the session before its eight hour expiry. Without this the only way to free one is to wait, which is a poor answer for a tool that may open a dozen in an afternoon.
|
|
255
|
+
# @param storefront_oid [Integer]
|
|
256
|
+
# @param preview_session_id [String]
|
|
257
|
+
# @param [Hash] opts the optional parameters
|
|
258
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
259
|
+
def delete_sfvb_preview_session_with_http_info(storefront_oid, preview_session_id, opts = {})
|
|
260
|
+
if @api_client.config.debugging
|
|
261
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_preview_session ...'
|
|
262
|
+
end
|
|
263
|
+
# verify the required parameter 'storefront_oid' is set
|
|
264
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
265
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_preview_session"
|
|
266
|
+
end
|
|
267
|
+
# verify the required parameter 'preview_session_id' is set
|
|
268
|
+
if @api_client.config.client_side_validation && preview_session_id.nil?
|
|
269
|
+
fail ArgumentError, "Missing the required parameter 'preview_session_id' when calling SfvbApi.delete_sfvb_preview_session"
|
|
270
|
+
end
|
|
271
|
+
# resource path
|
|
272
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'preview_session_id' + '}', CGI.escape(preview_session_id.to_s))
|
|
273
|
+
|
|
274
|
+
# query parameters
|
|
275
|
+
query_params = opts[:query_params] || {}
|
|
276
|
+
|
|
277
|
+
# header parameters
|
|
278
|
+
header_params = opts[:header_params] || {}
|
|
279
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
280
|
+
# HTTP header 'Accept' (if needed)
|
|
281
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
282
|
+
|
|
283
|
+
# form parameters
|
|
284
|
+
form_params = opts[:form_params] || {}
|
|
285
|
+
|
|
286
|
+
# http body (model)
|
|
287
|
+
post_body = opts[:debug_body]
|
|
288
|
+
|
|
289
|
+
# return_type
|
|
290
|
+
return_type = opts[:debug_return_type]
|
|
291
|
+
|
|
292
|
+
# auth_names
|
|
293
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
294
|
+
|
|
295
|
+
new_options = opts.merge(
|
|
296
|
+
:operation => :"SfvbApi.delete_sfvb_preview_session",
|
|
297
|
+
:header_params => header_params,
|
|
298
|
+
:query_params => query_params,
|
|
299
|
+
:form_params => form_params,
|
|
300
|
+
:body => post_body,
|
|
301
|
+
:auth_names => auth_names,
|
|
302
|
+
:return_type => return_type
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_preview_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
308
|
+
end
|
|
309
|
+
return data, status_code, headers
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Duplicate a theme
|
|
313
|
+
# 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.
|
|
314
|
+
# @param storefront_oid [Integer]
|
|
315
|
+
# @param theme_oid [Integer]
|
|
316
|
+
# @param duplicate_request [SfvbThemeDuplicateRequest] Theme duplication details
|
|
317
|
+
# @param [Hash] opts the optional parameters
|
|
318
|
+
# @return [SfvbThemeJobResponse]
|
|
319
|
+
def duplicate_sfvb_theme(storefront_oid, theme_oid, duplicate_request, opts = {})
|
|
320
|
+
data, _status_code, _headers = duplicate_sfvb_theme_with_http_info(storefront_oid, theme_oid, duplicate_request, opts)
|
|
321
|
+
data
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Duplicate a theme
|
|
325
|
+
# 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.
|
|
326
|
+
# @param storefront_oid [Integer]
|
|
327
|
+
# @param theme_oid [Integer]
|
|
328
|
+
# @param duplicate_request [SfvbThemeDuplicateRequest] Theme duplication details
|
|
329
|
+
# @param [Hash] opts the optional parameters
|
|
330
|
+
# @return [Array<(SfvbThemeJobResponse, Integer, Hash)>] SfvbThemeJobResponse data, response status code and response headers
|
|
331
|
+
def duplicate_sfvb_theme_with_http_info(storefront_oid, theme_oid, duplicate_request, opts = {})
|
|
332
|
+
if @api_client.config.debugging
|
|
333
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.duplicate_sfvb_theme ...'
|
|
334
|
+
end
|
|
335
|
+
# verify the required parameter 'storefront_oid' is set
|
|
336
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
337
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.duplicate_sfvb_theme"
|
|
338
|
+
end
|
|
339
|
+
# verify the required parameter 'theme_oid' is set
|
|
340
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
341
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.duplicate_sfvb_theme"
|
|
342
|
+
end
|
|
343
|
+
# verify the required parameter 'duplicate_request' is set
|
|
344
|
+
if @api_client.config.client_side_validation && duplicate_request.nil?
|
|
345
|
+
fail ArgumentError, "Missing the required parameter 'duplicate_request' when calling SfvbApi.duplicate_sfvb_theme"
|
|
346
|
+
end
|
|
347
|
+
# resource path
|
|
348
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/duplicate'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'theme_oid' + '}', CGI.escape(theme_oid.to_s))
|
|
349
|
+
|
|
350
|
+
# query parameters
|
|
351
|
+
query_params = opts[:query_params] || {}
|
|
352
|
+
|
|
353
|
+
# header parameters
|
|
354
|
+
header_params = opts[:header_params] || {}
|
|
355
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
356
|
+
# HTTP header 'Accept' (if needed)
|
|
357
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
358
|
+
# HTTP header 'Content-Type'
|
|
359
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
360
|
+
if !content_type.nil?
|
|
361
|
+
header_params['Content-Type'] = content_type
|
|
362
|
+
end
|
|
363
|
+
|
|
364
|
+
# form parameters
|
|
365
|
+
form_params = opts[:form_params] || {}
|
|
366
|
+
|
|
367
|
+
# http body (model)
|
|
368
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(duplicate_request)
|
|
369
|
+
|
|
370
|
+
# return_type
|
|
371
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeJobResponse'
|
|
372
|
+
|
|
373
|
+
# auth_names
|
|
374
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
375
|
+
|
|
376
|
+
new_options = opts.merge(
|
|
377
|
+
:operation => :"SfvbApi.duplicate_sfvb_theme",
|
|
378
|
+
:header_params => header_params,
|
|
379
|
+
:query_params => query_params,
|
|
380
|
+
:form_params => form_params,
|
|
381
|
+
:body => post_body,
|
|
382
|
+
:auth_names => auth_names,
|
|
383
|
+
:return_type => return_type
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
387
|
+
if @api_client.config.debugging
|
|
388
|
+
@api_client.config.logger.debug "API called: SfvbApi#duplicate_sfvb_theme\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
389
|
+
end
|
|
390
|
+
return data, status_code, headers
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Element types used by a container
|
|
394
|
+
# @param compile_request [SfvbCompileRequest] CJSON to inspect
|
|
395
|
+
# @param [Hash] opts the optional parameters
|
|
396
|
+
# @return [SfvbElementsResponse]
|
|
397
|
+
def get_sfvb_cjson_used_elements(compile_request, opts = {})
|
|
398
|
+
data, _status_code, _headers = get_sfvb_cjson_used_elements_with_http_info(compile_request, opts)
|
|
399
|
+
data
|
|
400
|
+
end
|
|
401
|
+
|
|
402
|
+
# Element types used by a container
|
|
403
|
+
# @param compile_request [SfvbCompileRequest] CJSON to inspect
|
|
404
|
+
# @param [Hash] opts the optional parameters
|
|
405
|
+
# @return [Array<(SfvbElementsResponse, Integer, Hash)>] SfvbElementsResponse data, response status code and response headers
|
|
406
|
+
def get_sfvb_cjson_used_elements_with_http_info(compile_request, opts = {})
|
|
407
|
+
if @api_client.config.debugging
|
|
408
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_cjson_used_elements ...'
|
|
409
|
+
end
|
|
410
|
+
# verify the required parameter 'compile_request' is set
|
|
411
|
+
if @api_client.config.client_side_validation && compile_request.nil?
|
|
412
|
+
fail ArgumentError, "Missing the required parameter 'compile_request' when calling SfvbApi.get_sfvb_cjson_used_elements"
|
|
413
|
+
end
|
|
414
|
+
# resource path
|
|
415
|
+
local_var_path = '/sfvb/cjson/elements'
|
|
416
|
+
|
|
417
|
+
# query parameters
|
|
418
|
+
query_params = opts[:query_params] || {}
|
|
419
|
+
|
|
420
|
+
# header parameters
|
|
421
|
+
header_params = opts[:header_params] || {}
|
|
422
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
423
|
+
# HTTP header 'Accept' (if needed)
|
|
424
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
425
|
+
# HTTP header 'Content-Type'
|
|
426
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
427
|
+
if !content_type.nil?
|
|
428
|
+
header_params['Content-Type'] = content_type
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# form parameters
|
|
432
|
+
form_params = opts[:form_params] || {}
|
|
433
|
+
|
|
434
|
+
# http body (model)
|
|
435
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(compile_request)
|
|
436
|
+
|
|
437
|
+
# return_type
|
|
438
|
+
return_type = opts[:debug_return_type] || 'SfvbElementsResponse'
|
|
439
|
+
|
|
440
|
+
# auth_names
|
|
441
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
442
|
+
|
|
443
|
+
new_options = opts.merge(
|
|
444
|
+
:operation => :"SfvbApi.get_sfvb_cjson_used_elements",
|
|
445
|
+
:header_params => header_params,
|
|
446
|
+
:query_params => query_params,
|
|
447
|
+
:form_params => form_params,
|
|
448
|
+
:body => post_body,
|
|
449
|
+
:auth_names => auth_names,
|
|
450
|
+
:return_type => return_type
|
|
451
|
+
)
|
|
452
|
+
|
|
453
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
454
|
+
if @api_client.config.debugging
|
|
455
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_cjson_used_elements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
456
|
+
end
|
|
457
|
+
return data, status_code, headers
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Read a container stored outside the file system
|
|
461
|
+
# owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
462
|
+
# @param storefront_oid [Integer]
|
|
463
|
+
# @param owner_type [String]
|
|
464
|
+
# @param owner_object_id [String]
|
|
465
|
+
# @param [Hash] opts the optional parameters
|
|
466
|
+
# @option opts [String] :container_name
|
|
467
|
+
# @return [SfvbContainerResponse]
|
|
468
|
+
def get_sfvb_container(storefront_oid, owner_type, owner_object_id, opts = {})
|
|
469
|
+
data, _status_code, _headers = get_sfvb_container_with_http_info(storefront_oid, owner_type, owner_object_id, opts)
|
|
470
|
+
data
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
# Read a container stored outside the file system
|
|
474
|
+
# owner_type is one of upsell, email, postcardfront, postcardback or item. Item containers also require container_name. Theme and page containers are files; read those through files/content.
|
|
475
|
+
# @param storefront_oid [Integer]
|
|
476
|
+
# @param owner_type [String]
|
|
477
|
+
# @param owner_object_id [String]
|
|
478
|
+
# @param [Hash] opts the optional parameters
|
|
479
|
+
# @option opts [String] :container_name
|
|
480
|
+
# @return [Array<(SfvbContainerResponse, Integer, Hash)>] SfvbContainerResponse data, response status code and response headers
|
|
481
|
+
def get_sfvb_container_with_http_info(storefront_oid, owner_type, owner_object_id, opts = {})
|
|
482
|
+
if @api_client.config.debugging
|
|
483
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_container ...'
|
|
484
|
+
end
|
|
485
|
+
# verify the required parameter 'storefront_oid' is set
|
|
486
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
487
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_container"
|
|
488
|
+
end
|
|
489
|
+
# verify the required parameter 'owner_type' is set
|
|
490
|
+
if @api_client.config.client_side_validation && owner_type.nil?
|
|
491
|
+
fail ArgumentError, "Missing the required parameter 'owner_type' when calling SfvbApi.get_sfvb_container"
|
|
492
|
+
end
|
|
493
|
+
# verify the required parameter 'owner_object_id' is set
|
|
494
|
+
if @api_client.config.client_side_validation && owner_object_id.nil?
|
|
495
|
+
fail ArgumentError, "Missing the required parameter 'owner_object_id' when calling SfvbApi.get_sfvb_container"
|
|
496
|
+
end
|
|
497
|
+
# resource path
|
|
498
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
|
|
499
|
+
|
|
500
|
+
# query parameters
|
|
501
|
+
query_params = opts[:query_params] || {}
|
|
502
|
+
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
503
|
+
|
|
504
|
+
# header parameters
|
|
505
|
+
header_params = opts[:header_params] || {}
|
|
506
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
507
|
+
# HTTP header 'Accept' (if needed)
|
|
508
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
509
|
+
|
|
510
|
+
# form parameters
|
|
511
|
+
form_params = opts[:form_params] || {}
|
|
512
|
+
|
|
513
|
+
# http body (model)
|
|
514
|
+
post_body = opts[:debug_body]
|
|
515
|
+
|
|
516
|
+
# return_type
|
|
517
|
+
return_type = opts[:debug_return_type] || 'SfvbContainerResponse'
|
|
518
|
+
|
|
519
|
+
# auth_names
|
|
520
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
521
|
+
|
|
522
|
+
new_options = opts.merge(
|
|
523
|
+
:operation => :"SfvbApi.get_sfvb_container",
|
|
524
|
+
:header_params => header_params,
|
|
525
|
+
:query_params => query_params,
|
|
526
|
+
:form_params => form_params,
|
|
527
|
+
:body => post_body,
|
|
528
|
+
:auth_names => auth_names,
|
|
529
|
+
:return_type => return_type
|
|
530
|
+
)
|
|
531
|
+
|
|
532
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
533
|
+
if @api_client.config.debugging
|
|
534
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
535
|
+
end
|
|
536
|
+
return data, status_code, headers
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
# Read the CJSON stored in one container history entry
|
|
540
|
+
# Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
541
|
+
# @param storefront_oid [Integer]
|
|
542
|
+
# @param container_history_oid [Integer]
|
|
543
|
+
# @param [Hash] opts the optional parameters
|
|
544
|
+
# @option opts [String] :owner_type
|
|
545
|
+
# @option opts [String] :owner_object_id
|
|
546
|
+
# @option opts [String] :container_name
|
|
547
|
+
# @return [SfvbContainerVersion]
|
|
548
|
+
def get_sfvb_container_version(storefront_oid, container_history_oid, opts = {})
|
|
549
|
+
data, _status_code, _headers = get_sfvb_container_version_with_http_info(storefront_oid, container_history_oid, opts)
|
|
550
|
+
data
|
|
551
|
+
end
|
|
552
|
+
|
|
553
|
+
# Read the CJSON stored in one container history entry
|
|
554
|
+
# Inspect or diff an earlier version without reverting to it. The version is addressed through the container that owns it, so a history oid belonging to some other resource cannot be read through this route.
|
|
555
|
+
# @param storefront_oid [Integer]
|
|
556
|
+
# @param container_history_oid [Integer]
|
|
557
|
+
# @param [Hash] opts the optional parameters
|
|
558
|
+
# @option opts [String] :owner_type
|
|
559
|
+
# @option opts [String] :owner_object_id
|
|
560
|
+
# @option opts [String] :container_name
|
|
561
|
+
# @return [Array<(SfvbContainerVersion, Integer, Hash)>] SfvbContainerVersion data, response status code and response headers
|
|
562
|
+
def get_sfvb_container_version_with_http_info(storefront_oid, container_history_oid, opts = {})
|
|
563
|
+
if @api_client.config.debugging
|
|
564
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_container_version ...'
|
|
565
|
+
end
|
|
566
|
+
# verify the required parameter 'storefront_oid' is set
|
|
567
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
568
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_container_version"
|
|
569
|
+
end
|
|
570
|
+
# verify the required parameter 'container_history_oid' is set
|
|
571
|
+
if @api_client.config.client_side_validation && container_history_oid.nil?
|
|
572
|
+
fail ArgumentError, "Missing the required parameter 'container_history_oid' when calling SfvbApi.get_sfvb_container_version"
|
|
573
|
+
end
|
|
574
|
+
# resource path
|
|
575
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/container_versions/{container_history_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'container_history_oid' + '}', CGI.escape(container_history_oid.to_s))
|
|
576
|
+
|
|
577
|
+
# query parameters
|
|
578
|
+
query_params = opts[:query_params] || {}
|
|
579
|
+
query_params[:'owner_type'] = opts[:'owner_type'] if !opts[:'owner_type'].nil?
|
|
580
|
+
query_params[:'owner_object_id'] = opts[:'owner_object_id'] if !opts[:'owner_object_id'].nil?
|
|
581
|
+
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
582
|
+
|
|
583
|
+
# header parameters
|
|
584
|
+
header_params = opts[:header_params] || {}
|
|
585
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
586
|
+
# HTTP header 'Accept' (if needed)
|
|
587
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
588
|
+
|
|
589
|
+
# form parameters
|
|
590
|
+
form_params = opts[:form_params] || {}
|
|
591
|
+
|
|
592
|
+
# http body (model)
|
|
593
|
+
post_body = opts[:debug_body]
|
|
594
|
+
|
|
595
|
+
# return_type
|
|
596
|
+
return_type = opts[:debug_return_type] || 'SfvbContainerVersion'
|
|
597
|
+
|
|
598
|
+
# auth_names
|
|
599
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
600
|
+
|
|
601
|
+
new_options = opts.merge(
|
|
602
|
+
:operation => :"SfvbApi.get_sfvb_container_version",
|
|
603
|
+
:header_params => header_params,
|
|
604
|
+
:query_params => query_params,
|
|
605
|
+
:form_params => form_params,
|
|
606
|
+
:body => post_body,
|
|
607
|
+
:auth_names => auth_names,
|
|
608
|
+
:return_type => return_type
|
|
609
|
+
)
|
|
610
|
+
|
|
611
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
612
|
+
if @api_client.config.debugging
|
|
613
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_container_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
614
|
+
end
|
|
615
|
+
return data, status_code, headers
|
|
616
|
+
end
|
|
617
|
+
|
|
618
|
+
# Configuration schema for one element type
|
|
619
|
+
# @param element_type [String]
|
|
620
|
+
# @param [Hash] opts the optional parameters
|
|
621
|
+
# @return [SfvbElementSchemaResponse]
|
|
622
|
+
def get_sfvb_element(element_type, opts = {})
|
|
623
|
+
data, _status_code, _headers = get_sfvb_element_with_http_info(element_type, opts)
|
|
624
|
+
data
|
|
625
|
+
end
|
|
626
|
+
|
|
627
|
+
# Configuration schema for one element type
|
|
628
|
+
# @param element_type [String]
|
|
629
|
+
# @param [Hash] opts the optional parameters
|
|
630
|
+
# @return [Array<(SfvbElementSchemaResponse, Integer, Hash)>] SfvbElementSchemaResponse data, response status code and response headers
|
|
631
|
+
def get_sfvb_element_with_http_info(element_type, opts = {})
|
|
632
|
+
if @api_client.config.debugging
|
|
633
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_element ...'
|
|
634
|
+
end
|
|
635
|
+
# verify the required parameter 'element_type' is set
|
|
636
|
+
if @api_client.config.client_side_validation && element_type.nil?
|
|
637
|
+
fail ArgumentError, "Missing the required parameter 'element_type' when calling SfvbApi.get_sfvb_element"
|
|
638
|
+
end
|
|
639
|
+
# resource path
|
|
640
|
+
local_var_path = '/sfvb/elements/{element_type}'.sub('{' + 'element_type' + '}', CGI.escape(element_type.to_s))
|
|
641
|
+
|
|
642
|
+
# query parameters
|
|
643
|
+
query_params = opts[:query_params] || {}
|
|
644
|
+
|
|
645
|
+
# header parameters
|
|
646
|
+
header_params = opts[:header_params] || {}
|
|
647
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
648
|
+
# HTTP header 'Accept' (if needed)
|
|
649
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
650
|
+
|
|
651
|
+
# form parameters
|
|
652
|
+
form_params = opts[:form_params] || {}
|
|
653
|
+
|
|
654
|
+
# http body (model)
|
|
655
|
+
post_body = opts[:debug_body]
|
|
656
|
+
|
|
657
|
+
# return_type
|
|
658
|
+
return_type = opts[:debug_return_type] || 'SfvbElementSchemaResponse'
|
|
659
|
+
|
|
660
|
+
# auth_names
|
|
661
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
662
|
+
|
|
663
|
+
new_options = opts.merge(
|
|
664
|
+
:operation => :"SfvbApi.get_sfvb_element",
|
|
665
|
+
:header_params => header_params,
|
|
666
|
+
:query_params => query_params,
|
|
667
|
+
:form_params => form_params,
|
|
668
|
+
:body => post_body,
|
|
669
|
+
:auth_names => auth_names,
|
|
670
|
+
:return_type => return_type
|
|
671
|
+
)
|
|
672
|
+
|
|
673
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
674
|
+
if @api_client.config.debugging
|
|
675
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_element\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
676
|
+
end
|
|
677
|
+
return data, status_code, headers
|
|
678
|
+
end
|
|
679
|
+
|
|
680
|
+
# Read a storefront file
|
|
681
|
+
# Returns the current content, or an earlier version when version is supplied. The content hash is returned as an ETag; send it back as If-Match when writing.
|
|
682
|
+
# @param storefront_oid [Integer]
|
|
683
|
+
# @param [Hash] opts the optional parameters
|
|
684
|
+
# @option opts [String] :path
|
|
685
|
+
# @option opts [Integer] :version
|
|
686
|
+
# @return [SfvbFileContentResponse]
|
|
687
|
+
def get_sfvb_file_content(storefront_oid, opts = {})
|
|
688
|
+
data, _status_code, _headers = get_sfvb_file_content_with_http_info(storefront_oid, opts)
|
|
689
|
+
data
|
|
690
|
+
end
|
|
691
|
+
|
|
692
|
+
# Read a storefront file
|
|
693
|
+
# Returns the current content, or an earlier version when version is supplied. The content hash is returned as an ETag; send it back as If-Match when writing.
|
|
694
|
+
# @param storefront_oid [Integer]
|
|
695
|
+
# @param [Hash] opts the optional parameters
|
|
696
|
+
# @option opts [String] :path
|
|
697
|
+
# @option opts [Integer] :version
|
|
698
|
+
# @return [Array<(SfvbFileContentResponse, Integer, Hash)>] SfvbFileContentResponse data, response status code and response headers
|
|
699
|
+
def get_sfvb_file_content_with_http_info(storefront_oid, opts = {})
|
|
700
|
+
if @api_client.config.debugging
|
|
701
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_file_content ...'
|
|
702
|
+
end
|
|
703
|
+
# verify the required parameter 'storefront_oid' is set
|
|
704
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
705
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_file_content"
|
|
706
|
+
end
|
|
707
|
+
# resource path
|
|
708
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
709
|
+
|
|
710
|
+
# query parameters
|
|
711
|
+
query_params = opts[:query_params] || {}
|
|
712
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
713
|
+
query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
|
|
714
|
+
|
|
715
|
+
# header parameters
|
|
716
|
+
header_params = opts[:header_params] || {}
|
|
717
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
718
|
+
# HTTP header 'Accept' (if needed)
|
|
719
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
720
|
+
|
|
721
|
+
# form parameters
|
|
722
|
+
form_params = opts[:form_params] || {}
|
|
723
|
+
|
|
724
|
+
# http body (model)
|
|
725
|
+
post_body = opts[:debug_body]
|
|
726
|
+
|
|
727
|
+
# return_type
|
|
728
|
+
return_type = opts[:debug_return_type] || 'SfvbFileContentResponse'
|
|
729
|
+
|
|
730
|
+
# auth_names
|
|
731
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
732
|
+
|
|
733
|
+
new_options = opts.merge(
|
|
734
|
+
:operation => :"SfvbApi.get_sfvb_file_content",
|
|
735
|
+
:header_params => header_params,
|
|
736
|
+
:query_params => query_params,
|
|
737
|
+
:form_params => form_params,
|
|
738
|
+
:body => post_body,
|
|
739
|
+
:auth_names => auth_names,
|
|
740
|
+
:return_type => return_type
|
|
741
|
+
)
|
|
742
|
+
|
|
743
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
744
|
+
if @api_client.config.debugging
|
|
745
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_file_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
746
|
+
end
|
|
747
|
+
return data, status_code, headers
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
# Read one library entry including its CJSON
|
|
751
|
+
# Returns the fragment as authored. If it references images or other storefront files those paths will not resolve on this storefront until the entry is installed, so use install rather than this when the intent is to place the fragment.
|
|
752
|
+
# @param storefront_oid [Integer]
|
|
753
|
+
# @param library_oid [Integer]
|
|
754
|
+
# @param [Hash] opts the optional parameters
|
|
755
|
+
# @return [SfvbLibraryEntry]
|
|
756
|
+
def get_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
757
|
+
data, _status_code, _headers = get_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
758
|
+
data
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
# Read one library entry including its CJSON
|
|
762
|
+
# Returns the fragment as authored. If it references images or other storefront files those paths will not resolve on this storefront until the entry is installed, so use install rather than this when the intent is to place the fragment.
|
|
763
|
+
# @param storefront_oid [Integer]
|
|
764
|
+
# @param library_oid [Integer]
|
|
765
|
+
# @param [Hash] opts the optional parameters
|
|
766
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
767
|
+
def get_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
768
|
+
if @api_client.config.debugging
|
|
769
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_library_entry ...'
|
|
770
|
+
end
|
|
771
|
+
# verify the required parameter 'storefront_oid' is set
|
|
772
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
773
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_library_entry"
|
|
774
|
+
end
|
|
775
|
+
# verify the required parameter 'library_oid' is set
|
|
776
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
777
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.get_sfvb_library_entry"
|
|
778
|
+
end
|
|
779
|
+
# resource path
|
|
780
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
781
|
+
|
|
782
|
+
# query parameters
|
|
783
|
+
query_params = opts[:query_params] || {}
|
|
784
|
+
|
|
785
|
+
# header parameters
|
|
786
|
+
header_params = opts[:header_params] || {}
|
|
787
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
788
|
+
# HTTP header 'Accept' (if needed)
|
|
789
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
790
|
+
|
|
791
|
+
# form parameters
|
|
792
|
+
form_params = opts[:form_params] || {}
|
|
793
|
+
|
|
794
|
+
# http body (model)
|
|
795
|
+
post_body = opts[:debug_body]
|
|
796
|
+
|
|
797
|
+
# return_type
|
|
798
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
799
|
+
|
|
800
|
+
# auth_names
|
|
801
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
802
|
+
|
|
803
|
+
new_options = opts.merge(
|
|
804
|
+
:operation => :"SfvbApi.get_sfvb_library_entry",
|
|
805
|
+
:header_params => header_params,
|
|
806
|
+
:query_params => query_params,
|
|
807
|
+
:form_params => form_params,
|
|
808
|
+
:body => post_body,
|
|
809
|
+
:auth_names => auth_names,
|
|
810
|
+
:return_type => return_type
|
|
811
|
+
)
|
|
812
|
+
|
|
813
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
814
|
+
if @api_client.config.debugging
|
|
815
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
816
|
+
end
|
|
817
|
+
return data, status_code, headers
|
|
818
|
+
end
|
|
819
|
+
|
|
820
|
+
# URL that renders a preview session
|
|
821
|
+
# @param storefront_oid [Integer]
|
|
822
|
+
# @param preview_session_id [String]
|
|
823
|
+
# @param [Hash] opts the optional parameters
|
|
824
|
+
# @option opts [String] :path
|
|
825
|
+
# @return [SfvbPreviewUrlResponse]
|
|
826
|
+
def get_sfvb_preview_url(storefront_oid, preview_session_id, opts = {})
|
|
827
|
+
data, _status_code, _headers = get_sfvb_preview_url_with_http_info(storefront_oid, preview_session_id, opts)
|
|
828
|
+
data
|
|
829
|
+
end
|
|
830
|
+
|
|
831
|
+
# URL that renders a preview session
|
|
832
|
+
# @param storefront_oid [Integer]
|
|
833
|
+
# @param preview_session_id [String]
|
|
834
|
+
# @param [Hash] opts the optional parameters
|
|
835
|
+
# @option opts [String] :path
|
|
836
|
+
# @return [Array<(SfvbPreviewUrlResponse, Integer, Hash)>] SfvbPreviewUrlResponse data, response status code and response headers
|
|
837
|
+
def get_sfvb_preview_url_with_http_info(storefront_oid, preview_session_id, opts = {})
|
|
838
|
+
if @api_client.config.debugging
|
|
839
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_preview_url ...'
|
|
840
|
+
end
|
|
841
|
+
# verify the required parameter 'storefront_oid' is set
|
|
842
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
843
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_preview_url"
|
|
844
|
+
end
|
|
845
|
+
# verify the required parameter 'preview_session_id' is set
|
|
846
|
+
if @api_client.config.client_side_validation && preview_session_id.nil?
|
|
847
|
+
fail ArgumentError, "Missing the required parameter 'preview_session_id' when calling SfvbApi.get_sfvb_preview_url"
|
|
848
|
+
end
|
|
849
|
+
# resource path
|
|
850
|
+
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))
|
|
851
|
+
|
|
852
|
+
# query parameters
|
|
853
|
+
query_params = opts[:query_params] || {}
|
|
854
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
855
|
+
|
|
856
|
+
# header parameters
|
|
857
|
+
header_params = opts[:header_params] || {}
|
|
858
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
859
|
+
# HTTP header 'Accept' (if needed)
|
|
860
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
861
|
+
|
|
862
|
+
# form parameters
|
|
863
|
+
form_params = opts[:form_params] || {}
|
|
864
|
+
|
|
865
|
+
# http body (model)
|
|
866
|
+
post_body = opts[:debug_body]
|
|
867
|
+
|
|
868
|
+
# return_type
|
|
869
|
+
return_type = opts[:debug_return_type] || 'SfvbPreviewUrlResponse'
|
|
870
|
+
|
|
871
|
+
# auth_names
|
|
872
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
873
|
+
|
|
874
|
+
new_options = opts.merge(
|
|
875
|
+
:operation => :"SfvbApi.get_sfvb_preview_url",
|
|
876
|
+
:header_params => header_params,
|
|
877
|
+
:query_params => query_params,
|
|
878
|
+
:form_params => form_params,
|
|
879
|
+
:body => post_body,
|
|
880
|
+
:auth_names => auth_names,
|
|
881
|
+
:return_type => return_type
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
885
|
+
if @api_client.config.debugging
|
|
886
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_preview_url\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
887
|
+
end
|
|
888
|
+
return data, status_code, headers
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
# Get a theme
|
|
892
|
+
# @param storefront_oid [Integer]
|
|
893
|
+
# @param theme_oid [Integer]
|
|
894
|
+
# @param [Hash] opts the optional parameters
|
|
895
|
+
# @return [SfvbTheme]
|
|
896
|
+
def get_sfvb_theme(storefront_oid, theme_oid, opts = {})
|
|
897
|
+
data, _status_code, _headers = get_sfvb_theme_with_http_info(storefront_oid, theme_oid, opts)
|
|
898
|
+
data
|
|
899
|
+
end
|
|
900
|
+
|
|
901
|
+
# Get a theme
|
|
902
|
+
# @param storefront_oid [Integer]
|
|
903
|
+
# @param theme_oid [Integer]
|
|
904
|
+
# @param [Hash] opts the optional parameters
|
|
905
|
+
# @return [Array<(SfvbTheme, Integer, Hash)>] SfvbTheme data, response status code and response headers
|
|
906
|
+
def get_sfvb_theme_with_http_info(storefront_oid, theme_oid, opts = {})
|
|
907
|
+
if @api_client.config.debugging
|
|
908
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme ...'
|
|
909
|
+
end
|
|
910
|
+
# verify the required parameter 'storefront_oid' is set
|
|
911
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
912
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme"
|
|
913
|
+
end
|
|
914
|
+
# verify the required parameter 'theme_oid' is set
|
|
915
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
916
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.get_sfvb_theme"
|
|
917
|
+
end
|
|
918
|
+
# resource path
|
|
919
|
+
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))
|
|
920
|
+
|
|
921
|
+
# query parameters
|
|
922
|
+
query_params = opts[:query_params] || {}
|
|
923
|
+
|
|
924
|
+
# header parameters
|
|
925
|
+
header_params = opts[:header_params] || {}
|
|
926
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
927
|
+
# HTTP header 'Accept' (if needed)
|
|
928
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
929
|
+
|
|
930
|
+
# form parameters
|
|
931
|
+
form_params = opts[:form_params] || {}
|
|
932
|
+
|
|
933
|
+
# http body (model)
|
|
934
|
+
post_body = opts[:debug_body]
|
|
935
|
+
|
|
936
|
+
# return_type
|
|
937
|
+
return_type = opts[:debug_return_type] || 'SfvbTheme'
|
|
938
|
+
|
|
939
|
+
# auth_names
|
|
940
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
941
|
+
|
|
942
|
+
new_options = opts.merge(
|
|
943
|
+
:operation => :"SfvbApi.get_sfvb_theme",
|
|
944
|
+
:header_params => header_params,
|
|
945
|
+
:query_params => query_params,
|
|
946
|
+
:form_params => form_params,
|
|
947
|
+
:body => post_body,
|
|
948
|
+
:auth_names => auth_names,
|
|
949
|
+
:return_type => return_type
|
|
950
|
+
)
|
|
951
|
+
|
|
952
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
953
|
+
if @api_client.config.debugging
|
|
954
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
955
|
+
end
|
|
956
|
+
return data, status_code, headers
|
|
957
|
+
end
|
|
958
|
+
|
|
959
|
+
# Status of an asynchronous theme job
|
|
960
|
+
# 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.
|
|
961
|
+
# @param storefront_oid [Integer]
|
|
962
|
+
# @param job_id [Integer]
|
|
963
|
+
# @param [Hash] opts the optional parameters
|
|
964
|
+
# @return [SfvbThemeJobResponse]
|
|
965
|
+
def get_sfvb_theme_job(storefront_oid, job_id, opts = {})
|
|
966
|
+
data, _status_code, _headers = get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts)
|
|
967
|
+
data
|
|
968
|
+
end
|
|
969
|
+
|
|
970
|
+
# Status of an asynchronous theme job
|
|
971
|
+
# 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.
|
|
972
|
+
# @param storefront_oid [Integer]
|
|
973
|
+
# @param job_id [Integer]
|
|
974
|
+
# @param [Hash] opts the optional parameters
|
|
975
|
+
# @return [Array<(SfvbThemeJobResponse, Integer, Hash)>] SfvbThemeJobResponse data, response status code and response headers
|
|
976
|
+
def get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts = {})
|
|
977
|
+
if @api_client.config.debugging
|
|
978
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_job ...'
|
|
979
|
+
end
|
|
980
|
+
# verify the required parameter 'storefront_oid' is set
|
|
981
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
982
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme_job"
|
|
983
|
+
end
|
|
984
|
+
# verify the required parameter 'job_id' is set
|
|
985
|
+
if @api_client.config.client_side_validation && job_id.nil?
|
|
986
|
+
fail ArgumentError, "Missing the required parameter 'job_id' when calling SfvbApi.get_sfvb_theme_job"
|
|
987
|
+
end
|
|
988
|
+
# resource path
|
|
989
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
|
|
990
|
+
|
|
991
|
+
# query parameters
|
|
992
|
+
query_params = opts[:query_params] || {}
|
|
993
|
+
|
|
994
|
+
# header parameters
|
|
995
|
+
header_params = opts[:header_params] || {}
|
|
996
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
997
|
+
# HTTP header 'Accept' (if needed)
|
|
998
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
999
|
+
|
|
1000
|
+
# form parameters
|
|
1001
|
+
form_params = opts[:form_params] || {}
|
|
1002
|
+
|
|
1003
|
+
# http body (model)
|
|
1004
|
+
post_body = opts[:debug_body]
|
|
1005
|
+
|
|
1006
|
+
# return_type
|
|
1007
|
+
return_type = opts[:debug_return_type] || 'SfvbThemeJobResponse'
|
|
1008
|
+
|
|
1009
|
+
# auth_names
|
|
1010
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1011
|
+
|
|
1012
|
+
new_options = opts.merge(
|
|
1013
|
+
:operation => :"SfvbApi.get_sfvb_theme_job",
|
|
1014
|
+
:header_params => header_params,
|
|
1015
|
+
:query_params => query_params,
|
|
1016
|
+
:form_params => form_params,
|
|
1017
|
+
:body => post_body,
|
|
1018
|
+
:auth_names => auth_names,
|
|
1019
|
+
:return_type => return_type
|
|
1020
|
+
)
|
|
1021
|
+
|
|
1022
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1023
|
+
if @api_client.config.debugging
|
|
1024
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1025
|
+
end
|
|
1026
|
+
return data, status_code, headers
|
|
1027
|
+
end
|
|
1028
|
+
|
|
1029
|
+
# Compiler version for this merchant
|
|
1030
|
+
# The visual builder release channel is per merchant, so a CLI holding cached schema or element data should compare against this to know when it has gone stale.
|
|
1031
|
+
# @param [Hash] opts the optional parameters
|
|
1032
|
+
# @return [SfvbVersionResponse]
|
|
1033
|
+
def get_sfvb_version(opts = {})
|
|
1034
|
+
data, _status_code, _headers = get_sfvb_version_with_http_info(opts)
|
|
1035
|
+
data
|
|
1036
|
+
end
|
|
1037
|
+
|
|
1038
|
+
# Compiler version for this merchant
|
|
1039
|
+
# The visual builder release channel is per merchant, so a CLI holding cached schema or element data should compare against this to know when it has gone stale.
|
|
1040
|
+
# @param [Hash] opts the optional parameters
|
|
1041
|
+
# @return [Array<(SfvbVersionResponse, Integer, Hash)>] SfvbVersionResponse data, response status code and response headers
|
|
1042
|
+
def get_sfvb_version_with_http_info(opts = {})
|
|
1043
|
+
if @api_client.config.debugging
|
|
1044
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_version ...'
|
|
1045
|
+
end
|
|
1046
|
+
# resource path
|
|
1047
|
+
local_var_path = '/sfvb/version'
|
|
1048
|
+
|
|
1049
|
+
# query parameters
|
|
1050
|
+
query_params = opts[:query_params] || {}
|
|
1051
|
+
|
|
1052
|
+
# header parameters
|
|
1053
|
+
header_params = opts[:header_params] || {}
|
|
1054
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1055
|
+
# HTTP header 'Accept' (if needed)
|
|
1056
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1057
|
+
|
|
1058
|
+
# form parameters
|
|
1059
|
+
form_params = opts[:form_params] || {}
|
|
1060
|
+
|
|
1061
|
+
# http body (model)
|
|
1062
|
+
post_body = opts[:debug_body]
|
|
1063
|
+
|
|
1064
|
+
# return_type
|
|
1065
|
+
return_type = opts[:debug_return_type] || 'SfvbVersionResponse'
|
|
1066
|
+
|
|
1067
|
+
# auth_names
|
|
1068
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1069
|
+
|
|
1070
|
+
new_options = opts.merge(
|
|
1071
|
+
:operation => :"SfvbApi.get_sfvb_version",
|
|
1072
|
+
:header_params => header_params,
|
|
1073
|
+
:query_params => query_params,
|
|
1074
|
+
:form_params => form_params,
|
|
1075
|
+
:body => post_body,
|
|
1076
|
+
:auth_names => auth_names,
|
|
1077
|
+
:return_type => return_type
|
|
1078
|
+
)
|
|
1079
|
+
|
|
1080
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1081
|
+
if @api_client.config.debugging
|
|
1082
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1083
|
+
end
|
|
1084
|
+
return data, status_code, headers
|
|
1085
|
+
end
|
|
1086
|
+
|
|
1087
|
+
# Who this token is
|
|
1088
|
+
# Returns the merchant, user, granted scopes and reachable storefronts for the calling token. Declared for any scope so an application can always discover which account it is connected to.
|
|
1089
|
+
# @param [Hash] opts the optional parameters
|
|
1090
|
+
# @return [SfvbWhoamiResponse]
|
|
1091
|
+
def get_sfvb_whoami(opts = {})
|
|
1092
|
+
data, _status_code, _headers = get_sfvb_whoami_with_http_info(opts)
|
|
1093
|
+
data
|
|
1094
|
+
end
|
|
1095
|
+
|
|
1096
|
+
# Who this token is
|
|
1097
|
+
# Returns the merchant, user, granted scopes and reachable storefronts for the calling token. Declared for any scope so an application can always discover which account it is connected to.
|
|
1098
|
+
# @param [Hash] opts the optional parameters
|
|
1099
|
+
# @return [Array<(SfvbWhoamiResponse, Integer, Hash)>] SfvbWhoamiResponse data, response status code and response headers
|
|
1100
|
+
def get_sfvb_whoami_with_http_info(opts = {})
|
|
1101
|
+
if @api_client.config.debugging
|
|
1102
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_whoami ...'
|
|
1103
|
+
end
|
|
1104
|
+
# resource path
|
|
1105
|
+
local_var_path = '/sfvb/whoami'
|
|
1106
|
+
|
|
1107
|
+
# query parameters
|
|
1108
|
+
query_params = opts[:query_params] || {}
|
|
1109
|
+
|
|
1110
|
+
# header parameters
|
|
1111
|
+
header_params = opts[:header_params] || {}
|
|
1112
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1113
|
+
# HTTP header 'Accept' (if needed)
|
|
1114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1115
|
+
|
|
1116
|
+
# form parameters
|
|
1117
|
+
form_params = opts[:form_params] || {}
|
|
1118
|
+
|
|
1119
|
+
# http body (model)
|
|
1120
|
+
post_body = opts[:debug_body]
|
|
1121
|
+
|
|
1122
|
+
# return_type
|
|
1123
|
+
return_type = opts[:debug_return_type] || 'SfvbWhoamiResponse'
|
|
1124
|
+
|
|
1125
|
+
# auth_names
|
|
1126
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1127
|
+
|
|
1128
|
+
new_options = opts.merge(
|
|
1129
|
+
:operation => :"SfvbApi.get_sfvb_whoami",
|
|
1130
|
+
:header_params => header_params,
|
|
1131
|
+
:query_params => query_params,
|
|
1132
|
+
:form_params => form_params,
|
|
1133
|
+
:body => post_body,
|
|
1134
|
+
:auth_names => auth_names,
|
|
1135
|
+
:return_type => return_type
|
|
1136
|
+
)
|
|
1137
|
+
|
|
1138
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1139
|
+
if @api_client.config.debugging
|
|
1140
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_whoami\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1141
|
+
end
|
|
1142
|
+
return data, status_code, headers
|
|
1143
|
+
end
|
|
1144
|
+
|
|
1145
|
+
# Install a library entry into a storefront
|
|
1146
|
+
# 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.
|
|
1147
|
+
# @param storefront_oid [Integer]
|
|
1148
|
+
# @param library_oid [Integer]
|
|
1149
|
+
# @param [Hash] opts the optional parameters
|
|
1150
|
+
# @return [SfvbLibraryEntry]
|
|
1151
|
+
def install_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
1152
|
+
data, _status_code, _headers = install_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
1153
|
+
data
|
|
1154
|
+
end
|
|
1155
|
+
|
|
1156
|
+
# Install a library entry into a storefront
|
|
1157
|
+
# 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.
|
|
1158
|
+
# @param storefront_oid [Integer]
|
|
1159
|
+
# @param library_oid [Integer]
|
|
1160
|
+
# @param [Hash] opts the optional parameters
|
|
1161
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
1162
|
+
def install_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
1163
|
+
if @api_client.config.debugging
|
|
1164
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.install_sfvb_library_entry ...'
|
|
1165
|
+
end
|
|
1166
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1167
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1168
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.install_sfvb_library_entry"
|
|
1169
|
+
end
|
|
1170
|
+
# verify the required parameter 'library_oid' is set
|
|
1171
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
1172
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.install_sfvb_library_entry"
|
|
1173
|
+
end
|
|
1174
|
+
# resource path
|
|
1175
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/install'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
1176
|
+
|
|
1177
|
+
# query parameters
|
|
1178
|
+
query_params = opts[:query_params] || {}
|
|
1179
|
+
|
|
1180
|
+
# header parameters
|
|
1181
|
+
header_params = opts[:header_params] || {}
|
|
1182
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1183
|
+
# HTTP header 'Accept' (if needed)
|
|
1184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1185
|
+
|
|
1186
|
+
# form parameters
|
|
1187
|
+
form_params = opts[:form_params] || {}
|
|
1188
|
+
|
|
1189
|
+
# http body (model)
|
|
1190
|
+
post_body = opts[:debug_body]
|
|
1191
|
+
|
|
1192
|
+
# return_type
|
|
1193
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
1194
|
+
|
|
1195
|
+
# auth_names
|
|
1196
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1197
|
+
|
|
1198
|
+
new_options = opts.merge(
|
|
1199
|
+
:operation => :"SfvbApi.install_sfvb_library_entry",
|
|
1200
|
+
:header_params => header_params,
|
|
1201
|
+
:query_params => query_params,
|
|
1202
|
+
:form_params => form_params,
|
|
1203
|
+
:body => post_body,
|
|
1204
|
+
:auth_names => auth_names,
|
|
1205
|
+
:return_type => return_type
|
|
1206
|
+
)
|
|
1207
|
+
|
|
1208
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1209
|
+
if @api_client.config.debugging
|
|
1210
|
+
@api_client.config.logger.debug "API called: SfvbApi#install_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1211
|
+
end
|
|
1212
|
+
return data, status_code, headers
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
# Version history for a container stored outside the file system
|
|
1216
|
+
# @param storefront_oid [Integer]
|
|
1217
|
+
# @param [Hash] opts the optional parameters
|
|
1218
|
+
# @option opts [String] :owner_type
|
|
1219
|
+
# @option opts [String] :owner_object_id
|
|
1220
|
+
# @option opts [String] :container_name
|
|
1221
|
+
# @return [SfvbContainerVersionsResponse]
|
|
1222
|
+
def list_sfvb_container_versions(storefront_oid, opts = {})
|
|
1223
|
+
data, _status_code, _headers = list_sfvb_container_versions_with_http_info(storefront_oid, opts)
|
|
1224
|
+
data
|
|
1225
|
+
end
|
|
1226
|
+
|
|
1227
|
+
# Version history for a container stored outside the file system
|
|
1228
|
+
# @param storefront_oid [Integer]
|
|
1229
|
+
# @param [Hash] opts the optional parameters
|
|
1230
|
+
# @option opts [String] :owner_type
|
|
1231
|
+
# @option opts [String] :owner_object_id
|
|
1232
|
+
# @option opts [String] :container_name
|
|
1233
|
+
# @return [Array<(SfvbContainerVersionsResponse, Integer, Hash)>] SfvbContainerVersionsResponse data, response status code and response headers
|
|
1234
|
+
def list_sfvb_container_versions_with_http_info(storefront_oid, opts = {})
|
|
1235
|
+
if @api_client.config.debugging
|
|
1236
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_container_versions ...'
|
|
1237
|
+
end
|
|
1238
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1239
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1240
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_container_versions"
|
|
1241
|
+
end
|
|
1242
|
+
# resource path
|
|
1243
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/container_versions'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1244
|
+
|
|
1245
|
+
# query parameters
|
|
1246
|
+
query_params = opts[:query_params] || {}
|
|
1247
|
+
query_params[:'owner_type'] = opts[:'owner_type'] if !opts[:'owner_type'].nil?
|
|
1248
|
+
query_params[:'owner_object_id'] = opts[:'owner_object_id'] if !opts[:'owner_object_id'].nil?
|
|
1249
|
+
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
1250
|
+
|
|
1251
|
+
# header parameters
|
|
1252
|
+
header_params = opts[:header_params] || {}
|
|
1253
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1254
|
+
# HTTP header 'Accept' (if needed)
|
|
1255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1256
|
+
|
|
1257
|
+
# form parameters
|
|
1258
|
+
form_params = opts[:form_params] || {}
|
|
1259
|
+
|
|
1260
|
+
# http body (model)
|
|
1261
|
+
post_body = opts[:debug_body]
|
|
1262
|
+
|
|
1263
|
+
# return_type
|
|
1264
|
+
return_type = opts[:debug_return_type] || 'SfvbContainerVersionsResponse'
|
|
1265
|
+
|
|
1266
|
+
# auth_names
|
|
1267
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1268
|
+
|
|
1269
|
+
new_options = opts.merge(
|
|
1270
|
+
:operation => :"SfvbApi.list_sfvb_container_versions",
|
|
1271
|
+
:header_params => header_params,
|
|
1272
|
+
:query_params => query_params,
|
|
1273
|
+
:form_params => form_params,
|
|
1274
|
+
:body => post_body,
|
|
1275
|
+
:auth_names => auth_names,
|
|
1276
|
+
:return_type => return_type
|
|
1277
|
+
)
|
|
1278
|
+
|
|
1279
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1280
|
+
if @api_client.config.debugging
|
|
1281
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_container_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1282
|
+
end
|
|
1283
|
+
return data, status_code, headers
|
|
1284
|
+
end
|
|
1285
|
+
|
|
1286
|
+
# List every SFVB element type
|
|
1287
|
+
# The authoritative vocabulary, taken from the same lookup the compiler uses. A type absent from this list compiles to a literal placeholder line in the page rather than failing, which is why validation treats an unknown type as an error.
|
|
1288
|
+
# @param [Hash] opts the optional parameters
|
|
1289
|
+
# @return [SfvbElementsResponse]
|
|
1290
|
+
def list_sfvb_elements(opts = {})
|
|
1291
|
+
data, _status_code, _headers = list_sfvb_elements_with_http_info(opts)
|
|
1292
|
+
data
|
|
1293
|
+
end
|
|
1294
|
+
|
|
1295
|
+
# List every SFVB element type
|
|
1296
|
+
# The authoritative vocabulary, taken from the same lookup the compiler uses. A type absent from this list compiles to a literal placeholder line in the page rather than failing, which is why validation treats an unknown type as an error.
|
|
1297
|
+
# @param [Hash] opts the optional parameters
|
|
1298
|
+
# @return [Array<(SfvbElementsResponse, Integer, Hash)>] SfvbElementsResponse data, response status code and response headers
|
|
1299
|
+
def list_sfvb_elements_with_http_info(opts = {})
|
|
1300
|
+
if @api_client.config.debugging
|
|
1301
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_elements ...'
|
|
1302
|
+
end
|
|
1303
|
+
# resource path
|
|
1304
|
+
local_var_path = '/sfvb/elements'
|
|
1305
|
+
|
|
1306
|
+
# query parameters
|
|
1307
|
+
query_params = opts[:query_params] || {}
|
|
1308
|
+
|
|
1309
|
+
# header parameters
|
|
1310
|
+
header_params = opts[:header_params] || {}
|
|
1311
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1312
|
+
# HTTP header 'Accept' (if needed)
|
|
1313
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1314
|
+
|
|
1315
|
+
# form parameters
|
|
1316
|
+
form_params = opts[:form_params] || {}
|
|
1317
|
+
|
|
1318
|
+
# http body (model)
|
|
1319
|
+
post_body = opts[:debug_body]
|
|
1320
|
+
|
|
1321
|
+
# return_type
|
|
1322
|
+
return_type = opts[:debug_return_type] || 'SfvbElementsResponse'
|
|
1323
|
+
|
|
1324
|
+
# auth_names
|
|
1325
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1326
|
+
|
|
1327
|
+
new_options = opts.merge(
|
|
1328
|
+
:operation => :"SfvbApi.list_sfvb_elements",
|
|
1329
|
+
:header_params => header_params,
|
|
1330
|
+
:query_params => query_params,
|
|
1331
|
+
:form_params => form_params,
|
|
1332
|
+
:body => post_body,
|
|
1333
|
+
:auth_names => auth_names,
|
|
1334
|
+
:return_type => return_type
|
|
1335
|
+
)
|
|
1336
|
+
|
|
1337
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1338
|
+
if @api_client.config.debugging
|
|
1339
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_elements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1340
|
+
end
|
|
1341
|
+
return data, status_code, headers
|
|
1342
|
+
end
|
|
1343
|
+
|
|
1344
|
+
# Version history for a storefront file
|
|
1345
|
+
# Version history is the undo for anything in the storefront file system, which is what makes an agent's writes recoverable.
|
|
1346
|
+
# @param storefront_oid [Integer]
|
|
1347
|
+
# @param [Hash] opts the optional parameters
|
|
1348
|
+
# @option opts [String] :path
|
|
1349
|
+
# @return [SfvbFileVersionsResponse]
|
|
1350
|
+
def list_sfvb_file_versions(storefront_oid, opts = {})
|
|
1351
|
+
data, _status_code, _headers = list_sfvb_file_versions_with_http_info(storefront_oid, opts)
|
|
1352
|
+
data
|
|
1353
|
+
end
|
|
1354
|
+
|
|
1355
|
+
# Version history for a storefront file
|
|
1356
|
+
# Version history is the undo for anything in the storefront file system, which is what makes an agent's writes recoverable.
|
|
1357
|
+
# @param storefront_oid [Integer]
|
|
1358
|
+
# @param [Hash] opts the optional parameters
|
|
1359
|
+
# @option opts [String] :path
|
|
1360
|
+
# @return [Array<(SfvbFileVersionsResponse, Integer, Hash)>] SfvbFileVersionsResponse data, response status code and response headers
|
|
1361
|
+
def list_sfvb_file_versions_with_http_info(storefront_oid, opts = {})
|
|
1362
|
+
if @api_client.config.debugging
|
|
1363
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_file_versions ...'
|
|
1364
|
+
end
|
|
1365
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1366
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1367
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_file_versions"
|
|
1368
|
+
end
|
|
1369
|
+
# resource path
|
|
1370
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/versions'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1371
|
+
|
|
1372
|
+
# query parameters
|
|
1373
|
+
query_params = opts[:query_params] || {}
|
|
1374
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
1375
|
+
|
|
1376
|
+
# header parameters
|
|
1377
|
+
header_params = opts[:header_params] || {}
|
|
1378
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1379
|
+
# HTTP header 'Accept' (if needed)
|
|
1380
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1381
|
+
|
|
1382
|
+
# form parameters
|
|
1383
|
+
form_params = opts[:form_params] || {}
|
|
1384
|
+
|
|
1385
|
+
# http body (model)
|
|
1386
|
+
post_body = opts[:debug_body]
|
|
1387
|
+
|
|
1388
|
+
# return_type
|
|
1389
|
+
return_type = opts[:debug_return_type] || 'SfvbFileVersionsResponse'
|
|
1390
|
+
|
|
1391
|
+
# auth_names
|
|
1392
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1393
|
+
|
|
1394
|
+
new_options = opts.merge(
|
|
1395
|
+
:operation => :"SfvbApi.list_sfvb_file_versions",
|
|
1396
|
+
:header_params => header_params,
|
|
1397
|
+
:query_params => query_params,
|
|
1398
|
+
:form_params => form_params,
|
|
1399
|
+
:body => post_body,
|
|
1400
|
+
:auth_names => auth_names,
|
|
1401
|
+
:return_type => return_type
|
|
1402
|
+
)
|
|
1403
|
+
|
|
1404
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1405
|
+
if @api_client.config.debugging
|
|
1406
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_file_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1407
|
+
end
|
|
1408
|
+
return data, status_code, headers
|
|
1409
|
+
end
|
|
1410
|
+
|
|
1411
|
+
# List a storefront directory
|
|
1412
|
+
# Directories first, then files, each sorted by name. Address by path or by directory oid; supplying theme_oid also retries a path that does not resolve at the storefront root relative to that theme, so /theme/css/ works without knowing the theme's directory name. Each file carries its content hash, so a listing is enough to start an If-Match write without a separate read.
|
|
1413
|
+
# @param storefront_oid [Integer]
|
|
1414
|
+
# @param [Hash] opts the optional parameters
|
|
1415
|
+
# @option opts [String] :path
|
|
1416
|
+
# @option opts [Integer] :storefront_fs_directory_oid
|
|
1417
|
+
# @option opts [Integer] :theme_oid
|
|
1418
|
+
# @option opts [Integer] :max_entries
|
|
1419
|
+
# @return [SfvbFilesResponse]
|
|
1420
|
+
def list_sfvb_files(storefront_oid, opts = {})
|
|
1421
|
+
data, _status_code, _headers = list_sfvb_files_with_http_info(storefront_oid, opts)
|
|
1422
|
+
data
|
|
1423
|
+
end
|
|
1424
|
+
|
|
1425
|
+
# List a storefront directory
|
|
1426
|
+
# Directories first, then files, each sorted by name. Address by path or by directory oid; supplying theme_oid also retries a path that does not resolve at the storefront root relative to that theme, so /theme/css/ works without knowing the theme's directory name. Each file carries its content hash, so a listing is enough to start an If-Match write without a separate read.
|
|
1427
|
+
# @param storefront_oid [Integer]
|
|
1428
|
+
# @param [Hash] opts the optional parameters
|
|
1429
|
+
# @option opts [String] :path
|
|
1430
|
+
# @option opts [Integer] :storefront_fs_directory_oid
|
|
1431
|
+
# @option opts [Integer] :theme_oid
|
|
1432
|
+
# @option opts [Integer] :max_entries
|
|
1433
|
+
# @return [Array<(SfvbFilesResponse, Integer, Hash)>] SfvbFilesResponse data, response status code and response headers
|
|
1434
|
+
def list_sfvb_files_with_http_info(storefront_oid, opts = {})
|
|
1435
|
+
if @api_client.config.debugging
|
|
1436
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_files ...'
|
|
1437
|
+
end
|
|
1438
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1439
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1440
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_files"
|
|
1441
|
+
end
|
|
1442
|
+
# resource path
|
|
1443
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1444
|
+
|
|
1445
|
+
# query parameters
|
|
1446
|
+
query_params = opts[:query_params] || {}
|
|
1447
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
1448
|
+
query_params[:'storefront_fs_directory_oid'] = opts[:'storefront_fs_directory_oid'] if !opts[:'storefront_fs_directory_oid'].nil?
|
|
1449
|
+
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
1450
|
+
query_params[:'max_entries'] = opts[:'max_entries'] if !opts[:'max_entries'].nil?
|
|
1451
|
+
|
|
1452
|
+
# header parameters
|
|
1453
|
+
header_params = opts[:header_params] || {}
|
|
1454
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1455
|
+
# HTTP header 'Accept' (if needed)
|
|
1456
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1457
|
+
|
|
1458
|
+
# form parameters
|
|
1459
|
+
form_params = opts[:form_params] || {}
|
|
1460
|
+
|
|
1461
|
+
# http body (model)
|
|
1462
|
+
post_body = opts[:debug_body]
|
|
1463
|
+
|
|
1464
|
+
# return_type
|
|
1465
|
+
return_type = opts[:debug_return_type] || 'SfvbFilesResponse'
|
|
1466
|
+
|
|
1467
|
+
# auth_names
|
|
1468
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1469
|
+
|
|
1470
|
+
new_options = opts.merge(
|
|
1471
|
+
:operation => :"SfvbApi.list_sfvb_files",
|
|
1472
|
+
:header_params => header_params,
|
|
1473
|
+
:query_params => query_params,
|
|
1474
|
+
:form_params => form_params,
|
|
1475
|
+
:body => post_body,
|
|
1476
|
+
:auth_names => auth_names,
|
|
1477
|
+
:return_type => return_type
|
|
1478
|
+
)
|
|
1479
|
+
|
|
1480
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1481
|
+
if @api_client.config.debugging
|
|
1482
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1483
|
+
end
|
|
1484
|
+
return data, status_code, headers
|
|
1485
|
+
end
|
|
1486
|
+
|
|
1487
|
+
# List storefronts
|
|
1488
|
+
# @param [Hash] opts the optional parameters
|
|
1489
|
+
# @return [SfvbStorefrontsResponse]
|
|
1490
|
+
def list_sfvb_storefronts(opts = {})
|
|
1491
|
+
data, _status_code, _headers = list_sfvb_storefronts_with_http_info(opts)
|
|
1492
|
+
data
|
|
1493
|
+
end
|
|
1494
|
+
|
|
1495
|
+
# List storefronts
|
|
1496
|
+
# @param [Hash] opts the optional parameters
|
|
1497
|
+
# @return [Array<(SfvbStorefrontsResponse, Integer, Hash)>] SfvbStorefrontsResponse data, response status code and response headers
|
|
1498
|
+
def list_sfvb_storefronts_with_http_info(opts = {})
|
|
1499
|
+
if @api_client.config.debugging
|
|
1500
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_storefronts ...'
|
|
1501
|
+
end
|
|
1502
|
+
# resource path
|
|
1503
|
+
local_var_path = '/sfvb/storefronts'
|
|
1504
|
+
|
|
1505
|
+
# query parameters
|
|
1506
|
+
query_params = opts[:query_params] || {}
|
|
1507
|
+
|
|
1508
|
+
# header parameters
|
|
1509
|
+
header_params = opts[:header_params] || {}
|
|
1510
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1511
|
+
# HTTP header 'Accept' (if needed)
|
|
1512
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1513
|
+
|
|
1514
|
+
# form parameters
|
|
1515
|
+
form_params = opts[:form_params] || {}
|
|
1516
|
+
|
|
1517
|
+
# http body (model)
|
|
1518
|
+
post_body = opts[:debug_body]
|
|
1519
|
+
|
|
1520
|
+
# return_type
|
|
1521
|
+
return_type = opts[:debug_return_type] || 'SfvbStorefrontsResponse'
|
|
1522
|
+
|
|
1523
|
+
# auth_names
|
|
1524
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1525
|
+
|
|
1526
|
+
new_options = opts.merge(
|
|
1527
|
+
:operation => :"SfvbApi.list_sfvb_storefronts",
|
|
1528
|
+
:header_params => header_params,
|
|
1529
|
+
:query_params => query_params,
|
|
1530
|
+
:form_params => form_params,
|
|
1531
|
+
:body => post_body,
|
|
1532
|
+
:auth_names => auth_names,
|
|
1533
|
+
:return_type => return_type
|
|
1534
|
+
)
|
|
1535
|
+
|
|
1536
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1537
|
+
if @api_client.config.debugging
|
|
1538
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_storefronts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1539
|
+
end
|
|
1540
|
+
return data, status_code, headers
|
|
1541
|
+
end
|
|
1542
|
+
|
|
1543
|
+
# List themes for a storefront
|
|
1544
|
+
# Exactly one theme is flagged active. Writing to the active theme is writing live and requires the sfvb_publish scope.
|
|
1545
|
+
# @param storefront_oid [Integer]
|
|
1546
|
+
# @param [Hash] opts the optional parameters
|
|
1547
|
+
# @return [SfvbThemesResponse]
|
|
1548
|
+
def list_sfvb_themes(storefront_oid, opts = {})
|
|
1549
|
+
data, _status_code, _headers = list_sfvb_themes_with_http_info(storefront_oid, opts)
|
|
1550
|
+
data
|
|
1551
|
+
end
|
|
1552
|
+
|
|
1553
|
+
# List themes for a storefront
|
|
1554
|
+
# Exactly one theme is flagged active. Writing to the active theme is writing live and requires the sfvb_publish scope.
|
|
1555
|
+
# @param storefront_oid [Integer]
|
|
1556
|
+
# @param [Hash] opts the optional parameters
|
|
1557
|
+
# @return [Array<(SfvbThemesResponse, Integer, Hash)>] SfvbThemesResponse data, response status code and response headers
|
|
1558
|
+
def list_sfvb_themes_with_http_info(storefront_oid, opts = {})
|
|
1559
|
+
if @api_client.config.debugging
|
|
1560
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_themes ...'
|
|
1561
|
+
end
|
|
1562
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1563
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1564
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_themes"
|
|
1565
|
+
end
|
|
1566
|
+
# resource path
|
|
1567
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1568
|
+
|
|
1569
|
+
# query parameters
|
|
1570
|
+
query_params = opts[:query_params] || {}
|
|
1571
|
+
|
|
1572
|
+
# header parameters
|
|
1573
|
+
header_params = opts[:header_params] || {}
|
|
1574
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1575
|
+
# HTTP header 'Accept' (if needed)
|
|
1576
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1577
|
+
|
|
1578
|
+
# form parameters
|
|
1579
|
+
form_params = opts[:form_params] || {}
|
|
1580
|
+
|
|
1581
|
+
# http body (model)
|
|
1582
|
+
post_body = opts[:debug_body]
|
|
1583
|
+
|
|
1584
|
+
# return_type
|
|
1585
|
+
return_type = opts[:debug_return_type] || 'SfvbThemesResponse'
|
|
1586
|
+
|
|
1587
|
+
# auth_names
|
|
1588
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1589
|
+
|
|
1590
|
+
new_options = opts.merge(
|
|
1591
|
+
:operation => :"SfvbApi.list_sfvb_themes",
|
|
1592
|
+
:header_params => header_params,
|
|
1593
|
+
:query_params => query_params,
|
|
1594
|
+
:form_params => form_params,
|
|
1595
|
+
:body => post_body,
|
|
1596
|
+
:auth_names => auth_names,
|
|
1597
|
+
:return_type => return_type
|
|
1598
|
+
)
|
|
1599
|
+
|
|
1600
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1601
|
+
if @api_client.config.debugging
|
|
1602
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1603
|
+
end
|
|
1604
|
+
return data, status_code, headers
|
|
1605
|
+
end
|
|
1606
|
+
|
|
1607
|
+
# List upsell offers
|
|
1608
|
+
# Without container JSON, so the funnel can be surveyed cheaply. A large container size alongside a small element count is the signature of markup pasted into a single html element.
|
|
1609
|
+
# @param storefront_oid [Integer]
|
|
1610
|
+
# @param [Hash] opts the optional parameters
|
|
1611
|
+
# @return [SfvbUpsellOffersResponse]
|
|
1612
|
+
def list_sfvb_upsell_offers(storefront_oid, opts = {})
|
|
1613
|
+
data, _status_code, _headers = list_sfvb_upsell_offers_with_http_info(storefront_oid, opts)
|
|
1614
|
+
data
|
|
1615
|
+
end
|
|
1616
|
+
|
|
1617
|
+
# List upsell offers
|
|
1618
|
+
# Without container JSON, so the funnel can be surveyed cheaply. A large container size alongside a small element count is the signature of markup pasted into a single html element.
|
|
1619
|
+
# @param storefront_oid [Integer]
|
|
1620
|
+
# @param [Hash] opts the optional parameters
|
|
1621
|
+
# @return [Array<(SfvbUpsellOffersResponse, Integer, Hash)>] SfvbUpsellOffersResponse data, response status code and response headers
|
|
1622
|
+
def list_sfvb_upsell_offers_with_http_info(storefront_oid, opts = {})
|
|
1623
|
+
if @api_client.config.debugging
|
|
1624
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_upsell_offers ...'
|
|
1625
|
+
end
|
|
1626
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1627
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1628
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_upsell_offers"
|
|
1629
|
+
end
|
|
1630
|
+
# resource path
|
|
1631
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1632
|
+
|
|
1633
|
+
# query parameters
|
|
1634
|
+
query_params = opts[:query_params] || {}
|
|
1635
|
+
|
|
1636
|
+
# header parameters
|
|
1637
|
+
header_params = opts[:header_params] || {}
|
|
1638
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1639
|
+
# HTTP header 'Accept' (if needed)
|
|
1640
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1641
|
+
|
|
1642
|
+
# form parameters
|
|
1643
|
+
form_params = opts[:form_params] || {}
|
|
1644
|
+
|
|
1645
|
+
# http body (model)
|
|
1646
|
+
post_body = opts[:debug_body]
|
|
1647
|
+
|
|
1648
|
+
# return_type
|
|
1649
|
+
return_type = opts[:debug_return_type] || 'SfvbUpsellOffersResponse'
|
|
1650
|
+
|
|
1651
|
+
# auth_names
|
|
1652
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1653
|
+
|
|
1654
|
+
new_options = opts.merge(
|
|
1655
|
+
:operation => :"SfvbApi.list_sfvb_upsell_offers",
|
|
1656
|
+
:header_params => header_params,
|
|
1657
|
+
:query_params => query_params,
|
|
1658
|
+
:form_params => form_params,
|
|
1659
|
+
:body => post_body,
|
|
1660
|
+
:auth_names => auth_names,
|
|
1661
|
+
:return_type => return_type
|
|
1662
|
+
)
|
|
1663
|
+
|
|
1664
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1665
|
+
if @api_client.config.debugging
|
|
1666
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_upsell_offers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1667
|
+
end
|
|
1668
|
+
return data, status_code, headers
|
|
1669
|
+
end
|
|
1670
|
+
|
|
1671
|
+
# Write a container stored outside the file system
|
|
1672
|
+
# Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
1673
|
+
# @param storefront_oid [Integer]
|
|
1674
|
+
# @param owner_type [String]
|
|
1675
|
+
# @param owner_object_id [String]
|
|
1676
|
+
# @param if_match [String] CJSON hash from the last read. Required; 428 when absent, 412 when stale.
|
|
1677
|
+
# @param container_write_request [SfvbContainerWriteRequest] Container CJSON to write
|
|
1678
|
+
# @param [Hash] opts the optional parameters
|
|
1679
|
+
# @option opts [String] :container_name
|
|
1680
|
+
# @return [SfvbContainerResponse]
|
|
1681
|
+
def put_sfvb_container(storefront_oid, owner_type, owner_object_id, if_match, container_write_request, opts = {})
|
|
1682
|
+
data, _status_code, _headers = put_sfvb_container_with_http_info(storefront_oid, owner_type, owner_object_id, if_match, container_write_request, opts)
|
|
1683
|
+
data
|
|
1684
|
+
end
|
|
1685
|
+
|
|
1686
|
+
# Write a container stored outside the file system
|
|
1687
|
+
# Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too.
|
|
1688
|
+
# @param storefront_oid [Integer]
|
|
1689
|
+
# @param owner_type [String]
|
|
1690
|
+
# @param owner_object_id [String]
|
|
1691
|
+
# @param if_match [String] CJSON hash from the last read. Required; 428 when absent, 412 when stale.
|
|
1692
|
+
# @param container_write_request [SfvbContainerWriteRequest] Container CJSON to write
|
|
1693
|
+
# @param [Hash] opts the optional parameters
|
|
1694
|
+
# @option opts [String] :container_name
|
|
1695
|
+
# @return [Array<(SfvbContainerResponse, Integer, Hash)>] SfvbContainerResponse data, response status code and response headers
|
|
1696
|
+
def put_sfvb_container_with_http_info(storefront_oid, owner_type, owner_object_id, if_match, container_write_request, opts = {})
|
|
1697
|
+
if @api_client.config.debugging
|
|
1698
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_container ...'
|
|
1699
|
+
end
|
|
1700
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1701
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1702
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_container"
|
|
1703
|
+
end
|
|
1704
|
+
# verify the required parameter 'owner_type' is set
|
|
1705
|
+
if @api_client.config.client_side_validation && owner_type.nil?
|
|
1706
|
+
fail ArgumentError, "Missing the required parameter 'owner_type' when calling SfvbApi.put_sfvb_container"
|
|
1707
|
+
end
|
|
1708
|
+
# verify the required parameter 'owner_object_id' is set
|
|
1709
|
+
if @api_client.config.client_side_validation && owner_object_id.nil?
|
|
1710
|
+
fail ArgumentError, "Missing the required parameter 'owner_object_id' when calling SfvbApi.put_sfvb_container"
|
|
1711
|
+
end
|
|
1712
|
+
# verify the required parameter 'if_match' is set
|
|
1713
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
1714
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_container"
|
|
1715
|
+
end
|
|
1716
|
+
# verify the required parameter 'container_write_request' is set
|
|
1717
|
+
if @api_client.config.client_side_validation && container_write_request.nil?
|
|
1718
|
+
fail ArgumentError, "Missing the required parameter 'container_write_request' when calling SfvbApi.put_sfvb_container"
|
|
1719
|
+
end
|
|
1720
|
+
# resource path
|
|
1721
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
|
|
1722
|
+
|
|
1723
|
+
# query parameters
|
|
1724
|
+
query_params = opts[:query_params] || {}
|
|
1725
|
+
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
1726
|
+
|
|
1727
|
+
# header parameters
|
|
1728
|
+
header_params = opts[:header_params] || {}
|
|
1729
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1730
|
+
# HTTP header 'Accept' (if needed)
|
|
1731
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1732
|
+
# HTTP header 'Content-Type'
|
|
1733
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1734
|
+
if !content_type.nil?
|
|
1735
|
+
header_params['Content-Type'] = content_type
|
|
1736
|
+
end
|
|
1737
|
+
header_params[:'If-Match'] = if_match
|
|
1738
|
+
|
|
1739
|
+
# form parameters
|
|
1740
|
+
form_params = opts[:form_params] || {}
|
|
1741
|
+
|
|
1742
|
+
# http body (model)
|
|
1743
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(container_write_request)
|
|
1744
|
+
|
|
1745
|
+
# return_type
|
|
1746
|
+
return_type = opts[:debug_return_type] || 'SfvbContainerResponse'
|
|
1747
|
+
|
|
1748
|
+
# auth_names
|
|
1749
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1750
|
+
|
|
1751
|
+
new_options = opts.merge(
|
|
1752
|
+
:operation => :"SfvbApi.put_sfvb_container",
|
|
1753
|
+
:header_params => header_params,
|
|
1754
|
+
:query_params => query_params,
|
|
1755
|
+
:form_params => form_params,
|
|
1756
|
+
:body => post_body,
|
|
1757
|
+
:auth_names => auth_names,
|
|
1758
|
+
:return_type => return_type
|
|
1759
|
+
)
|
|
1760
|
+
|
|
1761
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1762
|
+
if @api_client.config.debugging
|
|
1763
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1764
|
+
end
|
|
1765
|
+
return data, status_code, headers
|
|
1766
|
+
end
|
|
1767
|
+
|
|
1768
|
+
# Write a storefront file
|
|
1769
|
+
# 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.
|
|
1770
|
+
# @param storefront_oid [Integer]
|
|
1771
|
+
# @param if_match [String] Content hash from the last read. Required; 428 when absent, 412 when stale.
|
|
1772
|
+
# @param file_write_request [SfvbFileWriteRequest] File content to write
|
|
1773
|
+
# @param [Hash] opts the optional parameters
|
|
1774
|
+
# @option opts [String] :path
|
|
1775
|
+
# @return [SfvbFileWriteResponse]
|
|
1776
|
+
def put_sfvb_file_content(storefront_oid, if_match, file_write_request, opts = {})
|
|
1777
|
+
data, _status_code, _headers = put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts)
|
|
1778
|
+
data
|
|
1779
|
+
end
|
|
1780
|
+
|
|
1781
|
+
# Write a storefront file
|
|
1782
|
+
# 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.
|
|
1783
|
+
# @param storefront_oid [Integer]
|
|
1784
|
+
# @param if_match [String] Content hash from the last read. Required; 428 when absent, 412 when stale.
|
|
1785
|
+
# @param file_write_request [SfvbFileWriteRequest] File content to write
|
|
1786
|
+
# @param [Hash] opts the optional parameters
|
|
1787
|
+
# @option opts [String] :path
|
|
1788
|
+
# @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
|
|
1789
|
+
def put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts = {})
|
|
1790
|
+
if @api_client.config.debugging
|
|
1791
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_file_content ...'
|
|
1792
|
+
end
|
|
1793
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1794
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1795
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_file_content"
|
|
1796
|
+
end
|
|
1797
|
+
# verify the required parameter 'if_match' is set
|
|
1798
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
1799
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_file_content"
|
|
1800
|
+
end
|
|
1801
|
+
# verify the required parameter 'file_write_request' is set
|
|
1802
|
+
if @api_client.config.client_side_validation && file_write_request.nil?
|
|
1803
|
+
fail ArgumentError, "Missing the required parameter 'file_write_request' when calling SfvbApi.put_sfvb_file_content"
|
|
1804
|
+
end
|
|
1805
|
+
# resource path
|
|
1806
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1807
|
+
|
|
1808
|
+
# query parameters
|
|
1809
|
+
query_params = opts[:query_params] || {}
|
|
1810
|
+
query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
|
|
1811
|
+
|
|
1812
|
+
# header parameters
|
|
1813
|
+
header_params = opts[:header_params] || {}
|
|
1814
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1815
|
+
# HTTP header 'Accept' (if needed)
|
|
1816
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1817
|
+
# HTTP header 'Content-Type'
|
|
1818
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1819
|
+
if !content_type.nil?
|
|
1820
|
+
header_params['Content-Type'] = content_type
|
|
1821
|
+
end
|
|
1822
|
+
header_params[:'If-Match'] = if_match
|
|
1823
|
+
|
|
1824
|
+
# form parameters
|
|
1825
|
+
form_params = opts[:form_params] || {}
|
|
1826
|
+
|
|
1827
|
+
# http body (model)
|
|
1828
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(file_write_request)
|
|
1829
|
+
|
|
1830
|
+
# return_type
|
|
1831
|
+
return_type = opts[:debug_return_type] || 'SfvbFileWriteResponse'
|
|
1832
|
+
|
|
1833
|
+
# auth_names
|
|
1834
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1835
|
+
|
|
1836
|
+
new_options = opts.merge(
|
|
1837
|
+
:operation => :"SfvbApi.put_sfvb_file_content",
|
|
1838
|
+
:header_params => header_params,
|
|
1839
|
+
:query_params => query_params,
|
|
1840
|
+
:form_params => form_params,
|
|
1841
|
+
:body => post_body,
|
|
1842
|
+
:auth_names => auth_names,
|
|
1843
|
+
:return_type => return_type
|
|
1844
|
+
)
|
|
1845
|
+
|
|
1846
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1847
|
+
if @api_client.config.debugging
|
|
1848
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_file_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1849
|
+
end
|
|
1850
|
+
return data, status_code, headers
|
|
1851
|
+
end
|
|
1852
|
+
|
|
1853
|
+
# Push containers into a preview session
|
|
1854
|
+
# Stores compiled containers against a session created by createSfvbPreviewSession. Replaces whatever the session held. Nothing durable is written. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1855
|
+
# @param storefront_oid [Integer]
|
|
1856
|
+
# @param preview_session_id [String]
|
|
1857
|
+
# @param preview_session [SfvbPreviewSessionRequest] Containers to stage in the preview session
|
|
1858
|
+
# @param [Hash] opts the optional parameters
|
|
1859
|
+
# @option opts [Integer] :theme_oid
|
|
1860
|
+
# @return [SfvbPreviewSessionResponse]
|
|
1861
|
+
def put_sfvb_preview_session(storefront_oid, preview_session_id, preview_session, opts = {})
|
|
1862
|
+
data, _status_code, _headers = put_sfvb_preview_session_with_http_info(storefront_oid, preview_session_id, preview_session, opts)
|
|
1863
|
+
data
|
|
1864
|
+
end
|
|
1865
|
+
|
|
1866
|
+
# Push containers into a preview session
|
|
1867
|
+
# Stores compiled containers against a session created by createSfvbPreviewSession. Replaces whatever the session held. Nothing durable is written. Requires a token that resolves to a user, so use the device authorization flow.
|
|
1868
|
+
# @param storefront_oid [Integer]
|
|
1869
|
+
# @param preview_session_id [String]
|
|
1870
|
+
# @param preview_session [SfvbPreviewSessionRequest] Containers to stage in the preview session
|
|
1871
|
+
# @param [Hash] opts the optional parameters
|
|
1872
|
+
# @option opts [Integer] :theme_oid
|
|
1873
|
+
# @return [Array<(SfvbPreviewSessionResponse, Integer, Hash)>] SfvbPreviewSessionResponse data, response status code and response headers
|
|
1874
|
+
def put_sfvb_preview_session_with_http_info(storefront_oid, preview_session_id, preview_session, opts = {})
|
|
1875
|
+
if @api_client.config.debugging
|
|
1876
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_preview_session ...'
|
|
1877
|
+
end
|
|
1878
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1879
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1880
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_preview_session"
|
|
1881
|
+
end
|
|
1882
|
+
# verify the required parameter 'preview_session_id' is set
|
|
1883
|
+
if @api_client.config.client_side_validation && preview_session_id.nil?
|
|
1884
|
+
fail ArgumentError, "Missing the required parameter 'preview_session_id' when calling SfvbApi.put_sfvb_preview_session"
|
|
1885
|
+
end
|
|
1886
|
+
# verify the required parameter 'preview_session' is set
|
|
1887
|
+
if @api_client.config.client_side_validation && preview_session.nil?
|
|
1888
|
+
fail ArgumentError, "Missing the required parameter 'preview_session' when calling SfvbApi.put_sfvb_preview_session"
|
|
1889
|
+
end
|
|
1890
|
+
# resource path
|
|
1891
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'preview_session_id' + '}', CGI.escape(preview_session_id.to_s))
|
|
1892
|
+
|
|
1893
|
+
# query parameters
|
|
1894
|
+
query_params = opts[:query_params] || {}
|
|
1895
|
+
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
1896
|
+
|
|
1897
|
+
# header parameters
|
|
1898
|
+
header_params = opts[:header_params] || {}
|
|
1899
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1900
|
+
# HTTP header 'Accept' (if needed)
|
|
1901
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1902
|
+
# HTTP header 'Content-Type'
|
|
1903
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1904
|
+
if !content_type.nil?
|
|
1905
|
+
header_params['Content-Type'] = content_type
|
|
1906
|
+
end
|
|
1907
|
+
|
|
1908
|
+
# form parameters
|
|
1909
|
+
form_params = opts[:form_params] || {}
|
|
1910
|
+
|
|
1911
|
+
# http body (model)
|
|
1912
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(preview_session)
|
|
1913
|
+
|
|
1914
|
+
# return_type
|
|
1915
|
+
return_type = opts[:debug_return_type] || 'SfvbPreviewSessionResponse'
|
|
1916
|
+
|
|
1917
|
+
# auth_names
|
|
1918
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1919
|
+
|
|
1920
|
+
new_options = opts.merge(
|
|
1921
|
+
:operation => :"SfvbApi.put_sfvb_preview_session",
|
|
1922
|
+
:header_params => header_params,
|
|
1923
|
+
:query_params => query_params,
|
|
1924
|
+
:form_params => form_params,
|
|
1925
|
+
:body => post_body,
|
|
1926
|
+
:auth_names => auth_names,
|
|
1927
|
+
:return_type => return_type
|
|
1928
|
+
)
|
|
1929
|
+
|
|
1930
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1931
|
+
if @api_client.config.debugging
|
|
1932
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_preview_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1933
|
+
end
|
|
1934
|
+
return data, status_code, headers
|
|
1935
|
+
end
|
|
1936
|
+
|
|
1937
|
+
# Render a CJSON node to HTML
|
|
1938
|
+
# 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.
|
|
1939
|
+
# @param storefront_oid [Integer]
|
|
1940
|
+
# @param theme_oid [Integer]
|
|
1941
|
+
# @param render_request [SfvbRenderRequest] Widgets to render
|
|
1942
|
+
# @param [Hash] opts the optional parameters
|
|
1943
|
+
# @return [SfvbRenderResponse]
|
|
1944
|
+
def render_sfvb_widgets(storefront_oid, theme_oid, render_request, opts = {})
|
|
1945
|
+
data, _status_code, _headers = render_sfvb_widgets_with_http_info(storefront_oid, theme_oid, render_request, opts)
|
|
1946
|
+
data
|
|
1947
|
+
end
|
|
1948
|
+
|
|
1949
|
+
# Render a CJSON node to HTML
|
|
1950
|
+
# 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.
|
|
1951
|
+
# @param storefront_oid [Integer]
|
|
1952
|
+
# @param theme_oid [Integer]
|
|
1953
|
+
# @param render_request [SfvbRenderRequest] Widgets to render
|
|
1954
|
+
# @param [Hash] opts the optional parameters
|
|
1955
|
+
# @return [Array<(SfvbRenderResponse, Integer, Hash)>] SfvbRenderResponse data, response status code and response headers
|
|
1956
|
+
def render_sfvb_widgets_with_http_info(storefront_oid, theme_oid, render_request, opts = {})
|
|
1957
|
+
if @api_client.config.debugging
|
|
1958
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.render_sfvb_widgets ...'
|
|
1959
|
+
end
|
|
1960
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1961
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1962
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.render_sfvb_widgets"
|
|
1963
|
+
end
|
|
1964
|
+
# verify the required parameter 'theme_oid' is set
|
|
1965
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
1966
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.render_sfvb_widgets"
|
|
1967
|
+
end
|
|
1968
|
+
# verify the required parameter 'render_request' is set
|
|
1969
|
+
if @api_client.config.client_side_validation && render_request.nil?
|
|
1970
|
+
fail ArgumentError, "Missing the required parameter 'render_request' when calling SfvbApi.render_sfvb_widgets"
|
|
1971
|
+
end
|
|
1972
|
+
# resource path
|
|
1973
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/render'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'theme_oid' + '}', CGI.escape(theme_oid.to_s))
|
|
1974
|
+
|
|
1975
|
+
# query parameters
|
|
1976
|
+
query_params = opts[:query_params] || {}
|
|
1977
|
+
|
|
1978
|
+
# header parameters
|
|
1979
|
+
header_params = opts[:header_params] || {}
|
|
1980
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1981
|
+
# HTTP header 'Accept' (if needed)
|
|
1982
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1983
|
+
# HTTP header 'Content-Type'
|
|
1984
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1985
|
+
if !content_type.nil?
|
|
1986
|
+
header_params['Content-Type'] = content_type
|
|
1987
|
+
end
|
|
1988
|
+
|
|
1989
|
+
# form parameters
|
|
1990
|
+
form_params = opts[:form_params] || {}
|
|
1991
|
+
|
|
1992
|
+
# http body (model)
|
|
1993
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(render_request)
|
|
1994
|
+
|
|
1995
|
+
# return_type
|
|
1996
|
+
return_type = opts[:debug_return_type] || 'SfvbRenderResponse'
|
|
1997
|
+
|
|
1998
|
+
# auth_names
|
|
1999
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2000
|
+
|
|
2001
|
+
new_options = opts.merge(
|
|
2002
|
+
:operation => :"SfvbApi.render_sfvb_widgets",
|
|
2003
|
+
:header_params => header_params,
|
|
2004
|
+
:query_params => query_params,
|
|
2005
|
+
:form_params => form_params,
|
|
2006
|
+
:body => post_body,
|
|
2007
|
+
:auth_names => auth_names,
|
|
2008
|
+
:return_type => return_type
|
|
2009
|
+
)
|
|
2010
|
+
|
|
2011
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2012
|
+
if @api_client.config.debugging
|
|
2013
|
+
@api_client.config.logger.debug "API called: SfvbApi#render_sfvb_widgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2014
|
+
end
|
|
2015
|
+
return data, status_code, headers
|
|
2016
|
+
end
|
|
2017
|
+
|
|
2018
|
+
# Reserve a block of widget ids
|
|
2019
|
+
# Widget ids are allocated by the server, not invented by the caller. Reserve a block, then form ids as elementType-number. This is the single most likely thing to get wrong on a first write. A POST rather than a GET because it consumes a sequence. A GET that mutates will eventually be prefetched, retried or cached by something that assumed it was safe.
|
|
2020
|
+
# @param storefront_oid [Integer]
|
|
2021
|
+
# @param [Hash] opts the optional parameters
|
|
2022
|
+
# @option opts [Integer] :count
|
|
2023
|
+
# @return [SfvbWidgetIdsResponse]
|
|
2024
|
+
def reserve_sfvb_widget_ids(storefront_oid, opts = {})
|
|
2025
|
+
data, _status_code, _headers = reserve_sfvb_widget_ids_with_http_info(storefront_oid, opts)
|
|
2026
|
+
data
|
|
2027
|
+
end
|
|
2028
|
+
|
|
2029
|
+
# Reserve a block of widget ids
|
|
2030
|
+
# Widget ids are allocated by the server, not invented by the caller. Reserve a block, then form ids as elementType-number. This is the single most likely thing to get wrong on a first write. A POST rather than a GET because it consumes a sequence. A GET that mutates will eventually be prefetched, retried or cached by something that assumed it was safe.
|
|
2031
|
+
# @param storefront_oid [Integer]
|
|
2032
|
+
# @param [Hash] opts the optional parameters
|
|
2033
|
+
# @option opts [Integer] :count
|
|
2034
|
+
# @return [Array<(SfvbWidgetIdsResponse, Integer, Hash)>] SfvbWidgetIdsResponse data, response status code and response headers
|
|
2035
|
+
def reserve_sfvb_widget_ids_with_http_info(storefront_oid, opts = {})
|
|
2036
|
+
if @api_client.config.debugging
|
|
2037
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.reserve_sfvb_widget_ids ...'
|
|
2038
|
+
end
|
|
2039
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2040
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2041
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.reserve_sfvb_widget_ids"
|
|
2042
|
+
end
|
|
2043
|
+
# resource path
|
|
2044
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/widget_ids'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2045
|
+
|
|
2046
|
+
# query parameters
|
|
2047
|
+
query_params = opts[:query_params] || {}
|
|
2048
|
+
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
|
2049
|
+
|
|
2050
|
+
# header parameters
|
|
2051
|
+
header_params = opts[:header_params] || {}
|
|
2052
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2053
|
+
# HTTP header 'Accept' (if needed)
|
|
2054
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2055
|
+
|
|
2056
|
+
# form parameters
|
|
2057
|
+
form_params = opts[:form_params] || {}
|
|
2058
|
+
|
|
2059
|
+
# http body (model)
|
|
2060
|
+
post_body = opts[:debug_body]
|
|
2061
|
+
|
|
2062
|
+
# return_type
|
|
2063
|
+
return_type = opts[:debug_return_type] || 'SfvbWidgetIdsResponse'
|
|
2064
|
+
|
|
2065
|
+
# auth_names
|
|
2066
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2067
|
+
|
|
2068
|
+
new_options = opts.merge(
|
|
2069
|
+
:operation => :"SfvbApi.reserve_sfvb_widget_ids",
|
|
2070
|
+
:header_params => header_params,
|
|
2071
|
+
:query_params => query_params,
|
|
2072
|
+
:form_params => form_params,
|
|
2073
|
+
:body => post_body,
|
|
2074
|
+
:auth_names => auth_names,
|
|
2075
|
+
:return_type => return_type
|
|
2076
|
+
)
|
|
2077
|
+
|
|
2078
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2079
|
+
if @api_client.config.debugging
|
|
2080
|
+
@api_client.config.logger.debug "API called: SfvbApi#reserve_sfvb_widget_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2081
|
+
end
|
|
2082
|
+
return data, status_code, headers
|
|
2083
|
+
end
|
|
2084
|
+
|
|
2085
|
+
# Revert a container stored outside the file system
|
|
2086
|
+
# The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
2087
|
+
# @param storefront_oid [Integer]
|
|
2088
|
+
# @param owner_type [String]
|
|
2089
|
+
# @param owner_object_id [String]
|
|
2090
|
+
# @param if_match [String] CJSON hash of the container being reverted. Required; 428 when absent, 412 when stale.
|
|
2091
|
+
# @param container_revert_request [SfvbContainerRevertRequest] Version to revert the container to
|
|
2092
|
+
# @param [Hash] opts the optional parameters
|
|
2093
|
+
# @option opts [String] :container_name
|
|
2094
|
+
# @return [SfvbContainerResponse]
|
|
2095
|
+
def revert_sfvb_container(storefront_oid, owner_type, owner_object_id, if_match, container_revert_request, opts = {})
|
|
2096
|
+
data, _status_code, _headers = revert_sfvb_container_with_http_info(storefront_oid, owner_type, owner_object_id, if_match, container_revert_request, opts)
|
|
2097
|
+
data
|
|
2098
|
+
end
|
|
2099
|
+
|
|
2100
|
+
# Revert a container stored outside the file system
|
|
2101
|
+
# The restore is itself snapshotted, so a revert can be undone in turn. Reverting to an entry recorded before the container existed removes it again. Addressed through the owning container and guarded by If-Match, because a revert overwrites live content just as much as an ordinary write does.
|
|
2102
|
+
# @param storefront_oid [Integer]
|
|
2103
|
+
# @param owner_type [String]
|
|
2104
|
+
# @param owner_object_id [String]
|
|
2105
|
+
# @param if_match [String] CJSON hash of the container being reverted. Required; 428 when absent, 412 when stale.
|
|
2106
|
+
# @param container_revert_request [SfvbContainerRevertRequest] Version to revert the container to
|
|
2107
|
+
# @param [Hash] opts the optional parameters
|
|
2108
|
+
# @option opts [String] :container_name
|
|
2109
|
+
# @return [Array<(SfvbContainerResponse, Integer, Hash)>] SfvbContainerResponse data, response status code and response headers
|
|
2110
|
+
def revert_sfvb_container_with_http_info(storefront_oid, owner_type, owner_object_id, if_match, container_revert_request, opts = {})
|
|
2111
|
+
if @api_client.config.debugging
|
|
2112
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.revert_sfvb_container ...'
|
|
2113
|
+
end
|
|
2114
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2115
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2116
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.revert_sfvb_container"
|
|
2117
|
+
end
|
|
2118
|
+
# verify the required parameter 'owner_type' is set
|
|
2119
|
+
if @api_client.config.client_side_validation && owner_type.nil?
|
|
2120
|
+
fail ArgumentError, "Missing the required parameter 'owner_type' when calling SfvbApi.revert_sfvb_container"
|
|
2121
|
+
end
|
|
2122
|
+
# verify the required parameter 'owner_object_id' is set
|
|
2123
|
+
if @api_client.config.client_side_validation && owner_object_id.nil?
|
|
2124
|
+
fail ArgumentError, "Missing the required parameter 'owner_object_id' when calling SfvbApi.revert_sfvb_container"
|
|
2125
|
+
end
|
|
2126
|
+
# verify the required parameter 'if_match' is set
|
|
2127
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
2128
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.revert_sfvb_container"
|
|
2129
|
+
end
|
|
2130
|
+
# verify the required parameter 'container_revert_request' is set
|
|
2131
|
+
if @api_client.config.client_side_validation && container_revert_request.nil?
|
|
2132
|
+
fail ArgumentError, "Missing the required parameter 'container_revert_request' when calling SfvbApi.revert_sfvb_container"
|
|
2133
|
+
end
|
|
2134
|
+
# resource path
|
|
2135
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
|
|
2136
|
+
|
|
2137
|
+
# query parameters
|
|
2138
|
+
query_params = opts[:query_params] || {}
|
|
2139
|
+
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
2140
|
+
|
|
2141
|
+
# header parameters
|
|
2142
|
+
header_params = opts[:header_params] || {}
|
|
2143
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2144
|
+
# HTTP header 'Accept' (if needed)
|
|
2145
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2146
|
+
# HTTP header 'Content-Type'
|
|
2147
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2148
|
+
if !content_type.nil?
|
|
2149
|
+
header_params['Content-Type'] = content_type
|
|
2150
|
+
end
|
|
2151
|
+
header_params[:'If-Match'] = if_match
|
|
2152
|
+
|
|
2153
|
+
# form parameters
|
|
2154
|
+
form_params = opts[:form_params] || {}
|
|
2155
|
+
|
|
2156
|
+
# http body (model)
|
|
2157
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(container_revert_request)
|
|
2158
|
+
|
|
2159
|
+
# return_type
|
|
2160
|
+
return_type = opts[:debug_return_type] || 'SfvbContainerResponse'
|
|
2161
|
+
|
|
2162
|
+
# auth_names
|
|
2163
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2164
|
+
|
|
2165
|
+
new_options = opts.merge(
|
|
2166
|
+
:operation => :"SfvbApi.revert_sfvb_container",
|
|
2167
|
+
:header_params => header_params,
|
|
2168
|
+
:query_params => query_params,
|
|
2169
|
+
:form_params => form_params,
|
|
2170
|
+
:body => post_body,
|
|
2171
|
+
:auth_names => auth_names,
|
|
2172
|
+
:return_type => return_type
|
|
2173
|
+
)
|
|
2174
|
+
|
|
2175
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2176
|
+
if @api_client.config.debugging
|
|
2177
|
+
@api_client.config.logger.debug "API called: SfvbApi#revert_sfvb_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2178
|
+
end
|
|
2179
|
+
return data, status_code, headers
|
|
2180
|
+
end
|
|
2181
|
+
|
|
2182
|
+
# Revert a storefront file to an earlier version
|
|
2183
|
+
# The revert lands as a new version, so it is itself undoable.
|
|
2184
|
+
# @param storefront_oid [Integer]
|
|
2185
|
+
# @param if_match [String] Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
|
|
2186
|
+
# @param file_revert_request [SfvbFileRevertRequest] Version to revert the file to
|
|
2187
|
+
# @param [Hash] opts the optional parameters
|
|
2188
|
+
# @return [SfvbFileWriteResponse]
|
|
2189
|
+
def revert_sfvb_file(storefront_oid, if_match, file_revert_request, opts = {})
|
|
2190
|
+
data, _status_code, _headers = revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts)
|
|
2191
|
+
data
|
|
2192
|
+
end
|
|
2193
|
+
|
|
2194
|
+
# Revert a storefront file to an earlier version
|
|
2195
|
+
# The revert lands as a new version, so it is itself undoable.
|
|
2196
|
+
# @param storefront_oid [Integer]
|
|
2197
|
+
# @param if_match [String] Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
|
|
2198
|
+
# @param file_revert_request [SfvbFileRevertRequest] Version to revert the file to
|
|
2199
|
+
# @param [Hash] opts the optional parameters
|
|
2200
|
+
# @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
|
|
2201
|
+
def revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts = {})
|
|
2202
|
+
if @api_client.config.debugging
|
|
2203
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.revert_sfvb_file ...'
|
|
2204
|
+
end
|
|
2205
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2206
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2207
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.revert_sfvb_file"
|
|
2208
|
+
end
|
|
2209
|
+
# verify the required parameter 'if_match' is set
|
|
2210
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
2211
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.revert_sfvb_file"
|
|
2212
|
+
end
|
|
2213
|
+
# verify the required parameter 'file_revert_request' is set
|
|
2214
|
+
if @api_client.config.client_side_validation && file_revert_request.nil?
|
|
2215
|
+
fail ArgumentError, "Missing the required parameter 'file_revert_request' when calling SfvbApi.revert_sfvb_file"
|
|
2216
|
+
end
|
|
2217
|
+
# resource path
|
|
2218
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/revert'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2219
|
+
|
|
2220
|
+
# query parameters
|
|
2221
|
+
query_params = opts[:query_params] || {}
|
|
2222
|
+
|
|
2223
|
+
# header parameters
|
|
2224
|
+
header_params = opts[:header_params] || {}
|
|
2225
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2226
|
+
# HTTP header 'Accept' (if needed)
|
|
2227
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2228
|
+
# HTTP header 'Content-Type'
|
|
2229
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2230
|
+
if !content_type.nil?
|
|
2231
|
+
header_params['Content-Type'] = content_type
|
|
2232
|
+
end
|
|
2233
|
+
header_params[:'If-Match'] = if_match
|
|
2234
|
+
|
|
2235
|
+
# form parameters
|
|
2236
|
+
form_params = opts[:form_params] || {}
|
|
2237
|
+
|
|
2238
|
+
# http body (model)
|
|
2239
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(file_revert_request)
|
|
2240
|
+
|
|
2241
|
+
# return_type
|
|
2242
|
+
return_type = opts[:debug_return_type] || 'SfvbFileWriteResponse'
|
|
2243
|
+
|
|
2244
|
+
# auth_names
|
|
2245
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2246
|
+
|
|
2247
|
+
new_options = opts.merge(
|
|
2248
|
+
:operation => :"SfvbApi.revert_sfvb_file",
|
|
2249
|
+
:header_params => header_params,
|
|
2250
|
+
:query_params => query_params,
|
|
2251
|
+
:form_params => form_params,
|
|
2252
|
+
:body => post_body,
|
|
2253
|
+
:auth_names => auth_names,
|
|
2254
|
+
:return_type => return_type
|
|
2255
|
+
)
|
|
2256
|
+
|
|
2257
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2258
|
+
if @api_client.config.debugging
|
|
2259
|
+
@api_client.config.logger.debug "API called: SfvbApi#revert_sfvb_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2260
|
+
end
|
|
2261
|
+
return data, status_code, headers
|
|
2262
|
+
end
|
|
2263
|
+
|
|
2264
|
+
# Search storefront files
|
|
2265
|
+
# Searches names and, when text is supplied, file contents. For a CLI with no local copy this is the only way to answer where something is defined without walking the whole tree. Results are capped and truncation is always reported.
|
|
2266
|
+
# @param storefront_oid [Integer]
|
|
2267
|
+
# @param search_request [SfvbFileSearchRequest] File search
|
|
2268
|
+
# @param [Hash] opts the optional parameters
|
|
2269
|
+
# @return [SfvbFileSearchResponse]
|
|
2270
|
+
def search_sfvb_files(storefront_oid, search_request, opts = {})
|
|
2271
|
+
data, _status_code, _headers = search_sfvb_files_with_http_info(storefront_oid, search_request, opts)
|
|
2272
|
+
data
|
|
2273
|
+
end
|
|
2274
|
+
|
|
2275
|
+
# Search storefront files
|
|
2276
|
+
# Searches names and, when text is supplied, file contents. For a CLI with no local copy this is the only way to answer where something is defined without walking the whole tree. Results are capped and truncation is always reported.
|
|
2277
|
+
# @param storefront_oid [Integer]
|
|
2278
|
+
# @param search_request [SfvbFileSearchRequest] File search
|
|
2279
|
+
# @param [Hash] opts the optional parameters
|
|
2280
|
+
# @return [Array<(SfvbFileSearchResponse, Integer, Hash)>] SfvbFileSearchResponse data, response status code and response headers
|
|
2281
|
+
def search_sfvb_files_with_http_info(storefront_oid, search_request, opts = {})
|
|
2282
|
+
if @api_client.config.debugging
|
|
2283
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.search_sfvb_files ...'
|
|
2284
|
+
end
|
|
2285
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2286
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2287
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.search_sfvb_files"
|
|
2288
|
+
end
|
|
2289
|
+
# verify the required parameter 'search_request' is set
|
|
2290
|
+
if @api_client.config.client_side_validation && search_request.nil?
|
|
2291
|
+
fail ArgumentError, "Missing the required parameter 'search_request' when calling SfvbApi.search_sfvb_files"
|
|
2292
|
+
end
|
|
2293
|
+
# resource path
|
|
2294
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/search'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2295
|
+
|
|
2296
|
+
# query parameters
|
|
2297
|
+
query_params = opts[:query_params] || {}
|
|
2298
|
+
|
|
2299
|
+
# header parameters
|
|
2300
|
+
header_params = opts[:header_params] || {}
|
|
2301
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2302
|
+
# HTTP header 'Accept' (if needed)
|
|
2303
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2304
|
+
# HTTP header 'Content-Type'
|
|
2305
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2306
|
+
if !content_type.nil?
|
|
2307
|
+
header_params['Content-Type'] = content_type
|
|
2308
|
+
end
|
|
2309
|
+
|
|
2310
|
+
# form parameters
|
|
2311
|
+
form_params = opts[:form_params] || {}
|
|
2312
|
+
|
|
2313
|
+
# http body (model)
|
|
2314
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(search_request)
|
|
2315
|
+
|
|
2316
|
+
# return_type
|
|
2317
|
+
return_type = opts[:debug_return_type] || 'SfvbFileSearchResponse'
|
|
2318
|
+
|
|
2319
|
+
# auth_names
|
|
2320
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2321
|
+
|
|
2322
|
+
new_options = opts.merge(
|
|
2323
|
+
:operation => :"SfvbApi.search_sfvb_files",
|
|
2324
|
+
:header_params => header_params,
|
|
2325
|
+
:query_params => query_params,
|
|
2326
|
+
:form_params => form_params,
|
|
2327
|
+
:body => post_body,
|
|
2328
|
+
:auth_names => auth_names,
|
|
2329
|
+
:return_type => return_type
|
|
2330
|
+
)
|
|
2331
|
+
|
|
2332
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2333
|
+
if @api_client.config.debugging
|
|
2334
|
+
@api_client.config.logger.debug "API called: SfvbApi#search_sfvb_files\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2335
|
+
end
|
|
2336
|
+
return data, status_code, headers
|
|
2337
|
+
end
|
|
2338
|
+
|
|
2339
|
+
# Search the element library
|
|
2340
|
+
# Known-good CJSON fragments a human already built out of real elements. This is what a lint warning about a monolithic html element should point at - a warning that names a fragment solving the same problem is an instruction, where a warning on its own is only criticism. Results are terse; fetch a single entry for its CJSON. Narrow with facet_{name}={option} query parameters.
|
|
2341
|
+
# @param storefront_oid [Integer]
|
|
2342
|
+
# @param [Hash] opts the optional parameters
|
|
2343
|
+
# @option opts [String] :segment
|
|
2344
|
+
# @option opts [String] :search
|
|
2345
|
+
# @option opts [Integer] :page_number
|
|
2346
|
+
# @option opts [Integer] :results_per_page
|
|
2347
|
+
# @return [SfvbLibraryResponse]
|
|
2348
|
+
def search_sfvb_library(storefront_oid, opts = {})
|
|
2349
|
+
data, _status_code, _headers = search_sfvb_library_with_http_info(storefront_oid, opts)
|
|
2350
|
+
data
|
|
2351
|
+
end
|
|
2352
|
+
|
|
2353
|
+
# Search the element library
|
|
2354
|
+
# Known-good CJSON fragments a human already built out of real elements. This is what a lint warning about a monolithic html element should point at - a warning that names a fragment solving the same problem is an instruction, where a warning on its own is only criticism. Results are terse; fetch a single entry for its CJSON. Narrow with facet_{name}={option} query parameters.
|
|
2355
|
+
# @param storefront_oid [Integer]
|
|
2356
|
+
# @param [Hash] opts the optional parameters
|
|
2357
|
+
# @option opts [String] :segment
|
|
2358
|
+
# @option opts [String] :search
|
|
2359
|
+
# @option opts [Integer] :page_number
|
|
2360
|
+
# @option opts [Integer] :results_per_page
|
|
2361
|
+
# @return [Array<(SfvbLibraryResponse, Integer, Hash)>] SfvbLibraryResponse data, response status code and response headers
|
|
2362
|
+
def search_sfvb_library_with_http_info(storefront_oid, opts = {})
|
|
2363
|
+
if @api_client.config.debugging
|
|
2364
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.search_sfvb_library ...'
|
|
2365
|
+
end
|
|
2366
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2367
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2368
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.search_sfvb_library"
|
|
2369
|
+
end
|
|
2370
|
+
# resource path
|
|
2371
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2372
|
+
|
|
2373
|
+
# query parameters
|
|
2374
|
+
query_params = opts[:query_params] || {}
|
|
2375
|
+
query_params[:'segment'] = opts[:'segment'] if !opts[:'segment'].nil?
|
|
2376
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
2377
|
+
query_params[:'page_number'] = opts[:'page_number'] if !opts[:'page_number'].nil?
|
|
2378
|
+
query_params[:'results_per_page'] = opts[:'results_per_page'] if !opts[:'results_per_page'].nil?
|
|
2379
|
+
|
|
2380
|
+
# header parameters
|
|
2381
|
+
header_params = opts[:header_params] || {}
|
|
2382
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2383
|
+
# HTTP header 'Accept' (if needed)
|
|
2384
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2385
|
+
|
|
2386
|
+
# form parameters
|
|
2387
|
+
form_params = opts[:form_params] || {}
|
|
2388
|
+
|
|
2389
|
+
# http body (model)
|
|
2390
|
+
post_body = opts[:debug_body]
|
|
2391
|
+
|
|
2392
|
+
# return_type
|
|
2393
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryResponse'
|
|
2394
|
+
|
|
2395
|
+
# auth_names
|
|
2396
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2397
|
+
|
|
2398
|
+
new_options = opts.merge(
|
|
2399
|
+
:operation => :"SfvbApi.search_sfvb_library",
|
|
2400
|
+
:header_params => header_params,
|
|
2401
|
+
:query_params => query_params,
|
|
2402
|
+
:form_params => form_params,
|
|
2403
|
+
:body => post_body,
|
|
2404
|
+
:auth_names => auth_names,
|
|
2405
|
+
:return_type => return_type
|
|
2406
|
+
)
|
|
2407
|
+
|
|
2408
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2409
|
+
if @api_client.config.debugging
|
|
2410
|
+
@api_client.config.logger.debug "API called: SfvbApi#search_sfvb_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2411
|
+
end
|
|
2412
|
+
return data, status_code, headers
|
|
2413
|
+
end
|
|
2414
|
+
|
|
2415
|
+
# Validate CJSON
|
|
2416
|
+
# Runs the structural schema, the contextual business rules for the destination owner type, and the quality lint. A document that fails returns HTTP 200 with valid false rather than a transport error - the request was well formed, the document was not.
|
|
2417
|
+
# @param validate_request [SfvbValidateRequest] CJSON to validate
|
|
2418
|
+
# @param [Hash] opts the optional parameters
|
|
2419
|
+
# @return [SfvbValidationResponse]
|
|
2420
|
+
def validate_sfvb_cjson(validate_request, opts = {})
|
|
2421
|
+
data, _status_code, _headers = validate_sfvb_cjson_with_http_info(validate_request, opts)
|
|
2422
|
+
data
|
|
2423
|
+
end
|
|
2424
|
+
|
|
2425
|
+
# Validate CJSON
|
|
2426
|
+
# Runs the structural schema, the contextual business rules for the destination owner type, and the quality lint. A document that fails returns HTTP 200 with valid false rather than a transport error - the request was well formed, the document was not.
|
|
2427
|
+
# @param validate_request [SfvbValidateRequest] CJSON to validate
|
|
2428
|
+
# @param [Hash] opts the optional parameters
|
|
2429
|
+
# @return [Array<(SfvbValidationResponse, Integer, Hash)>] SfvbValidationResponse data, response status code and response headers
|
|
2430
|
+
def validate_sfvb_cjson_with_http_info(validate_request, opts = {})
|
|
2431
|
+
if @api_client.config.debugging
|
|
2432
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.validate_sfvb_cjson ...'
|
|
2433
|
+
end
|
|
2434
|
+
# verify the required parameter 'validate_request' is set
|
|
2435
|
+
if @api_client.config.client_side_validation && validate_request.nil?
|
|
2436
|
+
fail ArgumentError, "Missing the required parameter 'validate_request' when calling SfvbApi.validate_sfvb_cjson"
|
|
2437
|
+
end
|
|
2438
|
+
# resource path
|
|
2439
|
+
local_var_path = '/sfvb/cjson/validate'
|
|
2440
|
+
|
|
2441
|
+
# query parameters
|
|
2442
|
+
query_params = opts[:query_params] || {}
|
|
2443
|
+
|
|
2444
|
+
# header parameters
|
|
2445
|
+
header_params = opts[:header_params] || {}
|
|
2446
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2447
|
+
# HTTP header 'Accept' (if needed)
|
|
2448
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2449
|
+
# HTTP header 'Content-Type'
|
|
2450
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2451
|
+
if !content_type.nil?
|
|
2452
|
+
header_params['Content-Type'] = content_type
|
|
2453
|
+
end
|
|
2454
|
+
|
|
2455
|
+
# form parameters
|
|
2456
|
+
form_params = opts[:form_params] || {}
|
|
2457
|
+
|
|
2458
|
+
# http body (model)
|
|
2459
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(validate_request)
|
|
2460
|
+
|
|
2461
|
+
# return_type
|
|
2462
|
+
return_type = opts[:debug_return_type] || 'SfvbValidationResponse'
|
|
2463
|
+
|
|
2464
|
+
# auth_names
|
|
2465
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2466
|
+
|
|
2467
|
+
new_options = opts.merge(
|
|
2468
|
+
:operation => :"SfvbApi.validate_sfvb_cjson",
|
|
2469
|
+
:header_params => header_params,
|
|
2470
|
+
:query_params => query_params,
|
|
2471
|
+
:form_params => form_params,
|
|
2472
|
+
:body => post_body,
|
|
2473
|
+
:auth_names => auth_names,
|
|
2474
|
+
:return_type => return_type
|
|
2475
|
+
)
|
|
2476
|
+
|
|
2477
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2478
|
+
if @api_client.config.debugging
|
|
2479
|
+
@api_client.config.logger.debug "API called: SfvbApi#validate_sfvb_cjson\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2480
|
+
end
|
|
2481
|
+
return data, status_code, headers
|
|
2482
|
+
end
|
|
2483
|
+
|
|
2484
|
+
# Validate a Velocity template against a theme
|
|
2485
|
+
# Theme scoped rather than stateless. Validation builds a theme template context and evaluates against it. Also applies the template sandbox, so an agent learns the rule before a write fails.
|
|
2486
|
+
# @param storefront_oid [Integer]
|
|
2487
|
+
# @param theme_oid [Integer]
|
|
2488
|
+
# @param velocity_validate_request [SfvbVelocityValidateRequest] Velocity template to validate
|
|
2489
|
+
# @param [Hash] opts the optional parameters
|
|
2490
|
+
# @return [SfvbValidationResponse]
|
|
2491
|
+
def validate_sfvb_velocity(storefront_oid, theme_oid, velocity_validate_request, opts = {})
|
|
2492
|
+
data, _status_code, _headers = validate_sfvb_velocity_with_http_info(storefront_oid, theme_oid, velocity_validate_request, opts)
|
|
2493
|
+
data
|
|
2494
|
+
end
|
|
2495
|
+
|
|
2496
|
+
# Validate a Velocity template against a theme
|
|
2497
|
+
# Theme scoped rather than stateless. Validation builds a theme template context and evaluates against it. Also applies the template sandbox, so an agent learns the rule before a write fails.
|
|
2498
|
+
# @param storefront_oid [Integer]
|
|
2499
|
+
# @param theme_oid [Integer]
|
|
2500
|
+
# @param velocity_validate_request [SfvbVelocityValidateRequest] Velocity template to validate
|
|
2501
|
+
# @param [Hash] opts the optional parameters
|
|
2502
|
+
# @return [Array<(SfvbValidationResponse, Integer, Hash)>] SfvbValidationResponse data, response status code and response headers
|
|
2503
|
+
def validate_sfvb_velocity_with_http_info(storefront_oid, theme_oid, velocity_validate_request, opts = {})
|
|
2504
|
+
if @api_client.config.debugging
|
|
2505
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.validate_sfvb_velocity ...'
|
|
2506
|
+
end
|
|
2507
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2508
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2509
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.validate_sfvb_velocity"
|
|
2510
|
+
end
|
|
2511
|
+
# verify the required parameter 'theme_oid' is set
|
|
2512
|
+
if @api_client.config.client_side_validation && theme_oid.nil?
|
|
2513
|
+
fail ArgumentError, "Missing the required parameter 'theme_oid' when calling SfvbApi.validate_sfvb_velocity"
|
|
2514
|
+
end
|
|
2515
|
+
# verify the required parameter 'velocity_validate_request' is set
|
|
2516
|
+
if @api_client.config.client_side_validation && velocity_validate_request.nil?
|
|
2517
|
+
fail ArgumentError, "Missing the required parameter 'velocity_validate_request' when calling SfvbApi.validate_sfvb_velocity"
|
|
2518
|
+
end
|
|
2519
|
+
# resource path
|
|
2520
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/themes/{theme_oid}/velocity/validate'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'theme_oid' + '}', CGI.escape(theme_oid.to_s))
|
|
2521
|
+
|
|
2522
|
+
# query parameters
|
|
2523
|
+
query_params = opts[:query_params] || {}
|
|
2524
|
+
|
|
2525
|
+
# header parameters
|
|
2526
|
+
header_params = opts[:header_params] || {}
|
|
2527
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2528
|
+
# HTTP header 'Accept' (if needed)
|
|
2529
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2530
|
+
# HTTP header 'Content-Type'
|
|
2531
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
2532
|
+
if !content_type.nil?
|
|
2533
|
+
header_params['Content-Type'] = content_type
|
|
2534
|
+
end
|
|
2535
|
+
|
|
2536
|
+
# form parameters
|
|
2537
|
+
form_params = opts[:form_params] || {}
|
|
2538
|
+
|
|
2539
|
+
# http body (model)
|
|
2540
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(velocity_validate_request)
|
|
2541
|
+
|
|
2542
|
+
# return_type
|
|
2543
|
+
return_type = opts[:debug_return_type] || 'SfvbValidationResponse'
|
|
2544
|
+
|
|
2545
|
+
# auth_names
|
|
2546
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2547
|
+
|
|
2548
|
+
new_options = opts.merge(
|
|
2549
|
+
:operation => :"SfvbApi.validate_sfvb_velocity",
|
|
2550
|
+
:header_params => header_params,
|
|
2551
|
+
:query_params => query_params,
|
|
2552
|
+
:form_params => form_params,
|
|
2553
|
+
:body => post_body,
|
|
2554
|
+
:auth_names => auth_names,
|
|
2555
|
+
:return_type => return_type
|
|
2556
|
+
)
|
|
2557
|
+
|
|
2558
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2559
|
+
if @api_client.config.debugging
|
|
2560
|
+
@api_client.config.logger.debug "API called: SfvbApi#validate_sfvb_velocity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2561
|
+
end
|
|
2562
|
+
return data, status_code, headers
|
|
2563
|
+
end
|
|
2564
|
+
end
|
|
2565
|
+
end
|