ultracart_api 4.1.176 → 4.1.178

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.
@@ -266,6 +266,87 @@ module UltracartClient
266
266
  return data, status_code, headers
267
267
  end
268
268
 
269
+ # Attach an image to a blog post
270
+ # Three calls, like the admin blog editor's upload. Request an upload URL with files/upload_url, send the bytes to it, then attach with the key and a filename. No storefront file is created, and the key is redeemed, so it cannot be used twice. default_image replaces the post's default image and code replaces the image with that code; with neither, the image is added for use in the body at the url the response reports. JPEG, PNG, GIF or WebP, checked by content. A post that is not a draft needs sfvb_publish.
271
+ # @param storefront_oid [Integer]
272
+ # @param blog_post_oid [Integer]
273
+ # @param blog_post_image_request [SfvbBlogPostImageRequest] Image to attach
274
+ # @param [Hash] opts the optional parameters
275
+ # @return [SfvbBlogPostDetail]
276
+ def attach_sfvb_blog_post_image(storefront_oid, blog_post_oid, blog_post_image_request, opts = {})
277
+ data, _status_code, _headers = attach_sfvb_blog_post_image_with_http_info(storefront_oid, blog_post_oid, blog_post_image_request, opts)
278
+ data
279
+ end
280
+
281
+ # Attach an image to a blog post
282
+ # Three calls, like the admin blog editor's upload. Request an upload URL with files/upload_url, send the bytes to it, then attach with the key and a filename. No storefront file is created, and the key is redeemed, so it cannot be used twice. default_image replaces the post's default image and code replaces the image with that code; with neither, the image is added for use in the body at the url the response reports. JPEG, PNG, GIF or WebP, checked by content. A post that is not a draft needs sfvb_publish.
283
+ # @param storefront_oid [Integer]
284
+ # @param blog_post_oid [Integer]
285
+ # @param blog_post_image_request [SfvbBlogPostImageRequest] Image to attach
286
+ # @param [Hash] opts the optional parameters
287
+ # @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
288
+ def attach_sfvb_blog_post_image_with_http_info(storefront_oid, blog_post_oid, blog_post_image_request, opts = {})
289
+ if @api_client.config.debugging
290
+ @api_client.config.logger.debug 'Calling API: SfvbApi.attach_sfvb_blog_post_image ...'
291
+ end
292
+ # verify the required parameter 'storefront_oid' is set
293
+ if @api_client.config.client_side_validation && storefront_oid.nil?
294
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.attach_sfvb_blog_post_image"
295
+ end
296
+ # verify the required parameter 'blog_post_oid' is set
297
+ if @api_client.config.client_side_validation && blog_post_oid.nil?
298
+ fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.attach_sfvb_blog_post_image"
299
+ end
300
+ # verify the required parameter 'blog_post_image_request' is set
301
+ if @api_client.config.client_side_validation && blog_post_image_request.nil?
302
+ fail ArgumentError, "Missing the required parameter 'blog_post_image_request' when calling SfvbApi.attach_sfvb_blog_post_image"
303
+ end
304
+ # resource path
305
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/blog_posts/{blog_post_oid}/images/attach'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'blog_post_oid' + '}', CGI.escape(blog_post_oid.to_s))
306
+
307
+ # query parameters
308
+ query_params = opts[:query_params] || {}
309
+
310
+ # header parameters
311
+ header_params = opts[:header_params] || {}
312
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
313
+ # HTTP header 'Accept' (if needed)
314
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
315
+ # HTTP header 'Content-Type'
316
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
317
+ if !content_type.nil?
318
+ header_params['Content-Type'] = content_type
319
+ end
320
+
321
+ # form parameters
322
+ form_params = opts[:form_params] || {}
323
+
324
+ # http body (model)
325
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_post_image_request)
326
+
327
+ # return_type
328
+ return_type = opts[:debug_return_type] || 'SfvbBlogPostDetail'
329
+
330
+ # auth_names
331
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
332
+
333
+ new_options = opts.merge(
334
+ :operation => :"SfvbApi.attach_sfvb_blog_post_image",
335
+ :header_params => header_params,
336
+ :query_params => query_params,
337
+ :form_params => form_params,
338
+ :body => post_body,
339
+ :auth_names => auth_names,
340
+ :return_type => return_type
341
+ )
342
+
343
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
344
+ if @api_client.config.debugging
345
+ @api_client.config.logger.debug "API called: SfvbApi#attach_sfvb_blog_post_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
346
+ end
347
+ return data, status_code, headers
348
+ end
349
+
269
350
  # Compile CJSON to Velocity
