ultracart_api 4.1.182 → 4.1.184
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 +37 -2
- data/docs/AutoOrderApi.md +28 -1
- data/docs/OrderApi.md +107 -3
- data/docs/SfvbApi.md +941 -50
- data/docs/SfvbLibraryAiReview.md +28 -0
- data/docs/SfvbLibraryContentManifest.md +26 -0
- data/docs/SfvbLibraryDeleteResult.md +20 -0
- data/docs/SfvbLibraryEntry.md +28 -0
- data/docs/SfvbLibraryEntryRequest.md +30 -0
- data/docs/SfvbLibraryFacet.md +2 -2
- data/docs/SfvbLibraryHistoryEntry.md +24 -0
- data/docs/SfvbLibraryInstallConflict.md +22 -0
- data/docs/SfvbLibraryInstallReceipt.md +32 -0
- data/docs/SfvbLibraryInstallRecord.md +32 -0
- data/docs/SfvbLibraryInstallRequest.md +22 -0
- data/docs/SfvbLibraryParameter.md +26 -0
- data/docs/SfvbLibraryPublishRequest.md +20 -0
- data/docs/SfvbLibraryScreenshotRequest.md +22 -0
- data/docs/SfvbLibraryShareRequest.md +18 -0
- data/docs/SfvbLibraryShareTarget.md +20 -0
- data/docs/SfvbLibraryTaxonomy.md +24 -0
- data/docs/SfvbLibraryTaxonomyCatalog.md +18 -0
- data/docs/SfvbLibraryUnshareResult.md +22 -0
- data/docs/SfvbWhoamiResponse.md +2 -0
- data/lib/ultracart_api/api/sfvb_api.rb +1334 -118
- data/lib/ultracart_api/models/sfvb_library_ai_review.rb +304 -0
- data/lib/ultracart_api/models/sfvb_library_content_manifest.rb +259 -0
- data/lib/ultracart_api/models/sfvb_library_delete_result.rb +264 -0
- data/lib/ultracart_api/models/sfvb_library_entry.rb +177 -1
- data/lib/ultracart_api/models/sfvb_library_entry_request.rb +280 -0
- data/lib/ultracart_api/models/sfvb_library_facet.rb +2 -2
- data/lib/ultracart_api/models/sfvb_library_history_entry.rb +250 -0
- data/lib/ultracart_api/models/sfvb_library_install_conflict.rb +240 -0
- data/lib/ultracart_api/models/sfvb_library_install_receipt.rb +297 -0
- data/lib/ultracart_api/models/sfvb_library_install_record.rb +290 -0
- data/lib/ultracart_api/models/sfvb_library_install_request.rb +274 -0
- data/lib/ultracart_api/models/sfvb_library_parameter.rb +260 -0
- data/lib/ultracart_api/models/sfvb_library_publish_request.rb +264 -0
- data/lib/ultracart_api/models/sfvb_library_screenshot_request.rb +274 -0
- data/lib/ultracart_api/models/sfvb_library_share_request.rb +220 -0
- data/lib/ultracart_api/models/sfvb_library_share_target.rb +230 -0
- data/lib/ultracart_api/models/sfvb_library_taxonomy.rb +258 -0
- data/lib/ultracart_api/models/sfvb_library_taxonomy_catalog.rb +220 -0
- data/lib/ultracart_api/models/sfvb_library_unshare_result.rb +242 -0
- data/lib/ultracart_api/models/sfvb_whoami_response.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +17 -0
- metadata +36 -2
|
@@ -347,6 +347,83 @@ module UltracartClient
|
|
|
347
347
|
return data, status_code, headers
|
|
348
348
|
end
|
|
349
349
|
|
|
350
|
+
# Remove a library entry's screenshot
|
|
351
|
+
# Owner only, with the draft's hash_sha256 as If-Match. Clears the screenshot and thumbnail. Published revisions and copies that used the image keep it.
|
|
352
|
+
# @param storefront_oid [Integer]
|
|
353
|
+
# @param library_oid [Integer]
|
|
354
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
355
|
+
# @param [Hash] opts the optional parameters
|
|
356
|
+
# @return [SfvbLibraryEntry]
|
|
357
|
+
def clear_sfvb_library_screenshot(storefront_oid, library_oid, if_match, opts = {})
|
|
358
|
+
data, _status_code, _headers = clear_sfvb_library_screenshot_with_http_info(storefront_oid, library_oid, if_match, opts)
|
|
359
|
+
data
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Remove a library entry's screenshot
|
|
363
|
+
# Owner only, with the draft's hash_sha256 as If-Match. Clears the screenshot and thumbnail. Published revisions and copies that used the image keep it.
|
|
364
|
+
# @param storefront_oid [Integer]
|
|
365
|
+
# @param library_oid [Integer]
|
|
366
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
367
|
+
# @param [Hash] opts the optional parameters
|
|
368
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
369
|
+
def clear_sfvb_library_screenshot_with_http_info(storefront_oid, library_oid, if_match, opts = {})
|
|
370
|
+
if @api_client.config.debugging
|
|
371
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.clear_sfvb_library_screenshot ...'
|
|
372
|
+
end
|
|
373
|
+
# verify the required parameter 'storefront_oid' is set
|
|
374
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
375
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
376
|
+
end
|
|
377
|
+
# verify the required parameter 'library_oid' is set
|
|
378
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
379
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
380
|
+
end
|
|
381
|
+
# verify the required parameter 'if_match' is set
|
|
382
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
383
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
384
|
+
end
|
|
385
|
+
# resource path
|
|
386
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/screenshot'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
387
|
+
|
|
388
|
+
# query parameters
|
|
389
|
+
query_params = opts[:query_params] || {}
|
|
390
|
+
|
|
391
|
+
# header parameters
|
|
392
|
+
header_params = opts[:header_params] || {}
|
|
393
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
394
|
+
# HTTP header 'Accept' (if needed)
|
|
395
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
396
|
+
header_params[:'If-Match'] = if_match
|
|
397
|
+
|
|
398
|
+
# form parameters
|
|
399
|
+
form_params = opts[:form_params] || {}
|
|
400
|
+
|
|
401
|
+
# http body (model)
|
|
402
|
+
post_body = opts[:debug_body]
|
|
403
|
+
|
|
404
|
+
# return_type
|
|
405
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
406
|
+
|
|
407
|
+
# auth_names
|
|
408
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
409
|
+
|
|
410
|
+
new_options = opts.merge(
|
|
411
|
+
:operation => :"SfvbApi.clear_sfvb_library_screenshot",
|
|
412
|
+
:header_params => header_params,
|
|
413
|
+
:query_params => query_params,
|
|
414
|
+
:form_params => form_params,
|
|
415
|
+
:body => post_body,
|
|
416
|
+
:auth_names => auth_names,
|
|
417
|
+
:return_type => return_type
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
421
|
+
if @api_client.config.debugging
|
|
422
|
+
@api_client.config.logger.debug "API called: SfvbApi#clear_sfvb_library_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
423
|
+
end
|
|
424
|
+
return data, status_code, headers
|
|
425
|
+
end
|
|
426
|
+
|
|
350
427
|
# Compile CJSON to Velocity
|
|
351
428
|
# 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.
|
|
352
429
|
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
@@ -416,6 +493,81 @@ module UltracartClient
|
|
|
416
493
|
return data, status_code, headers
|
|
417
494
|
end
|
|
418
495
|
|
|
496
|
+
# Save a fragment to the library
|
|
497
|
+
# Creates a private draft owned by the calling user. The fragment is one widget and its children, and it must validate. Images it references on this storefront are copied into the entry before this returns, so it installs anywhere with its images. The fragment is scanned; card skimming or obfuscation signals are refused outright. Nothing other merchants or shoppers see changes, so sfvb_write is enough. Publish it to share it. An optional screenshot takes a staged PNG key, exactly as the library screenshot endpoint does; a refused screenshot refuses the whole create.
|
|
498
|
+
# @param storefront_oid [Integer]
|
|
499
|
+
# @param library_entry [SfvbLibraryEntryRequest] The entry
|
|
500
|
+
# @param [Hash] opts the optional parameters
|
|
501
|
+
# @return [SfvbLibraryEntry]
|
|
502
|
+
def create_sfvb_library_entry(storefront_oid, library_entry, opts = {})
|
|
503
|
+
data, _status_code, _headers = create_sfvb_library_entry_with_http_info(storefront_oid, library_entry, opts)
|
|
504
|
+
data
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
# Save a fragment to the library
|
|
508
|
+
# Creates a private draft owned by the calling user. The fragment is one widget and its children, and it must validate. Images it references on this storefront are copied into the entry before this returns, so it installs anywhere with its images. The fragment is scanned; card skimming or obfuscation signals are refused outright. Nothing other merchants or shoppers see changes, so sfvb_write is enough. Publish it to share it. An optional screenshot takes a staged PNG key, exactly as the library screenshot endpoint does; a refused screenshot refuses the whole create.
|
|
509
|
+
# @param storefront_oid [Integer]
|
|
510
|
+
# @param library_entry [SfvbLibraryEntryRequest] The entry
|
|
511
|
+
# @param [Hash] opts the optional parameters
|
|
512
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
513
|
+
def create_sfvb_library_entry_with_http_info(storefront_oid, library_entry, opts = {})
|
|
514
|
+
if @api_client.config.debugging
|
|
515
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.create_sfvb_library_entry ...'
|
|
516
|
+
end
|
|
517
|
+
# verify the required parameter 'storefront_oid' is set
|
|
518
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
519
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.create_sfvb_library_entry"
|
|
520
|
+
end
|
|
521
|
+
# verify the required parameter 'library_entry' is set
|
|
522
|
+
if @api_client.config.client_side_validation && library_entry.nil?
|
|
523
|
+
fail ArgumentError, "Missing the required parameter 'library_entry' when calling SfvbApi.create_sfvb_library_entry"
|
|
524
|
+
end
|
|
525
|
+
# resource path
|
|
526
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
527
|
+
|
|
528
|
+
# query parameters
|
|
529
|
+
query_params = opts[:query_params] || {}
|
|
530
|
+
|
|
531
|
+
# header parameters
|
|
532
|
+
header_params = opts[:header_params] || {}
|
|
533
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
534
|
+
# HTTP header 'Accept' (if needed)
|
|
535
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
536
|
+
# HTTP header 'Content-Type'
|
|
537
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
538
|
+
if !content_type.nil?
|
|
539
|
+
header_params['Content-Type'] = content_type
|
|
540
|
+
end
|
|
541
|
+
|
|
542
|
+
# form parameters
|
|
543
|
+
form_params = opts[:form_params] || {}
|
|
544
|
+
|
|
545
|
+
# http body (model)
|
|
546
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(library_entry)
|
|
547
|
+
|
|
548
|
+
# return_type
|
|
549
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
550
|
+
|
|
551
|
+
# auth_names
|
|
552
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
553
|
+
|
|
554
|
+
new_options = opts.merge(
|
|
555
|
+
:operation => :"SfvbApi.create_sfvb_library_entry",
|
|
556
|
+
:header_params => header_params,
|
|
557
|
+
:query_params => query_params,
|
|
558
|
+
:form_params => form_params,
|
|
559
|
+
:body => post_body,
|
|
560
|
+
:auth_names => auth_names,
|
|
561
|
+
:return_type => return_type
|
|
562
|
+
)
|
|
563
|
+
|
|
564
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
565
|
+
if @api_client.config.debugging
|
|
566
|
+
@api_client.config.logger.debug "API called: SfvbApi#create_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
567
|
+
end
|
|
568
|
+
return data, status_code, headers
|
|
569
|
+
end
|
|
570
|
+
|
|
419
571
|
# One time link that opens a preview in a browser with no UltraCart login
|
|
420
572
|
# The preview URL only works in a browser already signed in to UltraCart on the storefront's own host, and an agent's built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. Pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Requires a token that resolves to a user, so use the device authorization flow.
|
|
421
573
|
# @param storefront_oid [Integer]
|
|
@@ -848,6 +1000,83 @@ module UltracartClient
|
|
|
848
1000
|
return data, status_code, headers
|
|
849
1001
|
end
|
|
850
1002
|
|
|
1003
|
+
# Delete or retire a library entry
|
|
1004
|
+
# Owner only, with the draft's hash_sha256 as If-Match. An entry that was never published, installed or shared is deleted. Anything else is retired - kept so the storefronts that installed it still resolve, but out of search and refusing new installs and publishes. The result says which happened.
|
|
1005
|
+
# @param storefront_oid [Integer]
|
|
1006
|
+
# @param library_oid [Integer]
|
|
1007
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
1008
|
+
# @param [Hash] opts the optional parameters
|
|
1009
|
+
# @return [SfvbLibraryDeleteResult]
|
|
1010
|
+
def delete_sfvb_library_entry(storefront_oid, library_oid, if_match, opts = {})
|
|
1011
|
+
data, _status_code, _headers = delete_sfvb_library_entry_with_http_info(storefront_oid, library_oid, if_match, opts)
|
|
1012
|
+
data
|
|
1013
|
+
end
|
|
1014
|
+
|
|
1015
|
+
# Delete or retire a library entry
|
|
1016
|
+
# Owner only, with the draft's hash_sha256 as If-Match. An entry that was never published, installed or shared is deleted. Anything else is retired - kept so the storefronts that installed it still resolve, but out of search and refusing new installs and publishes. The result says which happened.
|
|
1017
|
+
# @param storefront_oid [Integer]
|
|
1018
|
+
# @param library_oid [Integer]
|
|
1019
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
1020
|
+
# @param [Hash] opts the optional parameters
|
|
1021
|
+
# @return [Array<(SfvbLibraryDeleteResult, Integer, Hash)>] SfvbLibraryDeleteResult data, response status code and response headers
|
|
1022
|
+
def delete_sfvb_library_entry_with_http_info(storefront_oid, library_oid, if_match, opts = {})
|
|
1023
|
+
if @api_client.config.debugging
|
|
1024
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_library_entry ...'
|
|
1025
|
+
end
|
|
1026
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1027
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1028
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_library_entry"
|
|
1029
|
+
end
|
|
1030
|
+
# verify the required parameter 'library_oid' is set
|
|
1031
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
1032
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.delete_sfvb_library_entry"
|
|
1033
|
+
end
|
|
1034
|
+
# verify the required parameter 'if_match' is set
|
|
1035
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
1036
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.delete_sfvb_library_entry"
|
|
1037
|
+
end
|
|
1038
|
+
# resource path
|
|
1039
|
+
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))
|
|
1040
|
+
|
|
1041
|
+
# query parameters
|
|
1042
|
+
query_params = opts[:query_params] || {}
|
|
1043
|
+
|
|
1044
|
+
# header parameters
|
|
1045
|
+
header_params = opts[:header_params] || {}
|
|
1046
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1047
|
+
# HTTP header 'Accept' (if needed)
|
|
1048
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1049
|
+
header_params[:'If-Match'] = if_match
|
|
1050
|
+
|
|
1051
|
+
# form parameters
|
|
1052
|
+
form_params = opts[:form_params] || {}
|
|
1053
|
+
|
|
1054
|
+
# http body (model)
|
|
1055
|
+
post_body = opts[:debug_body]
|
|
1056
|
+
|
|
1057
|
+
# return_type
|
|
1058
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryDeleteResult'
|
|
1059
|
+
|
|
1060
|
+
# auth_names
|
|
1061
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1062
|
+
|
|
1063
|
+
new_options = opts.merge(
|
|
1064
|
+
:operation => :"SfvbApi.delete_sfvb_library_entry",
|
|
1065
|
+
:header_params => header_params,
|
|
1066
|
+
:query_params => query_params,
|
|
1067
|
+
:form_params => form_params,
|
|
1068
|
+
:body => post_body,
|
|
1069
|
+
:auth_names => auth_names,
|
|
1070
|
+
:return_type => return_type
|
|
1071
|
+
)
|
|
1072
|
+
|
|
1073
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1074
|
+
if @api_client.config.debugging
|
|
1075
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1076
|
+
end
|
|
1077
|
+
return data, status_code, headers
|
|
1078
|
+
end
|
|
1079
|
+
|
|
851
1080
|
# Detach an image from a page
|
|
852
1081
|
# Name exactly one of code or default. Removes the page's copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
853
1082
|
# @param storefront_oid [Integer]
|
|
@@ -1283,6 +1512,79 @@ module UltracartClient
|
|
|
1283
1512
|
return data, status_code, headers
|
|
1284
1513
|
end
|
|
1285
1514
|
|
|
1515
|
+
# Copy a library entry into a new private entry
|
|
1516
|
+
# The copy is owned by the calling user and private. From an entry you own it copies the draft; from one shared with you it copies the published revision. It is scanned on its own and inherits nothing but content, its images and its screenshot.
|
|
1517
|
+
# @param storefront_oid [Integer]
|
|
1518
|
+
# @param library_oid [Integer]
|
|
1519
|
+
# @param [Hash] opts the optional parameters
|
|
1520
|
+
# @option opts [String] :name Name for the copy. Defaults to Copy of and the source name.
|
|
1521
|
+
# @return [SfvbLibraryEntry]
|
|
1522
|
+
def duplicate_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
1523
|
+
data, _status_code, _headers = duplicate_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
1524
|
+
data
|
|
1525
|
+
end
|
|
1526
|
+
|
|
1527
|
+
# Copy a library entry into a new private entry
|
|
1528
|
+
# The copy is owned by the calling user and private. From an entry you own it copies the draft; from one shared with you it copies the published revision. It is scanned on its own and inherits nothing but content, its images and its screenshot.
|
|
1529
|
+
# @param storefront_oid [Integer]
|
|
1530
|
+
# @param library_oid [Integer]
|
|
1531
|
+
# @param [Hash] opts the optional parameters
|
|
1532
|
+
# @option opts [String] :name Name for the copy. Defaults to Copy of and the source name.
|
|
1533
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
1534
|
+
def duplicate_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
1535
|
+
if @api_client.config.debugging
|
|
1536
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.duplicate_sfvb_library_entry ...'
|
|
1537
|
+
end
|
|
1538
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1539
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1540
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.duplicate_sfvb_library_entry"
|
|
1541
|
+
end
|
|
1542
|
+
# verify the required parameter 'library_oid' is set
|
|
1543
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
1544
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.duplicate_sfvb_library_entry"
|
|
1545
|
+
end
|
|
1546
|
+
# resource path
|
|
1547
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/duplicate'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
1548
|
+
|
|
1549
|
+
# query parameters
|
|
1550
|
+
query_params = opts[:query_params] || {}
|
|
1551
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
|
1552
|
+
|
|
1553
|
+
# header parameters
|
|
1554
|
+
header_params = opts[:header_params] || {}
|
|
1555
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1556
|
+
# HTTP header 'Accept' (if needed)
|
|
1557
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1558
|
+
|
|
1559
|
+
# form parameters
|
|
1560
|
+
form_params = opts[:form_params] || {}
|
|
1561
|
+
|
|
1562
|
+
# http body (model)
|
|
1563
|
+
post_body = opts[:debug_body]
|
|
1564
|
+
|
|
1565
|
+
# return_type
|
|
1566
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
1567
|
+
|
|
1568
|
+
# auth_names
|
|
1569
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1570
|
+
|
|
1571
|
+
new_options = opts.merge(
|
|
1572
|
+
:operation => :"SfvbApi.duplicate_sfvb_library_entry",
|
|
1573
|
+
:header_params => header_params,
|
|
1574
|
+
:query_params => query_params,
|
|
1575
|
+
:form_params => form_params,
|
|
1576
|
+
:body => post_body,
|
|
1577
|
+
:auth_names => auth_names,
|
|
1578
|
+
:return_type => return_type
|
|
1579
|
+
)
|
|
1580
|
+
|
|
1581
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1582
|
+
if @api_client.config.debugging
|
|
1583
|
+
@api_client.config.logger.debug "API called: SfvbApi#duplicate_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1584
|
+
end
|
|
1585
|
+
return data, status_code, headers
|
|
1586
|
+
end
|
|
1587
|
+
|
|
1286
1588
|
# Copy a page to a new path
|
|
1287
1589
|
# Copies what the store admin's duplicate copies - settings, items, blog posts, permissions, attributes, selectors, images and the page folder with its body. The copy goes to the path you choose, under any existing page, with the same path rules as creating a page, and a 409 with the code sfvb.page_exists when that path is taken. The root page and pages with pages under them cannot be copied. A page whose folder holds a started experiment is refused, because the copy would share the experiment - end it first. Translated title and description text is not copied. Always needs sfvb_publish, because the copy is live as soon as it exists.
|
|
1288
1590
|
# @param storefront_oid [Integer]
|
|
@@ -1663,24 +1965,94 @@ module UltracartClient
|
|
|
1663
1965
|
return data, status_code, headers
|
|
1664
1966
|
end
|
|
1665
1967
|
|
|
1666
|
-
#
|
|
1667
|
-
#
|
|
1968
|
+
# Favorite a library entry
|
|
1969
|
+
# Bookmarks the entry for the calling user. Idempotent. Owner or anyone the entry is shared with.
|
|
1668
1970
|
# @param storefront_oid [Integer]
|
|
1669
|
-
# @param
|
|
1971
|
+
# @param library_oid [Integer]
|
|
1670
1972
|
# @param [Hash] opts the optional parameters
|
|
1671
|
-
# @return [
|
|
1672
|
-
def
|
|
1673
|
-
|
|
1674
|
-
|
|
1973
|
+
# @return [nil]
|
|
1974
|
+
def favorite_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
1975
|
+
favorite_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
1976
|
+
nil
|
|
1675
1977
|
end
|
|
1676
1978
|
|
|
1677
|
-
#
|
|
1678
|
-
#
|
|
1979
|
+
# Favorite a library entry
|
|
1980
|
+
# Bookmarks the entry for the calling user. Idempotent. Owner or anyone the entry is shared with.
|
|
1679
1981
|
# @param storefront_oid [Integer]
|
|
1680
|
-
# @param
|
|
1982
|
+
# @param library_oid [Integer]
|
|
1681
1983
|
# @param [Hash] opts the optional parameters
|
|
1682
|
-
# @return [Array<(
|
|
1683
|
-
def
|
|
1984
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
1985
|
+
def favorite_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
1986
|
+
if @api_client.config.debugging
|
|
1987
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.favorite_sfvb_library_entry ...'
|
|
1988
|
+
end
|
|
1989
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1990
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1991
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.favorite_sfvb_library_entry"
|
|
1992
|
+
end
|
|
1993
|
+
# verify the required parameter 'library_oid' is set
|
|
1994
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
1995
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.favorite_sfvb_library_entry"
|
|
1996
|
+
end
|
|
1997
|
+
# resource path
|
|
1998
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/favorite'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
1999
|
+
|
|
2000
|
+
# query parameters
|
|
2001
|
+
query_params = opts[:query_params] || {}
|
|
2002
|
+
|
|
2003
|
+
# header parameters
|
|
2004
|
+
header_params = opts[:header_params] || {}
|
|
2005
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2006
|
+
# HTTP header 'Accept' (if needed)
|
|
2007
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2008
|
+
|
|
2009
|
+
# form parameters
|
|
2010
|
+
form_params = opts[:form_params] || {}
|
|
2011
|
+
|
|
2012
|
+
# http body (model)
|
|
2013
|
+
post_body = opts[:debug_body]
|
|
2014
|
+
|
|
2015
|
+
# return_type
|
|
2016
|
+
return_type = opts[:debug_return_type]
|
|
2017
|
+
|
|
2018
|
+
# auth_names
|
|
2019
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2020
|
+
|
|
2021
|
+
new_options = opts.merge(
|
|
2022
|
+
:operation => :"SfvbApi.favorite_sfvb_library_entry",
|
|
2023
|
+
:header_params => header_params,
|
|
2024
|
+
:query_params => query_params,
|
|
2025
|
+
:form_params => form_params,
|
|
2026
|
+
:body => post_body,
|
|
2027
|
+
:auth_names => auth_names,
|
|
2028
|
+
:return_type => return_type
|
|
2029
|
+
)
|
|
2030
|
+
|
|
2031
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
2032
|
+
if @api_client.config.debugging
|
|
2033
|
+
@api_client.config.logger.debug "API called: SfvbApi#favorite_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2034
|
+
end
|
|
2035
|
+
return data, status_code, headers
|
|
2036
|
+
end
|
|
2037
|
+
|
|
2038
|
+
# Read a blog post
|
|
2039
|
+
# The whole post - body, excerpt, tags, images and where it is shown. An image's url is the address to use for it in the body.
|
|
2040
|
+
# @param storefront_oid [Integer]
|
|
2041
|
+
# @param blog_post_oid [Integer]
|
|
2042
|
+
# @param [Hash] opts the optional parameters
|
|
2043
|
+
# @return [SfvbBlogPostDetail]
|
|
2044
|
+
def get_sfvb_blog_post(storefront_oid, blog_post_oid, opts = {})
|
|
2045
|
+
data, _status_code, _headers = get_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, opts)
|
|
2046
|
+
data
|
|
2047
|
+
end
|
|
2048
|
+
|
|
2049
|
+
# Read a blog post
|
|
2050
|
+
# The whole post - body, excerpt, tags, images and where it is shown. An image's url is the address to use for it in the body.
|
|
2051
|
+
# @param storefront_oid [Integer]
|
|
2052
|
+
# @param blog_post_oid [Integer]
|
|
2053
|
+
# @param [Hash] opts the optional parameters
|
|
2054
|
+
# @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
|
|
2055
|
+
def get_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, opts = {})
|
|
1684
2056
|
if @api_client.config.debugging
|
|
1685
2057
|
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_blog_post ...'
|
|
1686
2058
|
end
|
|
@@ -2370,10 +2742,11 @@ module UltracartClient
|
|
|
2370
2742
|
end
|
|
2371
2743
|
|
|
2372
2744
|
# Read one library entry including its CJSON
|
|
2373
|
-
#
|
|
2745
|
+
# The owner gets the draft with its hash_sha256, which an update, delete or publish sends back as If-Match. Everyone else gets the latest published revision. Pin a published revision with revision_number. Read content_manifest before installing. If the fragment 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.
|
|
2374
2746
|
# @param storefront_oid [Integer]
|
|
2375
2747
|
# @param library_oid [Integer]
|
|
2376
2748
|
# @param [Hash] opts the optional parameters
|
|
2749
|
+
# @option opts [Integer] :revision_number A published revision to read instead of the default.
|
|
2377
2750
|
# @return [SfvbLibraryEntry]
|
|
2378
2751
|
def get_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
2379
2752
|
data, _status_code, _headers = get_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
@@ -2381,10 +2754,11 @@ module UltracartClient
|
|
|
2381
2754
|
end
|
|
2382
2755
|
|
|
2383
2756
|
# Read one library entry including its CJSON
|
|
2384
|
-
#
|
|
2757
|
+
# The owner gets the draft with its hash_sha256, which an update, delete or publish sends back as If-Match. Everyone else gets the latest published revision. Pin a published revision with revision_number. Read content_manifest before installing. If the fragment 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.
|
|
2385
2758
|
# @param storefront_oid [Integer]
|
|
2386
2759
|
# @param library_oid [Integer]
|
|
2387
2760
|
# @param [Hash] opts the optional parameters
|
|
2761
|
+
# @option opts [Integer] :revision_number A published revision to read instead of the default.
|
|
2388
2762
|
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
2389
2763
|
def get_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
2390
2764
|
if @api_client.config.debugging
|
|
@@ -2403,6 +2777,7 @@ module UltracartClient
|
|
|
2403
2777
|
|
|
2404
2778
|
# query parameters
|
|
2405
2779
|
query_params = opts[:query_params] || {}
|
|
2780
|
+
query_params[:'revision_number'] = opts[:'revision_number'] if !opts[:'revision_number'].nil?
|
|
2406
2781
|
|
|
2407
2782
|
# header parameters
|
|
2408
2783
|
header_params = opts[:header_params] || {}
|
|
@@ -2439,6 +2814,204 @@ module UltracartClient
|
|
|
2439
2814
|
return data, status_code, headers
|
|
2440
2815
|
end
|
|
2441
2816
|
|
|
2817
|
+
# List a library entry's published revisions
|
|
2818
|
+
# Newest first, each with its release notes and hash. Read one with getSfvbLibraryEntry and revision_number. The owner and anyone the entry is shared with can list it.
|
|
2819
|
+
# @param storefront_oid [Integer]
|
|
2820
|
+
# @param library_oid [Integer]
|
|
2821
|
+
# @param [Hash] opts the optional parameters
|
|
2822
|
+
# @return [SfvbLibraryHistoryEntry]
|
|
2823
|
+
def get_sfvb_library_history(storefront_oid, library_oid, opts = {})
|
|
2824
|
+
data, _status_code, _headers = get_sfvb_library_history_with_http_info(storefront_oid, library_oid, opts)
|
|
2825
|
+
data
|
|
2826
|
+
end
|
|
2827
|
+
|
|
2828
|
+
# List a library entry's published revisions
|
|
2829
|
+
# Newest first, each with its release notes and hash. Read one with getSfvbLibraryEntry and revision_number. The owner and anyone the entry is shared with can list it.
|
|
2830
|
+
# @param storefront_oid [Integer]
|
|
2831
|
+
# @param library_oid [Integer]
|
|
2832
|
+
# @param [Hash] opts the optional parameters
|
|
2833
|
+
# @return [Array<(SfvbLibraryHistoryEntry, Integer, Hash)>] SfvbLibraryHistoryEntry data, response status code and response headers
|
|
2834
|
+
def get_sfvb_library_history_with_http_info(storefront_oid, library_oid, opts = {})
|
|
2835
|
+
if @api_client.config.debugging
|
|
2836
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_library_history ...'
|
|
2837
|
+
end
|
|
2838
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2839
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2840
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_library_history"
|
|
2841
|
+
end
|
|
2842
|
+
# verify the required parameter 'library_oid' is set
|
|
2843
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
2844
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.get_sfvb_library_history"
|
|
2845
|
+
end
|
|
2846
|
+
# resource path
|
|
2847
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/history'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
2848
|
+
|
|
2849
|
+
# query parameters
|
|
2850
|
+
query_params = opts[:query_params] || {}
|
|
2851
|
+
|
|
2852
|
+
# header parameters
|
|
2853
|
+
header_params = opts[:header_params] || {}
|
|
2854
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2855
|
+
# HTTP header 'Accept' (if needed)
|
|
2856
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2857
|
+
|
|
2858
|
+
# form parameters
|
|
2859
|
+
form_params = opts[:form_params] || {}
|
|
2860
|
+
|
|
2861
|
+
# http body (model)
|
|
2862
|
+
post_body = opts[:debug_body]
|
|
2863
|
+
|
|
2864
|
+
# return_type
|
|
2865
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryHistoryEntry'
|
|
2866
|
+
|
|
2867
|
+
# auth_names
|
|
2868
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2869
|
+
|
|
2870
|
+
new_options = opts.merge(
|
|
2871
|
+
:operation => :"SfvbApi.get_sfvb_library_history",
|
|
2872
|
+
:header_params => header_params,
|
|
2873
|
+
:query_params => query_params,
|
|
2874
|
+
:form_params => form_params,
|
|
2875
|
+
:body => post_body,
|
|
2876
|
+
:auth_names => auth_names,
|
|
2877
|
+
:return_type => return_type
|
|
2878
|
+
)
|
|
2879
|
+
|
|
2880
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2881
|
+
if @api_client.config.debugging
|
|
2882
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_library_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2883
|
+
end
|
|
2884
|
+
return data, status_code, headers
|
|
2885
|
+
end
|
|
2886
|
+
|
|
2887
|
+
# List the accounts a library entry can be shared with
|
|
2888
|
+
# The calling account's linked accounts, each with its merchant id and company. These are the only merchants a share can name.
|
|
2889
|
+
# @param storefront_oid [Integer]
|
|
2890
|
+
# @param [Hash] opts the optional parameters
|
|
2891
|
+
# @return [SfvbLibraryShareTarget]
|
|
2892
|
+
def get_sfvb_library_share_targets(storefront_oid, opts = {})
|
|
2893
|
+
data, _status_code, _headers = get_sfvb_library_share_targets_with_http_info(storefront_oid, opts)
|
|
2894
|
+
data
|
|
2895
|
+
end
|
|
2896
|
+
|
|
2897
|
+
# List the accounts a library entry can be shared with
|
|
2898
|
+
# The calling account's linked accounts, each with its merchant id and company. These are the only merchants a share can name.
|
|
2899
|
+
# @param storefront_oid [Integer]
|
|
2900
|
+
# @param [Hash] opts the optional parameters
|
|
2901
|
+
# @return [Array<(SfvbLibraryShareTarget, Integer, Hash)>] SfvbLibraryShareTarget data, response status code and response headers
|
|
2902
|
+
def get_sfvb_library_share_targets_with_http_info(storefront_oid, opts = {})
|
|
2903
|
+
if @api_client.config.debugging
|
|
2904
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_library_share_targets ...'
|
|
2905
|
+
end
|
|
2906
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2907
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2908
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_library_share_targets"
|
|
2909
|
+
end
|
|
2910
|
+
# resource path
|
|
2911
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/share_targets'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2912
|
+
|
|
2913
|
+
# query parameters
|
|
2914
|
+
query_params = opts[:query_params] || {}
|
|
2915
|
+
|
|
2916
|
+
# header parameters
|
|
2917
|
+
header_params = opts[:header_params] || {}
|
|
2918
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2919
|
+
# HTTP header 'Accept' (if needed)
|
|
2920
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2921
|
+
|
|
2922
|
+
# form parameters
|
|
2923
|
+
form_params = opts[:form_params] || {}
|
|
2924
|
+
|
|
2925
|
+
# http body (model)
|
|
2926
|
+
post_body = opts[:debug_body]
|
|
2927
|
+
|
|
2928
|
+
# return_type
|
|
2929
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryShareTarget'
|
|
2930
|
+
|
|
2931
|
+
# auth_names
|
|
2932
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2933
|
+
|
|
2934
|
+
new_options = opts.merge(
|
|
2935
|
+
:operation => :"SfvbApi.get_sfvb_library_share_targets",
|
|
2936
|
+
:header_params => header_params,
|
|
2937
|
+
:query_params => query_params,
|
|
2938
|
+
:form_params => form_params,
|
|
2939
|
+
:body => post_body,
|
|
2940
|
+
:auth_names => auth_names,
|
|
2941
|
+
:return_type => return_type
|
|
2942
|
+
)
|
|
2943
|
+
|
|
2944
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2945
|
+
if @api_client.config.debugging
|
|
2946
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_library_share_targets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2947
|
+
end
|
|
2948
|
+
return data, status_code, headers
|
|
2949
|
+
end
|
|
2950
|
+
|
|
2951
|
+
# List the allowed library tags
|
|
2952
|
+
# The fixed tag list for purpose, section, industry and style, each tag with a one line description. Saving an entry refuses any tag not on it with sfvb.library_taxonomy_unknown, naming the closest one. The same tags are the facet_purpose, facet_section, facet_industry and facet_style search facets.
|
|
2953
|
+
# @param storefront_oid [Integer]
|
|
2954
|
+
# @param [Hash] opts the optional parameters
|
|
2955
|
+
# @return [SfvbLibraryTaxonomyCatalog]
|
|
2956
|
+
def get_sfvb_library_taxonomy(storefront_oid, opts = {})
|
|
2957
|
+
data, _status_code, _headers = get_sfvb_library_taxonomy_with_http_info(storefront_oid, opts)
|
|
2958
|
+
data
|
|
2959
|
+
end
|
|
2960
|
+
|
|
2961
|
+
# List the allowed library tags
|
|
2962
|
+
# The fixed tag list for purpose, section, industry and style, each tag with a one line description. Saving an entry refuses any tag not on it with sfvb.library_taxonomy_unknown, naming the closest one. The same tags are the facet_purpose, facet_section, facet_industry and facet_style search facets.
|
|
2963
|
+
# @param storefront_oid [Integer]
|
|
2964
|
+
# @param [Hash] opts the optional parameters
|
|
2965
|
+
# @return [Array<(SfvbLibraryTaxonomyCatalog, Integer, Hash)>] SfvbLibraryTaxonomyCatalog data, response status code and response headers
|
|
2966
|
+
def get_sfvb_library_taxonomy_with_http_info(storefront_oid, opts = {})
|
|
2967
|
+
if @api_client.config.debugging
|
|
2968
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_library_taxonomy ...'
|
|
2969
|
+
end
|
|
2970
|
+
# verify the required parameter 'storefront_oid' is set
|
|
2971
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
2972
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_library_taxonomy"
|
|
2973
|
+
end
|
|
2974
|
+
# resource path
|
|
2975
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/taxonomy'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
2976
|
+
|
|
2977
|
+
# query parameters
|
|
2978
|
+
query_params = opts[:query_params] || {}
|
|
2979
|
+
|
|
2980
|
+
# header parameters
|
|
2981
|
+
header_params = opts[:header_params] || {}
|
|
2982
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2983
|
+
# HTTP header 'Accept' (if needed)
|
|
2984
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2985
|
+
|
|
2986
|
+
# form parameters
|
|
2987
|
+
form_params = opts[:form_params] || {}
|
|
2988
|
+
|
|
2989
|
+
# http body (model)
|
|
2990
|
+
post_body = opts[:debug_body]
|
|
2991
|
+
|
|
2992
|
+
# return_type
|
|
2993
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryTaxonomyCatalog'
|
|
2994
|
+
|
|
2995
|
+
# auth_names
|
|
2996
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2997
|
+
|
|
2998
|
+
new_options = opts.merge(
|
|
2999
|
+
:operation => :"SfvbApi.get_sfvb_library_taxonomy",
|
|
3000
|
+
:header_params => header_params,
|
|
3001
|
+
:query_params => query_params,
|
|
3002
|
+
:form_params => form_params,
|
|
3003
|
+
:body => post_body,
|
|
3004
|
+
:auth_names => auth_names,
|
|
3005
|
+
:return_type => return_type
|
|
3006
|
+
)
|
|
3007
|
+
|
|
3008
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3009
|
+
if @api_client.config.debugging
|
|
3010
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_library_taxonomy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3011
|
+
end
|
|
3012
|
+
return data, status_code, headers
|
|
3013
|
+
end
|
|
3014
|
+
|
|
2442
3015
|
# Read one store menu and its entries
|
|
2443
3016
|
# The whole tree, in render order. Page entries carry the page_path they resolve to and item entries the merchant_item_id, rather than the oids the storage keeps. Menu item oids are not returned at all because a write regenerates every one of them. Keep hash_sha256 - it is the If-Match a write needs.
|
|
2444
3017
|
# @param storefront_oid [Integer]
|
|
@@ -4066,22 +4639,24 @@ module UltracartClient
|
|
|
4066
4639
|
end
|
|
4067
4640
|
|
|
4068
4641
|
# Install a library entry into a storefront
|
|
4069
|
-
# Copies the fragment's referenced
|
|
4642
|
+
# Copies the fragment's referenced files into the storefront file system and returns a receipt with the CJSON's paths resolved, ready to place. It never places the CJSON. Read content_manifest first; executable content needs acknowledge_executable true. A file that already exists with different content is a conflict - on_conflict fail (the default) refuses with 409 and writes nothing, skip keeps the existing file, overwrite replaces it. A recipient installs a published revision. This writes, which is why it is a POST, and it requires sfvb_publish because the files land in the shared storefront file system, which is served to shoppers whichever theme is active.
|
|
4070
4643
|
# @param storefront_oid [Integer]
|
|
4071
4644
|
# @param library_oid [Integer]
|
|
4072
4645
|
# @param [Hash] opts the optional parameters
|
|
4073
|
-
# @
|
|
4646
|
+
# @option opts [SfvbLibraryInstallRequest] :install_request Revision, conflict handling and acknowledgement
|
|
4647
|
+
# @return [SfvbLibraryInstallReceipt]
|
|
4074
4648
|
def install_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
4075
4649
|
data, _status_code, _headers = install_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
4076
4650
|
data
|
|
4077
4651
|
end
|
|
4078
4652
|
|
|
4079
4653
|
# Install a library entry into a storefront
|
|
4080
|
-
# Copies the fragment's referenced
|
|
4654
|
+
# Copies the fragment's referenced files into the storefront file system and returns a receipt with the CJSON's paths resolved, ready to place. It never places the CJSON. Read content_manifest first; executable content needs acknowledge_executable true. A file that already exists with different content is a conflict - on_conflict fail (the default) refuses with 409 and writes nothing, skip keeps the existing file, overwrite replaces it. A recipient installs a published revision. This writes, which is why it is a POST, and it requires sfvb_publish because the files land in the shared storefront file system, which is served to shoppers whichever theme is active.
|
|
4081
4655
|
# @param storefront_oid [Integer]
|
|
4082
4656
|
# @param library_oid [Integer]
|
|
4083
4657
|
# @param [Hash] opts the optional parameters
|
|
4084
|
-
# @
|
|
4658
|
+
# @option opts [SfvbLibraryInstallRequest] :install_request Revision, conflict handling and acknowledgement
|
|
4659
|
+
# @return [Array<(SfvbLibraryInstallReceipt, Integer, Hash)>] SfvbLibraryInstallReceipt data, response status code and response headers
|
|
4085
4660
|
def install_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
4086
4661
|
if @api_client.config.debugging
|
|
4087
4662
|
@api_client.config.logger.debug 'Calling API: SfvbApi.install_sfvb_library_entry ...'
|
|
@@ -4105,15 +4680,20 @@ module UltracartClient
|
|
|
4105
4680
|
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4106
4681
|
# HTTP header 'Accept' (if needed)
|
|
4107
4682
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4683
|
+
# HTTP header 'Content-Type'
|
|
4684
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
4685
|
+
if !content_type.nil?
|
|
4686
|
+
header_params['Content-Type'] = content_type
|
|
4687
|
+
end
|
|
4108
4688
|
|
|
4109
4689
|
# form parameters
|
|
4110
4690
|
form_params = opts[:form_params] || {}
|
|
4111
4691
|
|
|
4112
4692
|
# http body (model)
|
|
4113
|
-
post_body = opts[:debug_body]
|
|
4693
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'install_request'])
|
|
4114
4694
|
|
|
4115
4695
|
# return_type
|
|
4116
|
-
return_type = opts[:debug_return_type] || '
|
|
4696
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryInstallReceipt'
|
|
4117
4697
|
|
|
4118
4698
|
# auth_names
|
|
4119
4699
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
@@ -4634,37 +5214,34 @@ module UltracartClient
|
|
|
4634
5214
|
return data, status_code, headers
|
|
4635
5215
|
end
|
|
4636
5216
|
|
|
4637
|
-
# List the storefront
|
|
4638
|
-
#
|
|
5217
|
+
# List the library entries installed on a storefront
|
|
5218
|
+
# Each entry's most recently installed revision, its latest published revision and update_available. Nothing updates automatically. An entry this account can no longer see is listed without its name.
|
|
4639
5219
|
# @param storefront_oid [Integer]
|
|
4640
5220
|
# @param [Hash] opts the optional parameters
|
|
4641
|
-
# @
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
data, _status_code, _headers = list_sfvb_pages_with_http_info(storefront_oid, opts)
|
|
5221
|
+
# @return [SfvbLibraryInstallRecord]
|
|
5222
|
+
def list_sfvb_library_installs(storefront_oid, opts = {})
|
|
5223
|
+
data, _status_code, _headers = list_sfvb_library_installs_with_http_info(storefront_oid, opts)
|
|
4645
5224
|
data
|
|
4646
5225
|
end
|
|
4647
5226
|
|
|
4648
|
-
# List the storefront
|
|
4649
|
-
#
|
|
5227
|
+
# List the library entries installed on a storefront
|
|
5228
|
+
# Each entry's most recently installed revision, its latest published revision and update_available. Nothing updates automatically. An entry this account can no longer see is listed without its name.
|
|
4650
5229
|
# @param storefront_oid [Integer]
|
|
4651
5230
|
# @param [Hash] opts the optional parameters
|
|
4652
|
-
# @
|
|
4653
|
-
|
|
4654
|
-
def list_sfvb_pages_with_http_info(storefront_oid, opts = {})
|
|
5231
|
+
# @return [Array<(SfvbLibraryInstallRecord, Integer, Hash)>] SfvbLibraryInstallRecord data, response status code and response headers
|
|
5232
|
+
def list_sfvb_library_installs_with_http_info(storefront_oid, opts = {})
|
|
4655
5233
|
if @api_client.config.debugging
|
|
4656
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
5234
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_library_installs ...'
|
|
4657
5235
|
end
|
|
4658
5236
|
# verify the required parameter 'storefront_oid' is set
|
|
4659
5237
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4660
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
5238
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_library_installs"
|
|
4661
5239
|
end
|
|
4662
5240
|
# resource path
|
|
4663
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
5241
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/installs'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4664
5242
|
|
|
4665
5243
|
# query parameters
|
|
4666
5244
|
query_params = opts[:query_params] || {}
|
|
4667
|
-
query_params[:'under'] = opts[:'under'] if !opts[:'under'].nil?
|
|
4668
5245
|
|
|
4669
5246
|
# header parameters
|
|
4670
5247
|
header_params = opts[:header_params] || {}
|
|
@@ -4679,13 +5256,13 @@ module UltracartClient
|
|
|
4679
5256
|
post_body = opts[:debug_body]
|
|
4680
5257
|
|
|
4681
5258
|
# return_type
|
|
4682
|
-
return_type = opts[:debug_return_type] || '
|
|
5259
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryInstallRecord'
|
|
4683
5260
|
|
|
4684
5261
|
# auth_names
|
|
4685
5262
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4686
5263
|
|
|
4687
5264
|
new_options = opts.merge(
|
|
4688
|
-
:operation => :"SfvbApi.
|
|
5265
|
+
:operation => :"SfvbApi.list_sfvb_library_installs",
|
|
4689
5266
|
:header_params => header_params,
|
|
4690
5267
|
:query_params => query_params,
|
|
4691
5268
|
:form_params => form_params,
|
|
@@ -4696,24 +5273,91 @@ module UltracartClient
|
|
|
4696
5273
|
|
|
4697
5274
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
4698
5275
|
if @api_client.config.debugging
|
|
4699
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
5276
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_library_installs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4700
5277
|
end
|
|
4701
5278
|
return data, status_code, headers
|
|
4702
5279
|
end
|
|
4703
5280
|
|
|
4704
|
-
# List
|
|
4705
|
-
#
|
|
5281
|
+
# List the storefront's pages
|
|
5282
|
+
# Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
4706
5283
|
# @param storefront_oid [Integer]
|
|
4707
5284
|
# @param [Hash] opts the optional parameters
|
|
4708
|
-
# @option opts [String] :
|
|
4709
|
-
# @
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
5285
|
+
# @option opts [String] :under Only this page and the pages below it, for example /lp/
|
|
5286
|
+
# @return [SfvbPageListResponse]
|
|
5287
|
+
def list_sfvb_pages(storefront_oid, opts = {})
|
|
5288
|
+
data, _status_code, _headers = list_sfvb_pages_with_http_info(storefront_oid, opts)
|
|
5289
|
+
data
|
|
5290
|
+
end
|
|
5291
|
+
|
|
5292
|
+
# List the storefront's pages
|
|
5293
|
+
# Every page with its settings, sorted by path with the root first. Hidden pages are included. Pass under to list one page and everything below it. Read from the same cached catalog the admin page tree uses, so a page created a moment ago can take a moment to appear here - read it directly with the single-page read to confirm a write.
|
|
5294
|
+
# @param storefront_oid [Integer]
|
|
5295
|
+
# @param [Hash] opts the optional parameters
|
|
5296
|
+
# @option opts [String] :under Only this page and the pages below it, for example /lp/
|
|
5297
|
+
# @return [Array<(SfvbPageListResponse, Integer, Hash)>] SfvbPageListResponse data, response status code and response headers
|
|
5298
|
+
def list_sfvb_pages_with_http_info(storefront_oid, opts = {})
|
|
5299
|
+
if @api_client.config.debugging
|
|
5300
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_pages ...'
|
|
5301
|
+
end
|
|
5302
|
+
# verify the required parameter 'storefront_oid' is set
|
|
5303
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
5304
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_pages"
|
|
5305
|
+
end
|
|
5306
|
+
# resource path
|
|
5307
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/list'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
5308
|
+
|
|
5309
|
+
# query parameters
|
|
5310
|
+
query_params = opts[:query_params] || {}
|
|
5311
|
+
query_params[:'under'] = opts[:'under'] if !opts[:'under'].nil?
|
|
5312
|
+
|
|
5313
|
+
# header parameters
|
|
5314
|
+
header_params = opts[:header_params] || {}
|
|
5315
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
5316
|
+
# HTTP header 'Accept' (if needed)
|
|
5317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
5318
|
+
|
|
5319
|
+
# form parameters
|
|
5320
|
+
form_params = opts[:form_params] || {}
|
|
5321
|
+
|
|
5322
|
+
# http body (model)
|
|
5323
|
+
post_body = opts[:debug_body]
|
|
5324
|
+
|
|
5325
|
+
# return_type
|
|
5326
|
+
return_type = opts[:debug_return_type] || 'SfvbPageListResponse'
|
|
5327
|
+
|
|
5328
|
+
# auth_names
|
|
5329
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
5330
|
+
|
|
5331
|
+
new_options = opts.merge(
|
|
5332
|
+
:operation => :"SfvbApi.list_sfvb_pages",
|
|
5333
|
+
:header_params => header_params,
|
|
5334
|
+
:query_params => query_params,
|
|
5335
|
+
:form_params => form_params,
|
|
5336
|
+
:body => post_body,
|
|
5337
|
+
:auth_names => auth_names,
|
|
5338
|
+
:return_type => return_type
|
|
5339
|
+
)
|
|
5340
|
+
|
|
5341
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
5342
|
+
if @api_client.config.debugging
|
|
5343
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5344
|
+
end
|
|
5345
|
+
return data, status_code, headers
|
|
5346
|
+
end
|
|
5347
|
+
|
|
5348
|
+
# List recent storefront render logs
|
|
5349
|
+
# The server log the storefront Developer Tools panel shows, one per page render, newest first and without the log text. Each carries counts of error and warning lines, including Velocity problems such as a null #set, so a failing render stands out without reading every log. Filter by uri (a case insensitive contains match on the rendered address) and errors_only. since is 15m, 2h or 1d, or an ISO-8601 time, default 1h; logs are kept for seven days and only the newest 1000. With a filter the newest 200 logs in the window are searched, and more_available says whether older ones were left unread.
|
|
5350
|
+
# @param storefront_oid [Integer]
|
|
5351
|
+
# @param [Hash] opts the optional parameters
|
|
5352
|
+
# @option opts [String] :uri
|
|
5353
|
+
# @option opts [String] :since
|
|
5354
|
+
# @option opts [Boolean] :errors_only
|
|
5355
|
+
# @option opts [Integer] :limit
|
|
5356
|
+
# @return [SfvbServerLogsResponse]
|
|
5357
|
+
def list_sfvb_server_logs(storefront_oid, opts = {})
|
|
5358
|
+
data, _status_code, _headers = list_sfvb_server_logs_with_http_info(storefront_oid, opts)
|
|
5359
|
+
data
|
|
5360
|
+
end
|
|
4717
5361
|
|
|
4718
5362
|
# List recent storefront render logs
|
|
4719
5363
|
# The server log the storefront Developer Tools panel shows, one per page render, newest first and without the log text. Each carries counts of error and warning lines, including Velocity problems such as a null #set, so a failing render stands out without reading every log. Filter by uri (a case insensitive contains match on the rendered address) and errors_only. since is 15m, 2h or 1d, or an ISO-8601 time, default 1h; logs are kept for seven days and only the newest 1000. With a filter the newest 200 logs in the window are searched, and more_available says whether older ones were left unread.
|
|
@@ -5212,6 +5856,94 @@ module UltracartClient
|
|
|
5212
5856
|
return data, status_code, headers
|
|
5213
5857
|
end
|
|
5214
5858
|
|
|
5859
|
+
# Publish a library entry's draft
|
|
5860
|
+
# Freezes the draft as a published revision at its revision_number and sets who can see it. Owner only, with the draft's hash_sha256 as If-Match. Always needs sfvb_publish, because it changes what other merchants can install. Images, fonts, stylesheets and media must be relative paths, and credential shaped strings are refused. Public also needs the library publisher property on the account and no executable content at all - no script, html, embed, css or velocity elements. After those checks an automated AI review reads the fragment, which can take up to about a minute. A clear violation both of its models agree on refuses any publish with sfvb.library_ai_review_blocked. A public publish also needs its approval, otherwise sfvb.library_ai_review_inconclusive. The result is in content_manifest.ai_review.
|
|
5861
|
+
# @param storefront_oid [Integer]
|
|
5862
|
+
# @param library_oid [Integer]
|
|
5863
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
5864
|
+
# @param publish_request [SfvbLibraryPublishRequest] Visibility and release notes
|
|
5865
|
+
# @param [Hash] opts the optional parameters
|
|
5866
|
+
# @return [SfvbLibraryEntry]
|
|
5867
|
+
def publish_sfvb_library_entry(storefront_oid, library_oid, if_match, publish_request, opts = {})
|
|
5868
|
+
data, _status_code, _headers = publish_sfvb_library_entry_with_http_info(storefront_oid, library_oid, if_match, publish_request, opts)
|
|
5869
|
+
data
|
|
5870
|
+
end
|
|
5871
|
+
|
|
5872
|
+
# Publish a library entry's draft
|
|
5873
|
+
# Freezes the draft as a published revision at its revision_number and sets who can see it. Owner only, with the draft's hash_sha256 as If-Match. Always needs sfvb_publish, because it changes what other merchants can install. Images, fonts, stylesheets and media must be relative paths, and credential shaped strings are refused. Public also needs the library publisher property on the account and no executable content at all - no script, html, embed, css or velocity elements. After those checks an automated AI review reads the fragment, which can take up to about a minute. A clear violation both of its models agree on refuses any publish with sfvb.library_ai_review_blocked. A public publish also needs its approval, otherwise sfvb.library_ai_review_inconclusive. The result is in content_manifest.ai_review.
|
|
5874
|
+
# @param storefront_oid [Integer]
|
|
5875
|
+
# @param library_oid [Integer]
|
|
5876
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
5877
|
+
# @param publish_request [SfvbLibraryPublishRequest] Visibility and release notes
|
|
5878
|
+
# @param [Hash] opts the optional parameters
|
|
5879
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
5880
|
+
def publish_sfvb_library_entry_with_http_info(storefront_oid, library_oid, if_match, publish_request, opts = {})
|
|
5881
|
+
if @api_client.config.debugging
|
|
5882
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.publish_sfvb_library_entry ...'
|
|
5883
|
+
end
|
|
5884
|
+
# verify the required parameter 'storefront_oid' is set
|
|
5885
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
5886
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.publish_sfvb_library_entry"
|
|
5887
|
+
end
|
|
5888
|
+
# verify the required parameter 'library_oid' is set
|
|
5889
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
5890
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.publish_sfvb_library_entry"
|
|
5891
|
+
end
|
|
5892
|
+
# verify the required parameter 'if_match' is set
|
|
5893
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
5894
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.publish_sfvb_library_entry"
|
|
5895
|
+
end
|
|
5896
|
+
# verify the required parameter 'publish_request' is set
|
|
5897
|
+
if @api_client.config.client_side_validation && publish_request.nil?
|
|
5898
|
+
fail ArgumentError, "Missing the required parameter 'publish_request' when calling SfvbApi.publish_sfvb_library_entry"
|
|
5899
|
+
end
|
|
5900
|
+
# resource path
|
|
5901
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/publish'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
5902
|
+
|
|
5903
|
+
# query parameters
|
|
5904
|
+
query_params = opts[:query_params] || {}
|
|
5905
|
+
|
|
5906
|
+
# header parameters
|
|
5907
|
+
header_params = opts[:header_params] || {}
|
|
5908
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
5909
|
+
# HTTP header 'Accept' (if needed)
|
|
5910
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
5911
|
+
# HTTP header 'Content-Type'
|
|
5912
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
5913
|
+
if !content_type.nil?
|
|
5914
|
+
header_params['Content-Type'] = content_type
|
|
5915
|
+
end
|
|
5916
|
+
header_params[:'If-Match'] = if_match
|
|
5917
|
+
|
|
5918
|
+
# form parameters
|
|
5919
|
+
form_params = opts[:form_params] || {}
|
|
5920
|
+
|
|
5921
|
+
# http body (model)
|
|
5922
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(publish_request)
|
|
5923
|
+
|
|
5924
|
+
# return_type
|
|
5925
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
5926
|
+
|
|
5927
|
+
# auth_names
|
|
5928
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
5929
|
+
|
|
5930
|
+
new_options = opts.merge(
|
|
5931
|
+
:operation => :"SfvbApi.publish_sfvb_library_entry",
|
|
5932
|
+
:header_params => header_params,
|
|
5933
|
+
:query_params => query_params,
|
|
5934
|
+
:form_params => form_params,
|
|
5935
|
+
:body => post_body,
|
|
5936
|
+
:auth_names => auth_names,
|
|
5937
|
+
:return_type => return_type
|
|
5938
|
+
)
|
|
5939
|
+
|
|
5940
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
5941
|
+
if @api_client.config.debugging
|
|
5942
|
+
@api_client.config.logger.debug "API called: SfvbApi#publish_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5943
|
+
end
|
|
5944
|
+
return data, status_code, headers
|
|
5945
|
+
end
|
|
5946
|
+
|
|
5215
5947
|
# Write a container stored outside the file system
|
|
5216
5948
|
# 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. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
|
|
5217
5949
|
# @param storefront_oid [Integer]
|
|
@@ -7248,7 +7980,7 @@ module UltracartClient
|
|
|
7248
7980
|
end
|
|
7249
7981
|
|
|
7250
7982
|
# Search the element library
|
|
7251
|
-
# 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
|
|
7983
|
+
# 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 a query parameter named after a facet, such as facet_purpose, whose value is the facet name, a colon and one of its options. Besides element type and author, the facets include purpose, section, industry and style from library/taxonomy, and the search text matches those tags too. Results follow the same rules as reading one entry, so others see published revisions only.
|
|
7252
7984
|
# @param storefront_oid [Integer]
|
|
7253
7985
|
# @param [Hash] opts the optional parameters
|
|
7254
7986
|
# @option opts [String] :segment
|
|
@@ -7262,7 +7994,7 @@ module UltracartClient
|
|
|
7262
7994
|
end
|
|
7263
7995
|
|
|
7264
7996
|
# Search the element library
|
|
7265
|
-
# 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
|
|
7997
|
+
# 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 a query parameter named after a facet, such as facet_purpose, whose value is the facet name, a colon and one of its options. Besides element type and author, the facets include purpose, section, industry and style from library/taxonomy, and the search text matches those tags too. Results follow the same rules as reading one entry, so others see published revisions only.
|
|
7266
7998
|
# @param storefront_oid [Integer]
|
|
7267
7999
|
# @param [Hash] opts the optional parameters
|
|
7268
8000
|
# @option opts [String] :segment
|
|
@@ -7323,37 +8055,49 @@ module UltracartClient
|
|
|
7323
8055
|
return data, status_code, headers
|
|
7324
8056
|
end
|
|
7325
8057
|
|
|
7326
|
-
#
|
|
7327
|
-
#
|
|
8058
|
+
# Set a library entry's screenshot
|
|
8059
|
+
# Three calls, like the other uploads. Request an upload URL with files/upload_url/png, PUT the PNG bytes to it, then call this with the key, the sha256 of those bytes and where the image came from. Owner only, with the draft's hash_sha256 as If-Match. The PNG must be at most 5 MB and 4096 pixels a side; it is re-encoded, which drops any metadata, and a thumbnail is made from it before this returns. Capture it with test data only. A refused image leaves the previous screenshot in place. Other merchants see a new screenshot only after the next publish, whose review checks it.
|
|
7328
8060
|
# @param storefront_oid [Integer]
|
|
7329
|
-
# @param
|
|
8061
|
+
# @param library_oid [Integer]
|
|
8062
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
8063
|
+
# @param screenshot_request [SfvbLibraryScreenshotRequest] The staged PNG
|
|
7330
8064
|
# @param [Hash] opts the optional parameters
|
|
7331
|
-
# @return [
|
|
7332
|
-
def
|
|
7333
|
-
data, _status_code, _headers =
|
|
8065
|
+
# @return [SfvbLibraryEntry]
|
|
8066
|
+
def set_sfvb_library_screenshot(storefront_oid, library_oid, if_match, screenshot_request, opts = {})
|
|
8067
|
+
data, _status_code, _headers = set_sfvb_library_screenshot_with_http_info(storefront_oid, library_oid, if_match, screenshot_request, opts)
|
|
7334
8068
|
data
|
|
7335
8069
|
end
|
|
7336
8070
|
|
|
7337
|
-
#
|
|
7338
|
-
#
|
|
8071
|
+
# Set a library entry's screenshot
|
|
8072
|
+
# Three calls, like the other uploads. Request an upload URL with files/upload_url/png, PUT the PNG bytes to it, then call this with the key, the sha256 of those bytes and where the image came from. Owner only, with the draft's hash_sha256 as If-Match. The PNG must be at most 5 MB and 4096 pixels a side; it is re-encoded, which drops any metadata, and a thumbnail is made from it before this returns. Capture it with test data only. A refused image leaves the previous screenshot in place. Other merchants see a new screenshot only after the next publish, whose review checks it.
|
|
7339
8073
|
# @param storefront_oid [Integer]
|
|
7340
|
-
# @param
|
|
8074
|
+
# @param library_oid [Integer]
|
|
8075
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
8076
|
+
# @param screenshot_request [SfvbLibraryScreenshotRequest] The staged PNG
|
|
7341
8077
|
# @param [Hash] opts the optional parameters
|
|
7342
|
-
# @return [Array<(
|
|
7343
|
-
def
|
|
8078
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
8079
|
+
def set_sfvb_library_screenshot_with_http_info(storefront_oid, library_oid, if_match, screenshot_request, opts = {})
|
|
7344
8080
|
if @api_client.config.debugging
|
|
7345
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
8081
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.set_sfvb_library_screenshot ...'
|
|
7346
8082
|
end
|
|
7347
8083
|
# verify the required parameter 'storefront_oid' is set
|
|
7348
8084
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
7349
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
8085
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.set_sfvb_library_screenshot"
|
|
7350
8086
|
end
|
|
7351
|
-
# verify the required parameter '
|
|
7352
|
-
if @api_client.config.client_side_validation &&
|
|
7353
|
-
fail ArgumentError, "Missing the required parameter '
|
|
8087
|
+
# verify the required parameter 'library_oid' is set
|
|
8088
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
8089
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.set_sfvb_library_screenshot"
|
|
8090
|
+
end
|
|
8091
|
+
# verify the required parameter 'if_match' is set
|
|
8092
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
8093
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.set_sfvb_library_screenshot"
|
|
8094
|
+
end
|
|
8095
|
+
# verify the required parameter 'screenshot_request' is set
|
|
8096
|
+
if @api_client.config.client_side_validation && screenshot_request.nil?
|
|
8097
|
+
fail ArgumentError, "Missing the required parameter 'screenshot_request' when calling SfvbApi.set_sfvb_library_screenshot"
|
|
7354
8098
|
end
|
|
7355
8099
|
# resource path
|
|
7356
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
8100
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/screenshot'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
7357
8101
|
|
|
7358
8102
|
# query parameters
|
|
7359
8103
|
query_params = opts[:query_params] || {}
|
|
@@ -7368,21 +8112,22 @@ module UltracartClient
|
|
|
7368
8112
|
if !content_type.nil?
|
|
7369
8113
|
header_params['Content-Type'] = content_type
|
|
7370
8114
|
end
|
|
8115
|
+
header_params[:'If-Match'] = if_match
|
|
7371
8116
|
|
|
7372
8117
|
# form parameters
|
|
7373
8118
|
form_params = opts[:form_params] || {}
|
|
7374
8119
|
|
|
7375
8120
|
# http body (model)
|
|
7376
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
8121
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(screenshot_request)
|
|
7377
8122
|
|
|
7378
8123
|
# return_type
|
|
7379
|
-
return_type = opts[:debug_return_type] || '
|
|
8124
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
7380
8125
|
|
|
7381
8126
|
# auth_names
|
|
7382
8127
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
7383
8128
|
|
|
7384
8129
|
new_options = opts.merge(
|
|
7385
|
-
:operation => :"SfvbApi.
|
|
8130
|
+
:operation => :"SfvbApi.set_sfvb_library_screenshot",
|
|
7386
8131
|
:header_params => header_params,
|
|
7387
8132
|
:query_params => query_params,
|
|
7388
8133
|
:form_params => form_params,
|
|
@@ -7391,44 +8136,50 @@ module UltracartClient
|
|
|
7391
8136
|
:return_type => return_type
|
|
7392
8137
|
)
|
|
7393
8138
|
|
|
7394
|
-
data, status_code, headers = @api_client.call_api(:
|
|
8139
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
7395
8140
|
if @api_client.config.debugging
|
|
7396
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
8141
|
+
@api_client.config.logger.debug "API called: SfvbApi#set_sfvb_library_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
7397
8142
|
end
|
|
7398
8143
|
return data, status_code, headers
|
|
7399
8144
|
end
|
|
7400
8145
|
|
|
7401
|
-
#
|
|
7402
|
-
#
|
|
8146
|
+
# Share a published library entry with a linked account
|
|
8147
|
+
# Owner only, and always needs sfvb_publish. The merchant must be one share_targets lists, and the entry must have a published revision, which is what the recipient sees. The published revision is checked again for absolute asset URLs and credentials. Idempotent.
|
|
7403
8148
|
# @param storefront_oid [Integer]
|
|
7404
|
-
# @param
|
|
8149
|
+
# @param library_oid [Integer]
|
|
8150
|
+
# @param share_request [SfvbLibraryShareRequest] The linked account
|
|
7405
8151
|
# @param [Hash] opts the optional parameters
|
|
7406
|
-
# @return [
|
|
7407
|
-
def
|
|
7408
|
-
data, _status_code, _headers =
|
|
8152
|
+
# @return [SfvbLibraryEntry]
|
|
8153
|
+
def share_sfvb_library_entry(storefront_oid, library_oid, share_request, opts = {})
|
|
8154
|
+
data, _status_code, _headers = share_sfvb_library_entry_with_http_info(storefront_oid, library_oid, share_request, opts)
|
|
7409
8155
|
data
|
|
7410
8156
|
end
|
|
7411
8157
|
|
|
7412
|
-
#
|
|
7413
|
-
#
|
|
8158
|
+
# Share a published library entry with a linked account
|
|
8159
|
+
# Owner only, and always needs sfvb_publish. The merchant must be one share_targets lists, and the entry must have a published revision, which is what the recipient sees. The published revision is checked again for absolute asset URLs and credentials. Idempotent.
|
|
7414
8160
|
# @param storefront_oid [Integer]
|
|
7415
|
-
# @param
|
|
8161
|
+
# @param library_oid [Integer]
|
|
8162
|
+
# @param share_request [SfvbLibraryShareRequest] The linked account
|
|
7416
8163
|
# @param [Hash] opts the optional parameters
|
|
7417
|
-
# @return [Array<(
|
|
7418
|
-
def
|
|
8164
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
8165
|
+
def share_sfvb_library_entry_with_http_info(storefront_oid, library_oid, share_request, opts = {})
|
|
7419
8166
|
if @api_client.config.debugging
|
|
7420
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
8167
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.share_sfvb_library_entry ...'
|
|
7421
8168
|
end
|
|
7422
8169
|
# verify the required parameter 'storefront_oid' is set
|
|
7423
8170
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
7424
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
8171
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.share_sfvb_library_entry"
|
|
7425
8172
|
end
|
|
7426
|
-
# verify the required parameter '
|
|
7427
|
-
if @api_client.config.client_side_validation &&
|
|
7428
|
-
fail ArgumentError, "Missing the required parameter '
|
|
8173
|
+
# verify the required parameter 'library_oid' is set
|
|
8174
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
8175
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.share_sfvb_library_entry"
|
|
8176
|
+
end
|
|
8177
|
+
# verify the required parameter 'share_request' is set
|
|
8178
|
+
if @api_client.config.client_side_validation && share_request.nil?
|
|
8179
|
+
fail ArgumentError, "Missing the required parameter 'share_request' when calling SfvbApi.share_sfvb_library_entry"
|
|
7429
8180
|
end
|
|
7430
8181
|
# resource path
|
|
7431
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
8182
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/shares'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
7432
8183
|
|
|
7433
8184
|
# query parameters
|
|
7434
8185
|
query_params = opts[:query_params] || {}
|
|
@@ -7438,21 +8189,26 @@ module UltracartClient
|
|
|
7438
8189
|
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
7439
8190
|
# HTTP header 'Accept' (if needed)
|
|
7440
8191
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8192
|
+
# HTTP header 'Content-Type'
|
|
8193
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
8194
|
+
if !content_type.nil?
|
|
8195
|
+
header_params['Content-Type'] = content_type
|
|
8196
|
+
end
|
|
7441
8197
|
|
|
7442
8198
|
# form parameters
|
|
7443
8199
|
form_params = opts[:form_params] || {}
|
|
7444
8200
|
|
|
7445
8201
|
# http body (model)
|
|
7446
|
-
post_body = opts[:debug_body]
|
|
8202
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(share_request)
|
|
7447
8203
|
|
|
7448
8204
|
# return_type
|
|
7449
|
-
return_type = opts[:debug_return_type] || '
|
|
8205
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
7450
8206
|
|
|
7451
8207
|
# auth_names
|
|
7452
8208
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
7453
8209
|
|
|
7454
8210
|
new_options = opts.merge(
|
|
7455
|
-
:operation => :"SfvbApi.
|
|
8211
|
+
:operation => :"SfvbApi.share_sfvb_library_entry",
|
|
7456
8212
|
:header_params => header_params,
|
|
7457
8213
|
:query_params => query_params,
|
|
7458
8214
|
:form_params => form_params,
|
|
@@ -7463,48 +8219,42 @@ module UltracartClient
|
|
|
7463
8219
|
|
|
7464
8220
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
7465
8221
|
if @api_client.config.debugging
|
|
7466
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
8222
|
+
@api_client.config.logger.debug "API called: SfvbApi#share_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
7467
8223
|
end
|
|
7468
8224
|
return data, status_code, headers
|
|
7469
8225
|
end
|
|
7470
8226
|
|
|
7471
|
-
#
|
|
7472
|
-
#
|
|
8227
|
+
# Start an experiment
|
|
8228
|
+
# type page starts an experiment element already saved in a page body - send path, slot and widget_id, and its name, objective, duration and variations are read from the element with the builder's rules (2 to 5 variations numbered 0 up with no gaps, 3 to 90 days, traffic on all or none adding up to 100). The new id is written into the element and the body is saved, so pull it again before the next edit. type url splits visitors between existing pages at router_url, and always ends by itself after duration_days. Always needs sfvb_publish, because visitors are split as soon as it starts.
|
|
7473
8229
|
# @param storefront_oid [Integer]
|
|
7474
|
-
# @param
|
|
7475
|
-
# @param blog_post_request [SfvbBlogPostRequest] The fields to change
|
|
8230
|
+
# @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
|
|
7476
8231
|
# @param [Hash] opts the optional parameters
|
|
7477
|
-
# @return [
|
|
7478
|
-
def
|
|
7479
|
-
data, _status_code, _headers =
|
|
8232
|
+
# @return [SfvbExperiment]
|
|
8233
|
+
def start_sfvb_experiment(storefront_oid, experiment_start_request, opts = {})
|
|
8234
|
+
data, _status_code, _headers = start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts)
|
|
7480
8235
|
data
|
|
7481
8236
|
end
|
|
7482
8237
|
|
|
7483
|
-
#
|
|
7484
|
-
#
|
|
8238
|
+
# Start an experiment
|
|
8239
|
+
# type page starts an experiment element already saved in a page body - send path, slot and widget_id, and its name, objective, duration and variations are read from the element with the builder's rules (2 to 5 variations numbered 0 up with no gaps, 3 to 90 days, traffic on all or none adding up to 100). The new id is written into the element and the body is saved, so pull it again before the next edit. type url splits visitors between existing pages at router_url, and always ends by itself after duration_days. Always needs sfvb_publish, because visitors are split as soon as it starts.
|
|
7485
8240
|
# @param storefront_oid [Integer]
|
|
7486
|
-
# @param
|
|
7487
|
-
# @param blog_post_request [SfvbBlogPostRequest] The fields to change
|
|
8241
|
+
# @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
|
|
7488
8242
|
# @param [Hash] opts the optional parameters
|
|
7489
|
-
# @return [Array<(
|
|
7490
|
-
def
|
|
8243
|
+
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
8244
|
+
def start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts = {})
|
|
7491
8245
|
if @api_client.config.debugging
|
|
7492
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
8246
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.start_sfvb_experiment ...'
|
|
7493
8247
|
end
|
|
7494
8248
|
# verify the required parameter 'storefront_oid' is set
|
|
7495
8249
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
7496
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
7497
|
-
end
|
|
7498
|
-
# verify the required parameter 'blog_post_oid' is set
|
|
7499
|
-
if @api_client.config.client_side_validation && blog_post_oid.nil?
|
|
7500
|
-
fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.update_sfvb_blog_post"
|
|
8250
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.start_sfvb_experiment"
|
|
7501
8251
|
end
|
|
7502
|
-
# verify the required parameter '
|
|
7503
|
-
if @api_client.config.client_side_validation &&
|
|
7504
|
-
fail ArgumentError, "Missing the required parameter '
|
|
8252
|
+
# verify the required parameter 'experiment_start_request' is set
|
|
8253
|
+
if @api_client.config.client_side_validation && experiment_start_request.nil?
|
|
8254
|
+
fail ArgumentError, "Missing the required parameter 'experiment_start_request' when calling SfvbApi.start_sfvb_experiment"
|
|
7505
8255
|
end
|
|
7506
8256
|
# resource path
|
|
7507
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
8257
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
7508
8258
|
|
|
7509
8259
|
# query parameters
|
|
7510
8260
|
query_params = opts[:query_params] || {}
|
|
@@ -7524,7 +8274,385 @@ module UltracartClient
|
|
|
7524
8274
|
form_params = opts[:form_params] || {}
|
|
7525
8275
|
|
|
7526
8276
|
# http body (model)
|
|
7527
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
8277
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_start_request)
|
|
8278
|
+
|
|
8279
|
+
# return_type
|
|
8280
|
+
return_type = opts[:debug_return_type] || 'SfvbExperiment'
|
|
8281
|
+
|
|
8282
|
+
# auth_names
|
|
8283
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8284
|
+
|
|
8285
|
+
new_options = opts.merge(
|
|
8286
|
+
:operation => :"SfvbApi.start_sfvb_experiment",
|
|
8287
|
+
:header_params => header_params,
|
|
8288
|
+
:query_params => query_params,
|
|
8289
|
+
:form_params => form_params,
|
|
8290
|
+
:body => post_body,
|
|
8291
|
+
:auth_names => auth_names,
|
|
8292
|
+
:return_type => return_type
|
|
8293
|
+
)
|
|
8294
|
+
|
|
8295
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
8296
|
+
if @api_client.config.debugging
|
|
8297
|
+
@api_client.config.logger.debug "API called: SfvbApi#start_sfvb_experiment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8298
|
+
end
|
|
8299
|
+
return data, status_code, headers
|
|
8300
|
+
end
|
|
8301
|
+
|
|
8302
|
+
# Unarchive an upsell path
|
|
8303
|
+
# Brings the path back into the default list. Unarchiving one that is switched on starts it, so that needs sfvb_publish.
|
|
8304
|
+
# @param storefront_oid [Integer]
|
|
8305
|
+
# @param upsell_path_oid [Integer]
|
|
8306
|
+
# @param [Hash] opts the optional parameters
|
|
8307
|
+
# @return [SfvbUpsellPath]
|
|
8308
|
+
def unarchive_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
|
|
8309
|
+
data, _status_code, _headers = unarchive_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
|
|
8310
|
+
data
|
|
8311
|
+
end
|
|
8312
|
+
|
|
8313
|
+
# Unarchive an upsell path
|
|
8314
|
+
# Brings the path back into the default list. Unarchiving one that is switched on starts it, so that needs sfvb_publish.
|
|
8315
|
+
# @param storefront_oid [Integer]
|
|
8316
|
+
# @param upsell_path_oid [Integer]
|
|
8317
|
+
# @param [Hash] opts the optional parameters
|
|
8318
|
+
# @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
|
|
8319
|
+
def unarchive_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
|
|
8320
|
+
if @api_client.config.debugging
|
|
8321
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.unarchive_sfvb_upsell_path ...'
|
|
8322
|
+
end
|
|
8323
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8324
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8325
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.unarchive_sfvb_upsell_path"
|
|
8326
|
+
end
|
|
8327
|
+
# verify the required parameter 'upsell_path_oid' is set
|
|
8328
|
+
if @api_client.config.client_side_validation && upsell_path_oid.nil?
|
|
8329
|
+
fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.unarchive_sfvb_upsell_path"
|
|
8330
|
+
end
|
|
8331
|
+
# resource path
|
|
8332
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/unarchive'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
|
|
8333
|
+
|
|
8334
|
+
# query parameters
|
|
8335
|
+
query_params = opts[:query_params] || {}
|
|
8336
|
+
|
|
8337
|
+
# header parameters
|
|
8338
|
+
header_params = opts[:header_params] || {}
|
|
8339
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8340
|
+
# HTTP header 'Accept' (if needed)
|
|
8341
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8342
|
+
|
|
8343
|
+
# form parameters
|
|
8344
|
+
form_params = opts[:form_params] || {}
|
|
8345
|
+
|
|
8346
|
+
# http body (model)
|
|
8347
|
+
post_body = opts[:debug_body]
|
|
8348
|
+
|
|
8349
|
+
# return_type
|
|
8350
|
+
return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
|
|
8351
|
+
|
|
8352
|
+
# auth_names
|
|
8353
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8354
|
+
|
|
8355
|
+
new_options = opts.merge(
|
|
8356
|
+
:operation => :"SfvbApi.unarchive_sfvb_upsell_path",
|
|
8357
|
+
:header_params => header_params,
|
|
8358
|
+
:query_params => query_params,
|
|
8359
|
+
:form_params => form_params,
|
|
8360
|
+
:body => post_body,
|
|
8361
|
+
:auth_names => auth_names,
|
|
8362
|
+
:return_type => return_type
|
|
8363
|
+
)
|
|
8364
|
+
|
|
8365
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
8366
|
+
if @api_client.config.debugging
|
|
8367
|
+
@api_client.config.logger.debug "API called: SfvbApi#unarchive_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8368
|
+
end
|
|
8369
|
+
return data, status_code, headers
|
|
8370
|
+
end
|
|
8371
|
+
|
|
8372
|
+
# Remove a library entry from favorites
|
|
8373
|
+
# Removes the calling user's bookmark. Idempotent.
|
|
8374
|
+
# @param storefront_oid [Integer]
|
|
8375
|
+
# @param library_oid [Integer]
|
|
8376
|
+
# @param [Hash] opts the optional parameters
|
|
8377
|
+
# @return [nil]
|
|
8378
|
+
def unfavorite_sfvb_library_entry(storefront_oid, library_oid, opts = {})
|
|
8379
|
+
unfavorite_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts)
|
|
8380
|
+
nil
|
|
8381
|
+
end
|
|
8382
|
+
|
|
8383
|
+
# Remove a library entry from favorites
|
|
8384
|
+
# Removes the calling user's bookmark. Idempotent.
|
|
8385
|
+
# @param storefront_oid [Integer]
|
|
8386
|
+
# @param library_oid [Integer]
|
|
8387
|
+
# @param [Hash] opts the optional parameters
|
|
8388
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
8389
|
+
def unfavorite_sfvb_library_entry_with_http_info(storefront_oid, library_oid, opts = {})
|
|
8390
|
+
if @api_client.config.debugging
|
|
8391
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.unfavorite_sfvb_library_entry ...'
|
|
8392
|
+
end
|
|
8393
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8394
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8395
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.unfavorite_sfvb_library_entry"
|
|
8396
|
+
end
|
|
8397
|
+
# verify the required parameter 'library_oid' is set
|
|
8398
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
8399
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.unfavorite_sfvb_library_entry"
|
|
8400
|
+
end
|
|
8401
|
+
# resource path
|
|
8402
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/favorite'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
8403
|
+
|
|
8404
|
+
# query parameters
|
|
8405
|
+
query_params = opts[:query_params] || {}
|
|
8406
|
+
|
|
8407
|
+
# header parameters
|
|
8408
|
+
header_params = opts[:header_params] || {}
|
|
8409
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8410
|
+
# HTTP header 'Accept' (if needed)
|
|
8411
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8412
|
+
|
|
8413
|
+
# form parameters
|
|
8414
|
+
form_params = opts[:form_params] || {}
|
|
8415
|
+
|
|
8416
|
+
# http body (model)
|
|
8417
|
+
post_body = opts[:debug_body]
|
|
8418
|
+
|
|
8419
|
+
# return_type
|
|
8420
|
+
return_type = opts[:debug_return_type]
|
|
8421
|
+
|
|
8422
|
+
# auth_names
|
|
8423
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8424
|
+
|
|
8425
|
+
new_options = opts.merge(
|
|
8426
|
+
:operation => :"SfvbApi.unfavorite_sfvb_library_entry",
|
|
8427
|
+
:header_params => header_params,
|
|
8428
|
+
:query_params => query_params,
|
|
8429
|
+
:form_params => form_params,
|
|
8430
|
+
:body => post_body,
|
|
8431
|
+
:auth_names => auth_names,
|
|
8432
|
+
:return_type => return_type
|
|
8433
|
+
)
|
|
8434
|
+
|
|
8435
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
8436
|
+
if @api_client.config.debugging
|
|
8437
|
+
@api_client.config.logger.debug "API called: SfvbApi#unfavorite_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8438
|
+
end
|
|
8439
|
+
return data, status_code, headers
|
|
8440
|
+
end
|
|
8441
|
+
|
|
8442
|
+
# Narrow who can see a library entry
|
|
8443
|
+
# Sets visibility to shared or private. Owner only, and always needs sfvb_publish. Published revisions are kept and storefronts that already installed the entry keep their copies.
|
|
8444
|
+
# @param storefront_oid [Integer]
|
|
8445
|
+
# @param library_oid [Integer]
|
|
8446
|
+
# @param unpublish_request [SfvbLibraryPublishRequest] The narrower visibility
|
|
8447
|
+
# @param [Hash] opts the optional parameters
|
|
8448
|
+
# @return [SfvbLibraryEntry]
|
|
8449
|
+
def unpublish_sfvb_library_entry(storefront_oid, library_oid, unpublish_request, opts = {})
|
|
8450
|
+
data, _status_code, _headers = unpublish_sfvb_library_entry_with_http_info(storefront_oid, library_oid, unpublish_request, opts)
|
|
8451
|
+
data
|
|
8452
|
+
end
|
|
8453
|
+
|
|
8454
|
+
# Narrow who can see a library entry
|
|
8455
|
+
# Sets visibility to shared or private. Owner only, and always needs sfvb_publish. Published revisions are kept and storefronts that already installed the entry keep their copies.
|
|
8456
|
+
# @param storefront_oid [Integer]
|
|
8457
|
+
# @param library_oid [Integer]
|
|
8458
|
+
# @param unpublish_request [SfvbLibraryPublishRequest] The narrower visibility
|
|
8459
|
+
# @param [Hash] opts the optional parameters
|
|
8460
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
8461
|
+
def unpublish_sfvb_library_entry_with_http_info(storefront_oid, library_oid, unpublish_request, opts = {})
|
|
8462
|
+
if @api_client.config.debugging
|
|
8463
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.unpublish_sfvb_library_entry ...'
|
|
8464
|
+
end
|
|
8465
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8466
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8467
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.unpublish_sfvb_library_entry"
|
|
8468
|
+
end
|
|
8469
|
+
# verify the required parameter 'library_oid' is set
|
|
8470
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
8471
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.unpublish_sfvb_library_entry"
|
|
8472
|
+
end
|
|
8473
|
+
# verify the required parameter 'unpublish_request' is set
|
|
8474
|
+
if @api_client.config.client_side_validation && unpublish_request.nil?
|
|
8475
|
+
fail ArgumentError, "Missing the required parameter 'unpublish_request' when calling SfvbApi.unpublish_sfvb_library_entry"
|
|
8476
|
+
end
|
|
8477
|
+
# resource path
|
|
8478
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/unpublish'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
8479
|
+
|
|
8480
|
+
# query parameters
|
|
8481
|
+
query_params = opts[:query_params] || {}
|
|
8482
|
+
|
|
8483
|
+
# header parameters
|
|
8484
|
+
header_params = opts[:header_params] || {}
|
|
8485
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8486
|
+
# HTTP header 'Accept' (if needed)
|
|
8487
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8488
|
+
# HTTP header 'Content-Type'
|
|
8489
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
8490
|
+
if !content_type.nil?
|
|
8491
|
+
header_params['Content-Type'] = content_type
|
|
8492
|
+
end
|
|
8493
|
+
|
|
8494
|
+
# form parameters
|
|
8495
|
+
form_params = opts[:form_params] || {}
|
|
8496
|
+
|
|
8497
|
+
# http body (model)
|
|
8498
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(unpublish_request)
|
|
8499
|
+
|
|
8500
|
+
# return_type
|
|
8501
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
8502
|
+
|
|
8503
|
+
# auth_names
|
|
8504
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8505
|
+
|
|
8506
|
+
new_options = opts.merge(
|
|
8507
|
+
:operation => :"SfvbApi.unpublish_sfvb_library_entry",
|
|
8508
|
+
:header_params => header_params,
|
|
8509
|
+
:query_params => query_params,
|
|
8510
|
+
:form_params => form_params,
|
|
8511
|
+
:body => post_body,
|
|
8512
|
+
:auth_names => auth_names,
|
|
8513
|
+
:return_type => return_type
|
|
8514
|
+
)
|
|
8515
|
+
|
|
8516
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
8517
|
+
if @api_client.config.debugging
|
|
8518
|
+
@api_client.config.logger.debug "API called: SfvbApi#unpublish_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8519
|
+
end
|
|
8520
|
+
return data, status_code, headers
|
|
8521
|
+
end
|
|
8522
|
+
|
|
8523
|
+
# Stop sharing a library entry with an account
|
|
8524
|
+
# Owner only, and always needs sfvb_publish. Stops further installs by that account. Its existing installs keep their copies and are listed in the result. Idempotent, and still works while the library is turned off.
|
|
8525
|
+
# @param storefront_oid [Integer]
|
|
8526
|
+
# @param library_oid [Integer]
|
|
8527
|
+
# @param merchant_id [String]
|
|
8528
|
+
# @param [Hash] opts the optional parameters
|
|
8529
|
+
# @return [SfvbLibraryUnshareResult]
|
|
8530
|
+
def unshare_sfvb_library_entry(storefront_oid, library_oid, merchant_id, opts = {})
|
|
8531
|
+
data, _status_code, _headers = unshare_sfvb_library_entry_with_http_info(storefront_oid, library_oid, merchant_id, opts)
|
|
8532
|
+
data
|
|
8533
|
+
end
|
|
8534
|
+
|
|
8535
|
+
# Stop sharing a library entry with an account
|
|
8536
|
+
# Owner only, and always needs sfvb_publish. Stops further installs by that account. Its existing installs keep their copies and are listed in the result. Idempotent, and still works while the library is turned off.
|
|
8537
|
+
# @param storefront_oid [Integer]
|
|
8538
|
+
# @param library_oid [Integer]
|
|
8539
|
+
# @param merchant_id [String]
|
|
8540
|
+
# @param [Hash] opts the optional parameters
|
|
8541
|
+
# @return [Array<(SfvbLibraryUnshareResult, Integer, Hash)>] SfvbLibraryUnshareResult data, response status code and response headers
|
|
8542
|
+
def unshare_sfvb_library_entry_with_http_info(storefront_oid, library_oid, merchant_id, opts = {})
|
|
8543
|
+
if @api_client.config.debugging
|
|
8544
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.unshare_sfvb_library_entry ...'
|
|
8545
|
+
end
|
|
8546
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8547
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8548
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.unshare_sfvb_library_entry"
|
|
8549
|
+
end
|
|
8550
|
+
# verify the required parameter 'library_oid' is set
|
|
8551
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
8552
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.unshare_sfvb_library_entry"
|
|
8553
|
+
end
|
|
8554
|
+
# verify the required parameter 'merchant_id' is set
|
|
8555
|
+
if @api_client.config.client_side_validation && merchant_id.nil?
|
|
8556
|
+
fail ArgumentError, "Missing the required parameter 'merchant_id' when calling SfvbApi.unshare_sfvb_library_entry"
|
|
8557
|
+
end
|
|
8558
|
+
# resource path
|
|
8559
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/shares/{merchant_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s)).sub('{' + 'merchant_id' + '}', CGI.escape(merchant_id.to_s))
|
|
8560
|
+
|
|
8561
|
+
# query parameters
|
|
8562
|
+
query_params = opts[:query_params] || {}
|
|
8563
|
+
|
|
8564
|
+
# header parameters
|
|
8565
|
+
header_params = opts[:header_params] || {}
|
|
8566
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8567
|
+
# HTTP header 'Accept' (if needed)
|
|
8568
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8569
|
+
|
|
8570
|
+
# form parameters
|
|
8571
|
+
form_params = opts[:form_params] || {}
|
|
8572
|
+
|
|
8573
|
+
# http body (model)
|
|
8574
|
+
post_body = opts[:debug_body]
|
|
8575
|
+
|
|
8576
|
+
# return_type
|
|
8577
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryUnshareResult'
|
|
8578
|
+
|
|
8579
|
+
# auth_names
|
|
8580
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8581
|
+
|
|
8582
|
+
new_options = opts.merge(
|
|
8583
|
+
:operation => :"SfvbApi.unshare_sfvb_library_entry",
|
|
8584
|
+
:header_params => header_params,
|
|
8585
|
+
:query_params => query_params,
|
|
8586
|
+
:form_params => form_params,
|
|
8587
|
+
:body => post_body,
|
|
8588
|
+
:auth_names => auth_names,
|
|
8589
|
+
:return_type => return_type
|
|
8590
|
+
)
|
|
8591
|
+
|
|
8592
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
8593
|
+
if @api_client.config.debugging
|
|
8594
|
+
@api_client.config.logger.debug "API called: SfvbApi#unshare_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8595
|
+
end
|
|
8596
|
+
return data, status_code, headers
|
|
8597
|
+
end
|
|
8598
|
+
|
|
8599
|
+
# Change a blog post
|
|
8600
|
+
# Only the fields sent change; tags, when sent, replaces every tag. The post's images and attributes are left alone. Publish or unpublish with visibility. A post that is not a draft before or after the change needs sfvb_publish. The same content rules as create apply.
|
|
8601
|
+
# @param storefront_oid [Integer]
|
|
8602
|
+
# @param blog_post_oid [Integer]
|
|
8603
|
+
# @param blog_post_request [SfvbBlogPostRequest] The fields to change
|
|
8604
|
+
# @param [Hash] opts the optional parameters
|
|
8605
|
+
# @return [SfvbBlogPostDetail]
|
|
8606
|
+
def update_sfvb_blog_post(storefront_oid, blog_post_oid, blog_post_request, opts = {})
|
|
8607
|
+
data, _status_code, _headers = update_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, blog_post_request, opts)
|
|
8608
|
+
data
|
|
8609
|
+
end
|
|
8610
|
+
|
|
8611
|
+
# Change a blog post
|
|
8612
|
+
# Only the fields sent change; tags, when sent, replaces every tag. The post's images and attributes are left alone. Publish or unpublish with visibility. A post that is not a draft before or after the change needs sfvb_publish. The same content rules as create apply.
|
|
8613
|
+
# @param storefront_oid [Integer]
|
|
8614
|
+
# @param blog_post_oid [Integer]
|
|
8615
|
+
# @param blog_post_request [SfvbBlogPostRequest] The fields to change
|
|
8616
|
+
# @param [Hash] opts the optional parameters
|
|
8617
|
+
# @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
|
|
8618
|
+
def update_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, blog_post_request, opts = {})
|
|
8619
|
+
if @api_client.config.debugging
|
|
8620
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_blog_post ...'
|
|
8621
|
+
end
|
|
8622
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8623
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8624
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_blog_post"
|
|
8625
|
+
end
|
|
8626
|
+
# verify the required parameter 'blog_post_oid' is set
|
|
8627
|
+
if @api_client.config.client_side_validation && blog_post_oid.nil?
|
|
8628
|
+
fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.update_sfvb_blog_post"
|
|
8629
|
+
end
|
|
8630
|
+
# verify the required parameter 'blog_post_request' is set
|
|
8631
|
+
if @api_client.config.client_side_validation && blog_post_request.nil?
|
|
8632
|
+
fail ArgumentError, "Missing the required parameter 'blog_post_request' when calling SfvbApi.update_sfvb_blog_post"
|
|
8633
|
+
end
|
|
8634
|
+
# resource path
|
|
8635
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/blog_posts/{blog_post_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'blog_post_oid' + '}', CGI.escape(blog_post_oid.to_s))
|
|
8636
|
+
|
|
8637
|
+
# query parameters
|
|
8638
|
+
query_params = opts[:query_params] || {}
|
|
8639
|
+
|
|
8640
|
+
# header parameters
|
|
8641
|
+
header_params = opts[:header_params] || {}
|
|
8642
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8643
|
+
# HTTP header 'Accept' (if needed)
|
|
8644
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8645
|
+
# HTTP header 'Content-Type'
|
|
8646
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
8647
|
+
if !content_type.nil?
|
|
8648
|
+
header_params['Content-Type'] = content_type
|
|
8649
|
+
end
|
|
8650
|
+
|
|
8651
|
+
# form parameters
|
|
8652
|
+
form_params = opts[:form_params] || {}
|
|
8653
|
+
|
|
8654
|
+
# http body (model)
|
|
8655
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_post_request)
|
|
7528
8656
|
|
|
7529
8657
|
# return_type
|
|
7530
8658
|
return_type = opts[:debug_return_type] || 'SfvbBlogPostDetail'
|
|
@@ -7549,6 +8677,94 @@ module UltracartClient
|
|
|
7549
8677
|
return data, status_code, headers
|
|
7550
8678
|
end
|
|
7551
8679
|
|
|
8680
|
+
# Update a library entry's draft
|
|
8681
|
+
# A full replace of the draft's fields. Owner only. Send the hash_sha256 you read as If-Match. Every save increments revision_number; nothing other merchants see changes until the draft is published. A changed fragment is re-scanned and its images copied again, and screenshot_stale tells you to retake the screenshot.
|
|
8682
|
+
# @param storefront_oid [Integer]
|
|
8683
|
+
# @param library_oid [Integer]
|
|
8684
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
8685
|
+
# @param library_entry [SfvbLibraryEntryRequest] The whole entry
|
|
8686
|
+
# @param [Hash] opts the optional parameters
|
|
8687
|
+
# @return [SfvbLibraryEntry]
|
|
8688
|
+
def update_sfvb_library_entry(storefront_oid, library_oid, if_match, library_entry, opts = {})
|
|
8689
|
+
data, _status_code, _headers = update_sfvb_library_entry_with_http_info(storefront_oid, library_oid, if_match, library_entry, opts)
|
|
8690
|
+
data
|
|
8691
|
+
end
|
|
8692
|
+
|
|
8693
|
+
# Update a library entry's draft
|
|
8694
|
+
# A full replace of the draft's fields. Owner only. Send the hash_sha256 you read as If-Match. Every save increments revision_number; nothing other merchants see changes until the draft is published. A changed fragment is re-scanned and its images copied again, and screenshot_stale tells you to retake the screenshot.
|
|
8695
|
+
# @param storefront_oid [Integer]
|
|
8696
|
+
# @param library_oid [Integer]
|
|
8697
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
8698
|
+
# @param library_entry [SfvbLibraryEntryRequest] The whole entry
|
|
8699
|
+
# @param [Hash] opts the optional parameters
|
|
8700
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
8701
|
+
def update_sfvb_library_entry_with_http_info(storefront_oid, library_oid, if_match, library_entry, opts = {})
|
|
8702
|
+
if @api_client.config.debugging
|
|
8703
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_library_entry ...'
|
|
8704
|
+
end
|
|
8705
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8706
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8707
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_library_entry"
|
|
8708
|
+
end
|
|
8709
|
+
# verify the required parameter 'library_oid' is set
|
|
8710
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
8711
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.update_sfvb_library_entry"
|
|
8712
|
+
end
|
|
8713
|
+
# verify the required parameter 'if_match' is set
|
|
8714
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
8715
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_library_entry"
|
|
8716
|
+
end
|
|
8717
|
+
# verify the required parameter 'library_entry' is set
|
|
8718
|
+
if @api_client.config.client_side_validation && library_entry.nil?
|
|
8719
|
+
fail ArgumentError, "Missing the required parameter 'library_entry' when calling SfvbApi.update_sfvb_library_entry"
|
|
8720
|
+
end
|
|
8721
|
+
# resource path
|
|
8722
|
+
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))
|
|
8723
|
+
|
|
8724
|
+
# query parameters
|
|
8725
|
+
query_params = opts[:query_params] || {}
|
|
8726
|
+
|
|
8727
|
+
# header parameters
|
|
8728
|
+
header_params = opts[:header_params] || {}
|
|
8729
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8730
|
+
# HTTP header 'Accept' (if needed)
|
|
8731
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8732
|
+
# HTTP header 'Content-Type'
|
|
8733
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
8734
|
+
if !content_type.nil?
|
|
8735
|
+
header_params['Content-Type'] = content_type
|
|
8736
|
+
end
|
|
8737
|
+
header_params[:'If-Match'] = if_match
|
|
8738
|
+
|
|
8739
|
+
# form parameters
|
|
8740
|
+
form_params = opts[:form_params] || {}
|
|
8741
|
+
|
|
8742
|
+
# http body (model)
|
|
8743
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(library_entry)
|
|
8744
|
+
|
|
8745
|
+
# return_type
|
|
8746
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
8747
|
+
|
|
8748
|
+
# auth_names
|
|
8749
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8750
|
+
|
|
8751
|
+
new_options = opts.merge(
|
|
8752
|
+
:operation => :"SfvbApi.update_sfvb_library_entry",
|
|
8753
|
+
:header_params => header_params,
|
|
8754
|
+
:query_params => query_params,
|
|
8755
|
+
:form_params => form_params,
|
|
8756
|
+
:body => post_body,
|
|
8757
|
+
:auth_names => auth_names,
|
|
8758
|
+
:return_type => return_type
|
|
8759
|
+
)
|
|
8760
|
+
|
|
8761
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
8762
|
+
if @api_client.config.debugging
|
|
8763
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_library_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8764
|
+
end
|
|
8765
|
+
return data, status_code, headers
|
|
8766
|
+
end
|
|
8767
|
+
|
|
7552
8768
|
# Update an upsell offer
|
|
7553
8769
|
# A full replace. Send back the whole offer you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Changing an offer that is switched on, switching one on, or changing upsell_item_id_javascript or offsite_content_url needs sfvb_publish. Settings the API does not show, such as the offer's screenshots, are kept.
|
|
7554
8770
|
# @param storefront_oid [Integer]
|