270
351
  # 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.
271
352
  # @param compile_request [SfvbCompileRequest] CJSON to compile
@@ -470,6 +551,76 @@ module UltracartClient
470
551
  return data, status_code, headers
471
552
  end
472
553
 
554
+ # Delete a blog post
555
+ # Takes the post off every page and deletes it. There is no undo. A post that is not a draft needs sfvb_publish.
556
+ # @param storefront_oid [Integer]
557
+ # @param blog_post_oid [Integer]
558
+ # @param [Hash] opts the optional parameters
559
+ # @return [nil]
560
+ def delete_sfvb_blog_post(storefront_oid, blog_post_oid, opts = {})
561
+ delete_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, opts)
562
+ nil
563
+ end
564
+
565
+ # Delete a blog post
566
+ # Takes the post off every page and deletes it. There is no undo. A post that is not a draft needs sfvb_publish.
567
+ # @param storefront_oid [Integer]
568
+ # @param blog_post_oid [Integer]
569
+ # @param [Hash] opts the optional parameters
570
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
571
+ def delete_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, opts = {})
572
+ if @api_client.config.debugging
573
+ @api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_blog_post ...'
574
+ end
575
+ # verify the required parameter 'storefront_oid' is set
576
+ if @api_client.config.client_side_validation && storefront_oid.nil?
577
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_blog_post"
578
+ end
579
+ # verify the required parameter 'blog_post_oid' is set
580
+ if @api_client.config.client_side_validation && blog_post_oid.nil?
581
+ fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.delete_sfvb_blog_post"
582
+ end
583
+ # resource path
584
+ 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))
585
+
586
+ # query parameters
587
+ query_params = opts[:query_params] || {}
588
+
589
+ # header parameters
590
+ header_params = opts[:header_params] || {}
591
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
592
+ # HTTP header 'Accept' (if needed)
593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body]
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type]
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"SfvbApi.delete_sfvb_blog_post",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_blog_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
473
624
  # Delete a storefront file
474
625
  # Recoverable from the recycle bin.
475
626
  # @param storefront_oid [Integer]
@@ -844,6 +995,87 @@ module UltracartClient
844
995
  return data, status_code, headers
845
996
  end
846
997
 
998
+ # Detach an image from a blog post
999
+ # Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
1000
+ # @param storefront_oid [Integer]
1001
+ # @param blog_post_oid [Integer]
1002
+ # @param blog_post_image_request [SfvbBlogPostImageRequest] Image to detach
1003
+ # @param [Hash] opts the optional parameters
1004
+ # @return [SfvbBlogPostDetail]
1005
+ def detach_sfvb_blog_post_image(storefront_oid, blog_post_oid, blog_post_image_request, opts = {})
1006
+ data, _status_code, _headers = detach_sfvb_blog_post_image_with_http_info(storefront_oid, blog_post_oid, blog_post_image_request, opts)
1007
+ data
1008
+ end
1009
+
1010
+ # Detach an image from a blog post
1011
+ # Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
1012
+ # @param storefront_oid [Integer]
1013
+ # @param blog_post_oid [Integer]
1014
+ # @param blog_post_image_request [SfvbBlogPostImageRequest] Image to detach
1015
+ # @param [Hash] opts the optional parameters
1016
+ # @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
1017
+ def detach_sfvb_blog_post_image_with_http_info(storefront_oid, blog_post_oid, blog_post_image_request, opts = {})
1018
+ if @api_client.config.debugging
1019
+ @api_client.config.logger.debug 'Calling API: SfvbApi.detach_sfvb_blog_post_image ...'
1020
+ end
1021
+ # verify the required parameter 'storefront_oid' is set
1022
+ if @api_client.config.client_side_validation && storefront_oid.nil?
1023
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.detach_sfvb_blog_post_image"
1024
+ end
1025
+ # verify the required parameter 'blog_post_oid' is set
1026
+ if @api_client.config.client_side_validation && blog_post_oid.nil?
1027
+ fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.detach_sfvb_blog_post_image"
1028
+ end
1029
+ # verify the required parameter 'blog_post_image_request' is set
1030
+ if @api_client.config.client_side_validation && blog_post_image_request.nil?
1031
+ fail ArgumentError, "Missing the required parameter 'blog_post_image_request' when calling SfvbApi.detach_sfvb_blog_post_image"
1032
+ end
1033
+ # resource path
1034
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/blog_posts/{blog_post_oid}/images/detach'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'blog_post_oid' + '}', CGI.escape(blog_post_oid.to_s))
1035
+
1036
+ # query parameters
1037
+ query_params = opts[:query_params] || {}
1038
+
1039
+ # header parameters
1040
+ header_params = opts[:header_params] || {}
1041
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1042
+ # HTTP header 'Accept' (if needed)
1043
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1044
+ # HTTP header 'Content-Type'
1045
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1046
+ if !content_type.nil?
1047
+ header_params['Content-Type'] = content_type
1048
+ end
1049
+
1050
+ # form parameters
1051
+ form_params = opts[:form_params] || {}
1052
+
1053
+ # http body (model)
1054
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_post_image_request)
1055
+
1056
+ # return_type
1057
+ return_type = opts[:debug_return_type] || 'SfvbBlogPostDetail'
1058
+
1059
+ # auth_names
1060
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1061
+
1062
+ new_options = opts.merge(
1063
+ :operation => :"SfvbApi.detach_sfvb_blog_post_image",
1064
+ :header_params => header_params,
1065
+ :query_params => query_params,
1066
+ :form_params => form_params,
1067
+ :body => post_body,
1068
+ :auth_names => auth_names,
1069
+ :return_type => return_type
1070
+ )
1071
+
1072
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1073
+ if @api_client.config.debugging
1074
+ @api_client.config.logger.debug "API called: SfvbApi#detach_sfvb_blog_post_image\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1075
+ end
1076
+ return data, status_code, headers
1077
+ end
1078
+
847
1079
  # Disable an upsell offer
848
1080
  # Switches the offer off. Disabling one that is switched on is a live change and needs sfvb_publish. An offer that is already off is returned unchanged. There is no delete.
849
1081
  # @param storefront_oid [Integer]
@@ -1431,6 +1663,76 @@ module UltracartClient
1431
1663
  return data, status_code, headers
1432
1664
  end
1433
1665
 
1666
+ # Read a blog post
1667
+ # 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.
1668
+ # @param storefront_oid [Integer]
1669
+ # @param blog_post_oid [Integer]
1670
+ # @param [Hash] opts the optional parameters
1671
+ # @return [SfvbBlogPostDetail]
1672
+ def get_sfvb_blog_post(storefront_oid, blog_post_oid, opts = {})
1673
+ data, _status_code, _headers = get_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, opts)
1674
+ data
1675
+ end
1676
+
1677
+ # Read a blog post
1678
+ # The whole post - body, excerpt, tags, images and where it is shown. An image&#39;s url is the address to use for it in the body.
1679
+ # @param storefront_oid [Integer]
1680
+ # @param blog_post_oid [Integer]
1681
+ # @param [Hash] opts the optional parameters
1682
+ # @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
1683
+ def get_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, opts = {})
1684
+ if @api_client.config.debugging
1685
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_blog_post ...'
1686
+ end
1687
+ # verify the required parameter 'storefront_oid' is set
1688
+ if @api_client.config.client_side_validation && storefront_oid.nil?
1689
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_blog_post"
1690
+ end
1691
+ # verify the required parameter 'blog_post_oid' is set
1692
+ if @api_client.config.client_side_validation && blog_post_oid.nil?
1693
+ fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.get_sfvb_blog_post"
1694
+ end
1695
+ # resource path
1696
+ 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))
1697
+
1698
+ # query parameters
1699
+ query_params = opts[:query_params] || {}
1700
+
1701
+ # header parameters
1702
+ header_params = opts[:header_params] || {}
1703
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1704
+ # HTTP header 'Accept' (if needed)
1705
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1706
+
1707
+ # form parameters
1708
+ form_params = opts[:form_params] || {}
1709
+
1710
+ # http body (model)
1711
+ post_body = opts[:debug_body]
1712
+
1713
+ # return_type
1714
+ return_type = opts[:debug_return_type] || 'SfvbBlogPostDetail'
1715
+
1716
+ # auth_names
1717
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1718
+
1719
+ new_options = opts.merge(
1720
+ :operation => :"SfvbApi.get_sfvb_blog_post",
1721
+ :header_params => header_params,
1722
+ :query_params => query_params,
1723
+ :form_params => form_params,
1724
+ :body => post_body,
1725
+ :auth_names => auth_names,
1726
+ :return_type => return_type
1727
+ )
1728
+
1729
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1730
+ if @api_client.config.debugging
1731
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_blog_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1732
+ end
1733
+ return data, status_code, headers
1734
+ end
1735
+
1434
1736
  # Element types used by a container
1435
1737
  # @param compile_request [SfvbCompileRequest] CJSON to inspect
1436
1738
  # @param [Hash] opts the optional parameters
@@ -2628,6 +2930,79 @@ module UltracartClient
2628
2930
  return data, status_code, headers
2629
2931
  end
2630
2932
 
2933
+ # Get one storefront render log
2934
+ # One render's server log with its lines, each with a level, a category such as VELOCITY or FLOW, and the message. log_id comes from the list, or from the X-UltraCart-Storefront-Log-Id header a page sends inside an SFVB preview session. min_level is debug, info, warn or error, default debug.
2935
+ # @param storefront_oid [Integer]
2936
+ # @param log_id [String]
2937
+ # @param [Hash] opts the optional parameters
2938
+ # @option opts [String] :min_level
2939
+ # @return [SfvbServerLogDetail]
2940
+ def get_sfvb_server_log(storefront_oid, log_id, opts = {})
2941
+ data, _status_code, _headers = get_sfvb_server_log_with_http_info(storefront_oid, log_id, opts)
2942
+ data
2943
+ end
2944
+
2945
+ # Get one storefront render log
2946
+ # One render&#39;s server log with its lines, each with a level, a category such as VELOCITY or FLOW, and the message. log_id comes from the list, or from the X-UltraCart-Storefront-Log-Id header a page sends inside an SFVB preview session. min_level is debug, info, warn or error, default debug.
2947
+ # @param storefront_oid [Integer]
2948
+ # @param log_id [String]
2949
+ # @param [Hash] opts the optional parameters
2950
+ # @option opts [String] :min_level
2951
+ # @return [Array<(SfvbServerLogDetail, Integer, Hash)>] SfvbServerLogDetail data, response status code and response headers
2952
+ def get_sfvb_server_log_with_http_info(storefront_oid, log_id, opts = {})
2953
+ if @api_client.config.debugging
2954
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_server_log ...'
2955
+ end
2956
+ # verify the required parameter 'storefront_oid' is set
2957
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2958
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_server_log"
2959
+ end
2960
+ # verify the required parameter 'log_id' is set
2961
+ if @api_client.config.client_side_validation && log_id.nil?
2962
+ fail ArgumentError, "Missing the required parameter 'log_id' when calling SfvbApi.get_sfvb_server_log"
2963
+ end
2964
+ # resource path
2965
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/logs/{log_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'log_id' + '}', CGI.escape(log_id.to_s))
2966
+
2967
+ # query parameters
2968
+ query_params = opts[:query_params] || {}
2969
+ query_params[:'min_level'] = opts[:'min_level'] if !opts[:'min_level'].nil?
2970
+
2971
+ # header parameters
2972
+ header_params = opts[:header_params] || {}
2973
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2974
+ # HTTP header 'Accept' (if needed)
2975
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2976
+
2977
+ # form parameters
2978
+ form_params = opts[:form_params] || {}
2979
+
2980
+ # http body (model)
2981
+ post_body = opts[:debug_body]
2982
+
2983
+ # return_type
2984
+ return_type = opts[:debug_return_type] || 'SfvbServerLogDetail'
2985
+
2986
+ # auth_names
2987
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2988
+
2989
+ new_options = opts.merge(
2990
+ :operation => :"SfvbApi.get_sfvb_server_log",
2991
+ :header_params => header_params,
2992
+ :query_params => query_params,
2993
+ :form_params => form_params,
2994
+ :body => post_body,
2995
+ :auth_names => auth_names,
2996
+ :return_type => return_type
2997
+ )
2998
+
2999
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3000
+ if @api_client.config.debugging
3001
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_server_log\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3002
+ end
3003
+ return data, status_code, headers
3004
+ end
3005
+
2631
3006
  # Read a storefront's site attributes
2632
3007
  # The values the siteattribute element and $site.attr render. These are not in any file or theme. Attributes a template declares but nothing has set are included with the template's default, so the response describes what the templates can render rather than only what has been saved. Credentials stored as site attributes are never included.
2633
3008
  # @param storefront_oid [Integer]
@@ -3180,6 +3555,81 @@ module UltracartClient
3180
3555
  return data, status_code, headers
3181
3556
  end
3182
3557
 
3558
+ # Create a blog post
3559
+ # title and url_part are required. The post is a draft unless visibility says otherwise, and anything but a draft needs sfvb_publish. The body and excerpt are refused with sfvb.unsafe_html if they could run script, and a url_part another post uses is refused with a 409 and sfvb.blog_post_exists. Assign the post to a page with pages/blog_posts/add, or let the page's selectors choose it.
3560
+ # @param storefront_oid [Integer]
3561
+ # @param blog_post_request [SfvbBlogPostRequest] The blog post to create
3562
+ # @param [Hash] opts the optional parameters
3563
+ # @return [SfvbBlogPostDetail]
3564
+ def insert_sfvb_blog_post(storefront_oid, blog_post_request, opts = {})
3565
+ data, _status_code, _headers = insert_sfvb_blog_post_with_http_info(storefront_oid, blog_post_request, opts)
3566
+ data
3567
+ end
3568
+
3569
+ # Create a blog post
3570
+ # title and url_part are required. The post is a draft unless visibility says otherwise, and anything but a draft needs sfvb_publish. The body and excerpt are refused with sfvb.unsafe_html if they could run script, and a url_part another post uses is refused with a 409 and sfvb.blog_post_exists. Assign the post to a page with pages/blog_posts/add, or let the page&#39;s selectors choose it.
3571
+ # @param storefront_oid [Integer]
3572
+ # @param blog_post_request [SfvbBlogPostRequest] The blog post to create
3573
+ # @param [Hash] opts the optional parameters
3574
+ # @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
3575
+ def insert_sfvb_blog_post_with_http_info(storefront_oid, blog_post_request, opts = {})
3576
+ if @api_client.config.debugging
3577
+ @api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_blog_post ...'
3578
+ end
3579
+ # verify the required parameter 'storefront_oid' is set
3580
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3581
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.insert_sfvb_blog_post"
3582
+ end
3583
+ # verify the required parameter 'blog_post_request' is set
3584
+ if @api_client.config.client_side_validation && blog_post_request.nil?
3585
+ fail ArgumentError, "Missing the required parameter 'blog_post_request' when calling SfvbApi.insert_sfvb_blog_post"
3586
+ end
3587
+ # resource path
3588
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/blog_posts'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3589
+
3590
+ # query parameters
3591
+ query_params = opts[:query_params] || {}
3592
+
3593
+ # header parameters
3594
+ header_params = opts[:header_params] || {}
3595
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3596
+ # HTTP header 'Accept' (if needed)
3597
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3598
+ # HTTP header 'Content-Type'
3599
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
3600
+ if !content_type.nil?
3601
+ header_params['Content-Type'] = content_type
3602
+ end
3603
+
3604
+ # form parameters
3605
+ form_params = opts[:form_params] || {}
3606
+
3607
+ # http body (model)
3608
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_post_request)
3609
+
3610
+ # return_type
3611
+ return_type = opts[:debug_return_type] || 'SfvbBlogPostDetail'
3612
+
3613
+ # auth_names
3614
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3615
+
3616
+ new_options = opts.merge(
3617
+ :operation => :"SfvbApi.insert_sfvb_blog_post",
3618
+ :header_params => header_params,
3619
+ :query_params => query_params,
3620
+ :form_params => form_params,
3621
+ :body => post_body,
3622
+ :auth_names => auth_names,
3623
+ :return_type => return_type
3624
+ )
3625
+
3626
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3627
+ if @api_client.config.debugging
3628
+ @api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_blog_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3629
+ end
3630
+ return data, status_code, headers
3631
+ end
3632
+
3183
3633
  # Create a page
3184
3634
  # Creates the page and its folder, the way the store admin's add page does. The parent page must already exist, and the last part of the path may only contain letters, digits, hyphens and underscores - it is refused, not cleaned. A path that already has a page is refused with a 409 and the code sfvb.page_exists. Without a group_template the page inherits its parent's templates, or catalog_group.vm directly under the root. Set attributes and images afterwards with the page attribute and image endpoints, and push the body to the page folder. Always needs sfvb_publish, because the page is live as soon as it exists. Deleting, moving and renaming pages stay in the store admin.
3185
3635
  # @param storefront_oid [Integer]
@@ -4041,6 +4491,82 @@ module UltracartClient
4041
4491
  return data, status_code, headers
4042
4492
  end
4043
4493
 
4494
+ # List recent storefront render logs
4495
+ # 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.
4496
+ # @param storefront_oid [Integer]
4497
+ # @param [Hash] opts the optional parameters
4498
+ # @option opts [String] :uri
4499
+ # @option opts [String] :since
4500
+ # @option opts [Boolean] :errors_only
4501
+ # @option opts [Integer] :limit
4502
+ # @return [SfvbServerLogsResponse]
4503
+ def list_sfvb_server_logs(storefront_oid, opts = {})
4504
+ data, _status_code, _headers = list_sfvb_server_logs_with_http_info(storefront_oid, opts)
4505
+ data
4506
+ end
4507
+
4508
+ # List recent storefront render logs
4509
+ # 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.
4510
+ # @param storefront_oid [Integer]
4511
+ # @param [Hash] opts the optional parameters
4512
+ # @option opts [String] :uri
4513
+ # @option opts [String] :since
4514
+ # @option opts [Boolean] :errors_only
4515
+ # @option opts [Integer] :limit
4516
+ # @return [Array<(SfvbServerLogsResponse, Integer, Hash)>] SfvbServerLogsResponse data, response status code and response headers
4517
+ def list_sfvb_server_logs_with_http_info(storefront_oid, opts = {})
4518
+ if @api_client.config.debugging
4519
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_server_logs ...'
4520
+ end
4521
+ # verify the required parameter 'storefront_oid' is set
4522
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4523
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_server_logs"
4524
+ end
4525
+ # resource path
4526
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/logs'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4527
+
4528
+ # query parameters
4529
+ query_params = opts[:query_params] || {}
4530
+ query_params[:'uri'] = opts[:'uri'] if !opts[:'uri'].nil?
4531
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
4532
+ query_params[:'errors_only'] = opts[:'errors_only'] if !opts[:'errors_only'].nil?
4533
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
4534
+
4535
+ # header parameters
4536
+ header_params = opts[:header_params] || {}
4537
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4538
+ # HTTP header 'Accept' (if needed)
4539
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4540
+
4541
+ # form parameters
4542
+ form_params = opts[:form_params] || {}
4543
+
4544
+ # http body (model)
4545
+ post_body = opts[:debug_body]
4546
+
4547
+ # return_type
4548
+ return_type = opts[:debug_return_type] || 'SfvbServerLogsResponse'
4549
+
4550
+ # auth_names
4551
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4552
+
4553
+ new_options = opts.merge(
4554
+ :operation => :"SfvbApi.list_sfvb_server_logs",
4555
+ :header_params => header_params,
4556
+ :query_params => query_params,
4557
+ :form_params => form_params,
4558
+ :body => post_body,
4559
+ :auth_names => auth_names,
4560
+ :return_type => return_type
4561
+ )
4562
+
4563
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4564
+ if @api_client.config.debugging
4565
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_server_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4566
+ end
4567
+ return data, status_code, headers
4568
+ end
4569
+
4044
4570
  # List storefronts
4045
4571
  # @param [Hash] opts the optional parameters
4046
4572
  # @return [SfvbStorefrontsResponse]
@@ -6657,6 +7183,87 @@ module UltracartClient
6657
7183
  return data, status_code, headers
6658
7184
  end
6659
7185
 
7186
+ # Change a blog post
7187
+ # 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.
7188
+ # @param storefront_oid [Integer]
7189
+ # @param blog_post_oid [Integer]
7190
+ # @param blog_post_request [SfvbBlogPostRequest] The fields to change
7191
+ # @param [Hash] opts the optional parameters
7192
+ # @return [SfvbBlogPostDetail]
7193
+ def update_sfvb_blog_post(storefront_oid, blog_post_oid, blog_post_request, opts = {})
7194
+ data, _status_code, _headers = update_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, blog_post_request, opts)
7195
+ data
7196
+ end
7197
+
7198
+ # Change a blog post
7199
+ # Only the fields sent change; tags, when sent, replaces every tag. The post&#39;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.
7200
+ # @param storefront_oid [Integer]
7201
+ # @param blog_post_oid [Integer]
7202
+ # @param blog_post_request [SfvbBlogPostRequest] The fields to change
7203
+ # @param [Hash] opts the optional parameters
7204
+ # @return [Array<(SfvbBlogPostDetail, Integer, Hash)>] SfvbBlogPostDetail data, response status code and response headers
7205
+ def update_sfvb_blog_post_with_http_info(storefront_oid, blog_post_oid, blog_post_request, opts = {})
7206
+ if @api_client.config.debugging
7207
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_blog_post ...'
7208
+ end
7209
+ # verify the required parameter 'storefront_oid' is set
7210
+ if @api_client.config.client_side_validation && storefront_oid.nil?
7211
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_blog_post"
7212
+ end
7213
+ # verify the required parameter 'blog_post_oid' is set
7214
+ if @api_client.config.client_side_validation && blog_post_oid.nil?
7215
+ fail ArgumentError, "Missing the required parameter 'blog_post_oid' when calling SfvbApi.update_sfvb_blog_post"
7216
+ end
7217
+ # verify the required parameter 'blog_post_request' is set
7218
+ if @api_client.config.client_side_validation && blog_post_request.nil?
7219
+ fail ArgumentError, "Missing the required parameter 'blog_post_request' when calling SfvbApi.update_sfvb_blog_post"
7220
+ end
7221
+ # resource path
7222
+ 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))
7223
+
7224
+ # query parameters
7225
+ query_params = opts[:query_params] || {}
7226
+
7227
+ # header parameters
7228
+ header_params = opts[:header_params] || {}
7229
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
7230
+ # HTTP header 'Accept' (if needed)
7231
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
7232
+ # HTTP header 'Content-Type'
7233
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
7234
+ if !content_type.nil?
7235
+ header_params['Content-Type'] = content_type
7236
+ end
7237
+
7238
+ # form parameters
7239
+ form_params = opts[:form_params] || {}
7240
+
7241
+ # http body (model)
7242
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(blog_post_request)
7243
+
7244
+ # return_type
7245
+ return_type = opts[:debug_return_type] || 'SfvbBlogPostDetail'
7246
+
7247
+ # auth_names
7248
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
7249
+
7250
+ new_options = opts.merge(
7251
+ :operation => :"SfvbApi.update_sfvb_blog_post",
7252
+ :header_params => header_params,
7253
+ :query_params => query_params,
7254
+ :form_params => form_params,
7255
+ :body => post_body,
7256
+ :auth_names => auth_names,
7257
+ :return_type => return_type
7258
+ )
7259
+
7260
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
7261
+ if @api_client.config.debugging
7262
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_blog_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7263
+ end
7264
+ return data, status_code, headers
7265
+ end
7266
+
6660
7267
  # Update an upsell offer
6661
7268
  # 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.
6662
7269
  # @param storefront_oid [Integer]