ultracart_api 4.1.252 → 4.1.254

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -2
  3. data/docs/SfvbApi.md +238 -12
  4. data/docs/SfvbApprovalParams.md +6 -0
  5. data/docs/SfvbFileContentResult.md +22 -0
  6. data/docs/SfvbFilesContentRequest.md +18 -0
  7. data/docs/SfvbFilesContentResponse.md +20 -0
  8. data/docs/SfvbMenusResponse.md +1 -1
  9. data/docs/SfvbPageListResponse.md +5 -1
  10. data/docs/SfvbPageMoveRequest.md +26 -0
  11. data/docs/SfvbPageMoveResponse.md +32 -0
  12. data/docs/SfvbPageResponse.md +6 -0
  13. data/docs/SfvbPageSettingsRequest.md +6 -0
  14. data/docs/SfvbPageSummary.md +4 -0
  15. data/docs/SfvbSearchFacet.md +26 -0
  16. data/docs/SfvbSearchFacetUpdate.md +24 -0
  17. data/docs/SfvbSearchFacetsRequest.md +22 -0
  18. data/docs/SfvbSearchFacetsResponse.md +30 -0
  19. data/lib/ultracart_api/api/sfvb_api.rb +326 -20
  20. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +2 -2
  21. data/lib/ultracart_api/models/sfvb_approval_params.rb +31 -1
  22. data/lib/ultracart_api/models/sfvb_file_content_result.rb +238 -0
  23. data/lib/ultracart_api/models/sfvb_files_content_request.rb +222 -0
  24. data/lib/ultracart_api/models/sfvb_files_content_response.rb +234 -0
  25. data/lib/ultracart_api/models/sfvb_menus_response.rb +1 -1
  26. data/lib/ultracart_api/models/sfvb_page_list_response.rb +24 -4
  27. data/lib/ultracart_api/models/sfvb_page_move_request.rb +294 -0
  28. data/lib/ultracart_api/models/sfvb_page_move_response.rb +290 -0
  29. data/lib/ultracart_api/models/sfvb_page_response.rb +32 -1
  30. data/lib/ultracart_api/models/sfvb_page_settings_request.rb +65 -1
  31. data/lib/ultracart_api/models/sfvb_page_summary.rb +20 -1
  32. data/lib/ultracart_api/models/sfvb_search_facet.rb +260 -0
  33. data/lib/ultracart_api/models/sfvb_search_facet_update.rb +250 -0
  34. data/lib/ultracart_api/models/sfvb_search_facets_request.rb +244 -0
  35. data/lib/ultracart_api/models/sfvb_search_facets_response.rb +286 -0
  36. data/lib/ultracart_api/version.rb +1 -1
  37. data/lib/ultracart_api.rb +9 -0
  38. metadata +20 -2
@@ -7466,6 +7466,81 @@ module UltracartClient
7466
7466
  return data, status_code, headers
7467
7467
  end
7468
7468
 
7469
+ # Read several storefront files
7470
+ # The current content of up to 50 files in one call, each answered exactly as the single file read answers it. A file that can't be read carries its own error and the others are still read. When the response reaches its size limit, the paths not yet read come back in remaining_paths; send them again. Only reads - a POST because the list of paths can be long.
7471
+ # @param storefront_oid [Integer]
7472
+ # @param files_request [SfvbFilesContentRequest] The files to read
7473
+ # @param [Hash] opts the optional parameters
7474
+ # @return [SfvbFilesContentResponse]
7475
+ def get_sfvb_file_contents(storefront_oid, files_request, opts = {})
7476
+ data, _status_code, _headers = get_sfvb_file_contents_with_http_info(storefront_oid, files_request, opts)
7477
+ data
7478
+ end
7479
+
7480
+ # Read several storefront files
7481
+ # The current content of up to 50 files in one call, each answered exactly as the single file read answers it. A file that can't be read carries its own error and the others are still read. When the response reaches its size limit, the paths not yet read come back in remaining_paths; send them again. Only reads - a POST because the list of paths can be long.
7482
+ # @param storefront_oid [Integer]
7483
+ # @param files_request [SfvbFilesContentRequest] The files to read
7484
+ # @param [Hash] opts the optional parameters
7485
+ # @return [Array<(SfvbFilesContentResponse, Integer, Hash)>] SfvbFilesContentResponse data, response status code and response headers
7486
+ def get_sfvb_file_contents_with_http_info(storefront_oid, files_request, opts = {})
7487
+ if @api_client.config.debugging
7488
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_file_contents ...'
7489
+ end
7490
+ # verify the required parameter 'storefront_oid' is set
7491
+ if @api_client.config.client_side_validation && storefront_oid.nil?
7492
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_file_contents"
7493
+ end
7494
+ # verify the required parameter 'files_request' is set
7495
+ if @api_client.config.client_side_validation && files_request.nil?
7496
+ fail ArgumentError, "Missing the required parameter 'files_request' when calling SfvbApi.get_sfvb_file_contents"
7497
+ end
7498
+ # resource path
7499
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/files/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
7500
+
7501
+ # query parameters
7502
+ query_params = opts[:query_params] || {}
7503
+
7504
+ # header parameters
7505
+ header_params = opts[:header_params] || {}
7506
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
7507
+ # HTTP header 'Accept' (if needed)
7508
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
7509
+ # HTTP header 'Content-Type'
7510
+ content_type = @api_client.select_header_content_type(['application/json'])
7511
+ if !content_type.nil?
7512
+ header_params['Content-Type'] = content_type
7513
+ end
7514
+
7515
+ # form parameters
7516
+ form_params = opts[:form_params] || {}
7517
+
7518
+ # http body (model)
7519
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(files_request)
7520
+
7521
+ # return_type
7522
+ return_type = opts[:debug_return_type] || 'SfvbFilesContentResponse'
7523
+
7524
+ # auth_names
7525
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
7526
+
7527
+ new_options = opts.merge(
7528
+ :operation => :"SfvbApi.get_sfvb_file_contents",
7529
+ :header_params => header_params,
7530
+ :query_params => query_params,
7531
+ :form_params => form_params,
7532
+ :body => post_body,
7533
+ :auth_names => auth_names,
7534
+ :return_type => return_type
7535
+ )
7536
+
7537
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
7538
+ if @api_client.config.debugging
7539
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_file_contents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7540
+ end
7541
+ return data, status_code, headers
7542
+ end
7543
+
7469
7544
  # Get a URL to upload a binary asset to
7470
7545
  # Binary content does not travel through this API as JSON, so uploading an image, font, video or PDF is two steps. Ask here for a URL, PUT the raw bytes straight to it, then call uploadSfvbFile quoting the key you were given. The bytes never pass through the API server. The extension is checked against the accepted type list before a URL is issued, so an unsupported type fails here rather than after you have sent the file. The URL is short lived and the key is bound to your account.
7471
7546
  # @param storefront_oid [Integer]
@@ -8785,9 +8860,10 @@ module UltracartClient
8785
8860
  end
8786
8861
 
8787
8862
  # List a storefront's store menus
8788
- # The menus a menu element's menuName can name, sorted by code and without their entries. A code the active theme's templates ask for but nothing has created is included with unconfigured true - that code renders an empty list today, and writing it creates it. A menu no template names is marked undeclared, which usually means a menuName is misspelled.
8863
+ # The menus a menu element's menuName can name, sorted by code. Without include_entries each menu is listed without its entries; with include_entries=true each carries the tree the single-menu read returns, so one call reads every menu. A code the active theme's templates ask for but nothing has created is included with unconfigured true - that code renders an empty list today, and writing it creates it. A menu no template names is marked undeclared, which usually means a menuName is misspelled.
8789
8864
  # @param storefront_oid [Integer]
8790
8865
  # @param [Hash] opts the optional parameters
8866
+ # @option opts [Boolean] :include_entries True to include each menu&#39;s entries
8791
8867
  # @return [SfvbMenusResponse]
8792
8868
  def get_sfvb_menus(storefront_oid, opts = {})
8793
8869
  data, _status_code, _headers = get_sfvb_menus_with_http_info(storefront_oid, opts)
@@ -8795,9 +8871,10 @@ module UltracartClient
8795
8871
  end
8796
8872
 
8797
8873
  # List a storefront&#39;s store menus
8798
- # The menus a menu element&#39;s menuName can name, sorted by code and without their entries. A code the active theme&#39;s templates ask for but nothing has created is included with unconfigured true - that code renders an empty list today, and writing it creates it. A menu no template names is marked undeclared, which usually means a menuName is misspelled.
8874
+ # The menus a menu element&#39;s menuName can name, sorted by code. Without include_entries each menu is listed without its entries; with include_entries&#x3D;true each carries the tree the single-menu read returns, so one call reads every menu. A code the active theme&#39;s templates ask for but nothing has created is included with unconfigured true - that code renders an empty list today, and writing it creates it. A menu no template names is marked undeclared, which usually means a menuName is misspelled.
8799
8875
  # @param storefront_oid [Integer]
8800
8876
  # @param [Hash] opts the optional parameters
8877
+ # @option opts [Boolean] :include_entries True to include each menu&#39;s entries
8801
8878
  # @return [Array<(SfvbMenusResponse, Integer, Hash)>] SfvbMenusResponse data, response status code and response headers
8802
8879
  def get_sfvb_menus_with_http_info(storefront_oid, opts = {})
8803
8880
  if @api_client.config.debugging
@@ -8812,6 +8889,7 @@ module UltracartClient
8812
8889
 
8813
8890
  # query parameters
8814
8891
  query_params = opts[:query_params] || {}
8892
+ query_params[:'include_entries'] = opts[:'include_entries'] if !opts[:'include_entries'].nil?
8815
8893
 
8816
8894
  # header parameters
8817
8895
  header_params = opts[:header_params] || {}
@@ -9135,23 +9213,25 @@ module UltracartClient
9135
9213
  end
9136
9214
 
9137
9215
  # Read a page's attributes and images
9138
- # What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
9216
+ # What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved. Name the page by path or by catalog_group_oid, not both. The oid is the id the page list and menu reads return, and it stays the same when the page moves.
9139
9217
  # @param storefront_oid [Integer]
9140
- # @param path [String] Page path, for example /catalog/dispensers/
9141
9218
  # @param [Hash] opts the optional parameters
9219
+ # @option opts [String] :path Page path, for example /catalog/dispensers/. Required unless catalog_group_oid is given.
9220
+ # @option opts [Integer] :catalog_group_oid The page&#39;s id, in place of path
9142
9221
  # @return [SfvbPageResponse]
9143
- def get_sfvb_page(storefront_oid, path, opts = {})
9144
- data, _status_code, _headers = get_sfvb_page_with_http_info(storefront_oid, path, opts)
9222
+ def get_sfvb_page(storefront_oid, opts = {})
9223
+ data, _status_code, _headers = get_sfvb_page_with_http_info(storefront_oid, opts)
9145
9224
  data
9146
9225
  end
9147
9226
 
9148
9227
  # Read a page&#39;s attributes and images
9149
- # What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved.
9228
+ # What the pageattribute and pageimage elements render for this page. These are not in any file, which is why a page folder can be empty and its elements still render something. Attributes and image codes a template declares but nothing has set are included, so the response describes what the page can show rather than only what has been saved. Name the page by path or by catalog_group_oid, not both. The oid is the id the page list and menu reads return, and it stays the same when the page moves.
9150
9229
  # @param storefront_oid [Integer]
9151
- # @param path [String] Page path, for example /catalog/dispensers/
9152
9230
  # @param [Hash] opts the optional parameters
9231
+ # @option opts [String] :path Page path, for example /catalog/dispensers/. Required unless catalog_group_oid is given.
9232
+ # @option opts [Integer] :catalog_group_oid The page&#39;s id, in place of path
9153
9233
  # @return [Array<(SfvbPageResponse, Integer, Hash)>] SfvbPageResponse data, response status code and response headers
9154
- def get_sfvb_page_with_http_info(storefront_oid, path, opts = {})
9234
+ def get_sfvb_page_with_http_info(storefront_oid, opts = {})
9155
9235
  if @api_client.config.debugging
9156
9236
  @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_page ...'
9157
9237
  end
@@ -9159,16 +9239,13 @@ module UltracartClient
9159
9239
  if @api_client.config.client_side_validation && storefront_oid.nil?
9160
9240
  fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_page"
9161
9241
  end
9162
- # verify the required parameter 'path' is set
9163
- if @api_client.config.client_side_validation && path.nil?
9164
- fail ArgumentError, "Missing the required parameter 'path' when calling SfvbApi.get_sfvb_page"
9165
- end
9166
9242
  # resource path
9167
9243
  local_var_path = '/sfvb/storefronts/{storefront_oid}/pages'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
9168
9244
 
9169
9245
  # query parameters
9170
9246
  query_params = opts[:query_params] || {}
9171
- query_params[:'path'] = path
9247
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
9248
+ query_params[:'catalog_group_oid'] = opts[:'catalog_group_oid'] if !opts[:'catalog_group_oid'].nil?
9172
9249
 
9173
9250
  # header parameters
9174
9251
  header_params = opts[:header_params] || {}
@@ -9923,6 +10000,70 @@ module UltracartClient
9923
10000
  return data, status_code, headers
9924
10001
  end
9925
10002
 
10003
+ # Read the storefront's faceted search configuration
10004
+ # Every facet the storefront can offer shoppers - the standard ones and one per item attribute on the storefront - with its heading and whether it is on, in the fixed order shoppers see them, and the Cost facet's price breaks. The same settings as the store admin's Faceted Search Results. Send hash_sha256 as If-Match to change them.
10005
+ # @param storefront_oid [Integer]
10006
+ # @param [Hash] opts the optional parameters
10007
+ # @return [SfvbSearchFacetsResponse]
10008
+ def get_sfvb_search_facets(storefront_oid, opts = {})
10009
+ data, _status_code, _headers = get_sfvb_search_facets_with_http_info(storefront_oid, opts)
10010
+ data
10011
+ end
10012
+
10013
+ # Read the storefront&#39;s faceted search configuration
10014
+ # Every facet the storefront can offer shoppers - the standard ones and one per item attribute on the storefront - with its heading and whether it is on, in the fixed order shoppers see them, and the Cost facet&#39;s price breaks. The same settings as the store admin&#39;s Faceted Search Results. Send hash_sha256 as If-Match to change them.
10015
+ # @param storefront_oid [Integer]
10016
+ # @param [Hash] opts the optional parameters
10017
+ # @return [Array<(SfvbSearchFacetsResponse, Integer, Hash)>] SfvbSearchFacetsResponse data, response status code and response headers
10018
+ def get_sfvb_search_facets_with_http_info(storefront_oid, opts = {})
10019
+ if @api_client.config.debugging
10020
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_search_facets ...'
10021
+ end
10022
+ # verify the required parameter 'storefront_oid' is set
10023
+ if @api_client.config.client_side_validation && storefront_oid.nil?
10024
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_search_facets"
10025
+ end
10026
+ # resource path
10027
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/search/facets'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
10028
+
10029
+ # query parameters
10030
+ query_params = opts[:query_params] || {}
10031
+
10032
+ # header parameters
10033
+ header_params = opts[:header_params] || {}
10034
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
10035
+ # HTTP header 'Accept' (if needed)
10036
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
10037
+
10038
+ # form parameters
10039
+ form_params = opts[:form_params] || {}
10040
+
10041
+ # http body (model)
10042
+ post_body = opts[:debug_body]
10043
+
10044
+ # return_type
10045
+ return_type = opts[:debug_return_type] || 'SfvbSearchFacetsResponse'
10046
+
10047
+ # auth_names
10048
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
10049
+
10050
+ new_options = opts.merge(
10051
+ :operation => :"SfvbApi.get_sfvb_search_facets",
10052
+ :header_params => header_params,
10053
+ :query_params => query_params,
10054
+ :form_params => form_params,
10055
+ :body => post_body,
10056
+ :auth_names => auth_names,
10057
+ :return_type => return_type
10058
+ )
10059
+
10060
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
10061
+ if @api_client.config.debugging
10062
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_search_facets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
10063
+ end
10064
+ return data, status_code, headers
10065
+ end
10066
+
9926
10067
  # List the secrets this server collects
9927
10068
  # The kinds of secret value, with what each looks like, and the secret fields (sinks) a handle can be written to. Request a handle for a sink with POST secrets.
9928
10069
  # @param [Hash] opts the optional parameters
@@ -14623,10 +14764,13 @@ module UltracartClient
14623
14764
  end
14624
14765
 
14625
14766
  # List the storefront's pages
14626
- # 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.
14767
+ # 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. Pass detail=true to get each page's single-page read in detail as well, at most 25 pages a call. Page through with offset and limit, following next_offset until it is omitted.
14627
14768
  # @param storefront_oid [Integer]
14628
14769
  # @param [Hash] opts the optional parameters
14629
14770
  # @option opts [String] :under Only this page and the pages below it, for example /lp/
14771
+ # @option opts [Boolean] :detail True to include each page&#39;s single-page read, a window at a time
14772
+ # @option opts [Integer] :offset Where the window starts, with detail&#x3D;true. Default 0.
14773
+ # @option opts [Integer] :limit Pages in the window, 1 to 25, with detail&#x3D;true. Default 25.
14630
14774
  # @return [SfvbPageListResponse]
14631
14775
  def list_sfvb_pages(storefront_oid, opts = {})
14632
14776
  data, _status_code, _headers = list_sfvb_pages_with_http_info(storefront_oid, opts)
@@ -14634,10 +14778,13 @@ module UltracartClient
14634
14778
  end
14635
14779
 
14636
14780
  # List the storefront&#39;s pages
14637
- # 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.
14781
+ # 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. Pass detail&#x3D;true to get each page&#39;s single-page read in detail as well, at most 25 pages a call. Page through with offset and limit, following next_offset until it is omitted.
14638
14782
  # @param storefront_oid [Integer]
14639
14783
  # @param [Hash] opts the optional parameters
14640
14784
  # @option opts [String] :under Only this page and the pages below it, for example /lp/
14785
+ # @option opts [Boolean] :detail True to include each page&#39;s single-page read, a window at a time
14786
+ # @option opts [Integer] :offset Where the window starts, with detail&#x3D;true. Default 0.
14787
+ # @option opts [Integer] :limit Pages in the window, 1 to 25, with detail&#x3D;true. Default 25.
14641
14788
  # @return [Array<(SfvbPageListResponse, Integer, Hash)>] SfvbPageListResponse data, response status code and response headers
14642
14789
  def list_sfvb_pages_with_http_info(storefront_oid, opts = {})
14643
14790
  if @api_client.config.debugging
@@ -14653,6 +14800,9 @@ module UltracartClient
14653
14800
  # query parameters
14654
14801
  query_params = opts[:query_params] || {}
14655
14802
  query_params[:'under'] = opts[:'under'] if !opts[:'under'].nil?
14803
+ query_params[:'detail'] = opts[:'detail'] if !opts[:'detail'].nil?
14804
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
14805
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
14656
14806
 
14657
14807
  # header parameters
14658
14808
  header_params = opts[:header_params] || {}
@@ -15119,6 +15269,84 @@ module UltracartClient
15119
15269
  return data, status_code, headers
15120
15270
  end
15121
15271
 
15272
+ # Move or rename a page
15273
+ # Moves a page to a new path - a new parent, a new last part, or both, so a rename is a move under the same parent. Its sub-pages, their items and the page folder with its body move with it. Refused for the root page, a path inside the page itself, a path where a page or folder already exists, a parent that does not exist, and a page whose folder holds a started experiment. With redirect_old_url 301 the same call adds one pattern redirect from the old path to the new one, so every old address, sub-pages and items included, keeps working; the redirect is checked before anything moves, and if it is refused after the move the move is undone, so the page moves with its redirect or not at all. dry_run runs every check and reports what would move. Needs sfvb_publish, plus the approval of the person who signed in the CLI, as an approved page.move request for exactly this path, new path and redirect in the Approval-Id header.
15274
+ # @param storefront_oid [Integer]
15275
+ # @param page_move_request [SfvbPageMoveRequest] The page and where it goes
15276
+ # @param [Hash] opts the optional parameters
15277
+ # @option opts [String] :approval_id The approval_id of an approved page.move request for exactly this path, new path and redirect. Required unless dry_run. See POST /sfvb/approvals.
15278
+ # @return [SfvbPageMoveResponse]
15279
+ def move_sfvb_page(storefront_oid, page_move_request, opts = {})
15280
+ data, _status_code, _headers = move_sfvb_page_with_http_info(storefront_oid, page_move_request, opts)
15281
+ data
15282
+ end
15283
+
15284
+ # Move or rename a page
15285
+ # Moves a page to a new path - a new parent, a new last part, or both, so a rename is a move under the same parent. Its sub-pages, their items and the page folder with its body move with it. Refused for the root page, a path inside the page itself, a path where a page or folder already exists, a parent that does not exist, and a page whose folder holds a started experiment. With redirect_old_url 301 the same call adds one pattern redirect from the old path to the new one, so every old address, sub-pages and items included, keeps working; the redirect is checked before anything moves, and if it is refused after the move the move is undone, so the page moves with its redirect or not at all. dry_run runs every check and reports what would move. Needs sfvb_publish, plus the approval of the person who signed in the CLI, as an approved page.move request for exactly this path, new path and redirect in the Approval-Id header.
15286
+ # @param storefront_oid [Integer]
15287
+ # @param page_move_request [SfvbPageMoveRequest] The page and where it goes
15288
+ # @param [Hash] opts the optional parameters
15289
+ # @option opts [String] :approval_id The approval_id of an approved page.move request for exactly this path, new path and redirect. Required unless dry_run. See POST /sfvb/approvals.
15290
+ # @return [Array<(SfvbPageMoveResponse, Integer, Hash)>] SfvbPageMoveResponse data, response status code and response headers
15291
+ def move_sfvb_page_with_http_info(storefront_oid, page_move_request, opts = {})
15292
+ if @api_client.config.debugging
15293
+ @api_client.config.logger.debug 'Calling API: SfvbApi.move_sfvb_page ...'
15294
+ end
15295
+ # verify the required parameter 'storefront_oid' is set
15296
+ if @api_client.config.client_side_validation && storefront_oid.nil?
15297
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.move_sfvb_page"
15298
+ end
15299
+ # verify the required parameter 'page_move_request' is set
15300
+ if @api_client.config.client_side_validation && page_move_request.nil?
15301
+ fail ArgumentError, "Missing the required parameter 'page_move_request' when calling SfvbApi.move_sfvb_page"
15302
+ end
15303
+ # resource path
15304
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/pages/move'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
15305
+
15306
+ # query parameters
15307
+ query_params = opts[:query_params] || {}
15308
+
15309
+ # header parameters
15310
+ header_params = opts[:header_params] || {}
15311
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
15312
+ # HTTP header 'Accept' (if needed)
15313
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
15314
+ # HTTP header 'Content-Type'
15315
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
15316
+ if !content_type.nil?
15317
+ header_params['Content-Type'] = content_type
15318
+ end
15319
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
15320
+
15321
+ # form parameters
15322
+ form_params = opts[:form_params] || {}
15323
+
15324
+ # http body (model)
15325
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(page_move_request)
15326
+
15327
+ # return_type
15328
+ return_type = opts[:debug_return_type] || 'SfvbPageMoveResponse'
15329
+
15330
+ # auth_names
15331
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
15332
+
15333
+ new_options = opts.merge(
15334
+ :operation => :"SfvbApi.move_sfvb_page",
15335
+ :header_params => header_params,
15336
+ :query_params => query_params,
15337
+ :form_params => form_params,
15338
+ :body => post_body,
15339
+ :auth_names => auth_names,
15340
+ :return_type => return_type
15341
+ )
15342
+
15343
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
15344
+ if @api_client.config.debugging
15345
+ @api_client.config.logger.debug "API called: SfvbApi#move_sfvb_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
15346
+ end
15347
+ return data, status_code, headers
15348
+ end
15349
+
15122
15350
  # Move one step
15123
15351
  # Moves the step, in one transaction, to right after after_step_uuid (the begin step puts it first in the sequence) or to the start of one side of a condition, split or inboxgeek step (branch_step_uuid with side). The step keeps its uuid, settings and the email or postcard it sends: nothing is archived or created. Refused for the begin, end, continue and merge markers, for a condition, split or inboxgeek step, while any customer is waiting on the step, and when the new place is the one it is in. Send the step's hash_sha256 as If-Match, and the hash_sha256 of after_step_uuid or branch_step_uuid as anchor_hash_sha256. A sequence whose campaign or flow is live needs sfvb_publish and an approved sequence_step.move approval (Approval-Id); a draft or inactive one needs neither.
15124
15352
  # @param storefront_oid [Integer]
@@ -17094,7 +17322,7 @@ module UltracartClient
17094
17322
  end
17095
17323
 
17096
17324
  # Change a page's settings
17097
- # A partial update. Only the fields you send change - title, description, templates, visibility, sitemap exclusion, sort orders, items per page and page type. Unlike the store admin's page save, the page's attributes, images, items, selectors and permissions are left exactly as they are. Fields that would move or rename the page, and fields this endpoint does not know, are refused. The root page cannot be hidden. Always needs sfvb_publish, because page settings are live.
17325
+ # A partial update. Only the fields you send change - title, description, templates, visibility, sitemap exclusion, sort orders, items per page and page type. Unlike the store admin's page save, the page's attributes, images, items, selectors and permissions are left exactly as they are. Fields that would move or rename the page, and fields this endpoint does not know, are refused. The root page cannot be hidden. Always needs sfvb_publish, because page settings are live. Hiding a page with redirect_old_url 301 and redirect_target also adds a 301 redirect from its address, checked first like any redirect rule. The page is hidden and the rule added together, or neither.
17098
17326
  # @param storefront_oid [Integer]
17099
17327
  # @param path [String] Page path, for example /lp/spring-sale/
17100
17328
  # @param page_settings_request [SfvbPageSettingsRequest] The settings to change
@@ -17106,7 +17334,7 @@ module UltracartClient
17106
17334
  end
17107
17335
 
17108
17336
  # Change a page&#39;s settings
17109
- # A partial update. Only the fields you send change - title, description, templates, visibility, sitemap exclusion, sort orders, items per page and page type. Unlike the store admin&#39;s page save, the page&#39;s attributes, images, items, selectors and permissions are left exactly as they are. Fields that would move or rename the page, and fields this endpoint does not know, are refused. The root page cannot be hidden. Always needs sfvb_publish, because page settings are live.
17337
+ # A partial update. Only the fields you send change - title, description, templates, visibility, sitemap exclusion, sort orders, items per page and page type. Unlike the store admin&#39;s page save, the page&#39;s attributes, images, items, selectors and permissions are left exactly as they are. Fields that would move or rename the page, and fields this endpoint does not know, are refused. The root page cannot be hidden. Always needs sfvb_publish, because page settings are live. Hiding a page with redirect_old_url 301 and redirect_target also adds a 301 redirect from its address, checked first like any redirect rule. The page is hidden and the rule added together, or neither.
17110
17338
  # @param storefront_oid [Integer]
17111
17339
  # @param path [String] Page path, for example /lp/spring-sale/
17112
17340
  # @param page_settings_request [SfvbPageSettingsRequest] The settings to change
@@ -18566,7 +18794,7 @@ module UltracartClient
18566
18794
  # @param storefront_oid [Integer]
18567
18795
  # @param owner_type [String]
18568
18796
  # @param owner_object_id [String]
18569
- # @param if_match [String] CJSON hash of the container being reverted. Required; 428 when absent, 412 when stale.
18797
+ # @param if_match [String] CJSON hash of the container being reverted. Required while the container holds content; 428 when absent, 412 when stale. Leave it out when the container has been removed, since there is nothing to match.
18570
18798
  # @param container_revert_request [SfvbContainerRevertRequest] Version to revert the container to
18571
18799
  # @param [Hash] opts the optional parameters
18572
18800
  # @option opts [String] :container_name
@@ -18581,7 +18809,7 @@ module UltracartClient
18581
18809
  # @param storefront_oid [Integer]
18582
18810
  # @param owner_type [String]
18583
18811
  # @param owner_object_id [String]
18584
- # @param if_match [String] CJSON hash of the container being reverted. Required; 428 when absent, 412 when stale.
18812
+ # @param if_match [String] CJSON hash of the container being reverted. Required while the container holds content; 428 when absent, 412 when stale. Leave it out when the container has been removed, since there is nothing to match.
18585
18813
  # @param container_revert_request [SfvbContainerRevertRequest] Version to revert the container to
18586
18814
  # @param [Hash] opts the optional parameters
18587
18815
  # @option opts [String] :container_name
@@ -21445,6 +21673,84 @@ module UltracartClient
21445
21673
  return data, status_code, headers
21446
21674
  end
21447
21675
 
21676
+ # Change the storefront's faceted search configuration
21677
+ # A partial update. Turn facets on or off, change their headings, and replace the Cost facet's price breaks; facets left out and every other search setting are unchanged. Facets cannot be reordered - the order is fixed. Turning facets on or off, or changing the price breaks, starts a search index rebuild, reported in rebuild. dry_run checks the change and reports it, and the rebuild it would start, without saving. Needs sfvb_publish, because facets show on every search and category page at once. Changes are limited to 30 an hour and 100 a day per storefront, and those that start a rebuild to 6 an hour and 20 a day (429, nothing saved).
21678
+ # @param storefront_oid [Integer]
21679
+ # @param search_facets_request [SfvbSearchFacetsRequest] The facets and price breaks to change
21680
+ # @param [Hash] opts the optional parameters
21681
+ # @option opts [String] :if_match hash_sha256 from the last read. Required unless dry_run; 428 when absent, 412 when stale.
21682
+ # @return [SfvbSearchFacetsResponse]
21683
+ def update_sfvb_search_facets(storefront_oid, search_facets_request, opts = {})
21684
+ data, _status_code, _headers = update_sfvb_search_facets_with_http_info(storefront_oid, search_facets_request, opts)
21685
+ data
21686
+ end
21687
+
21688
+ # Change the storefront&#39;s faceted search configuration
21689
+ # A partial update. Turn facets on or off, change their headings, and replace the Cost facet&#39;s price breaks; facets left out and every other search setting are unchanged. Facets cannot be reordered - the order is fixed. Turning facets on or off, or changing the price breaks, starts a search index rebuild, reported in rebuild. dry_run checks the change and reports it, and the rebuild it would start, without saving. Needs sfvb_publish, because facets show on every search and category page at once. Changes are limited to 30 an hour and 100 a day per storefront, and those that start a rebuild to 6 an hour and 20 a day (429, nothing saved).
21690
+ # @param storefront_oid [Integer]
21691
+ # @param search_facets_request [SfvbSearchFacetsRequest] The facets and price breaks to change
21692
+ # @param [Hash] opts the optional parameters
21693
+ # @option opts [String] :if_match hash_sha256 from the last read. Required unless dry_run; 428 when absent, 412 when stale.
21694
+ # @return [Array<(SfvbSearchFacetsResponse, Integer, Hash)>] SfvbSearchFacetsResponse data, response status code and response headers
21695
+ def update_sfvb_search_facets_with_http_info(storefront_oid, search_facets_request, opts = {})
21696
+ if @api_client.config.debugging
21697
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_search_facets ...'
21698
+ end
21699
+ # verify the required parameter 'storefront_oid' is set
21700
+ if @api_client.config.client_side_validation && storefront_oid.nil?
21701
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_search_facets"
21702
+ end
21703
+ # verify the required parameter 'search_facets_request' is set
21704
+ if @api_client.config.client_side_validation && search_facets_request.nil?
21705
+ fail ArgumentError, "Missing the required parameter 'search_facets_request' when calling SfvbApi.update_sfvb_search_facets"
21706
+ end
21707
+ # resource path
21708
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/search/facets'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
21709
+
21710
+ # query parameters
21711
+ query_params = opts[:query_params] || {}
21712
+
21713
+ # header parameters
21714
+ header_params = opts[:header_params] || {}
21715
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
21716
+ # HTTP header 'Accept' (if needed)
21717
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
21718
+ # HTTP header 'Content-Type'
21719
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
21720
+ if !content_type.nil?
21721
+ header_params['Content-Type'] = content_type
21722
+ end
21723
+ header_params[:'If-Match'] = opts[:'if_match'] if !opts[:'if_match'].nil?
21724
+
21725
+ # form parameters
21726
+ form_params = opts[:form_params] || {}
21727
+
21728
+ # http body (model)
21729
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(search_facets_request)
21730
+
21731
+ # return_type
21732
+ return_type = opts[:debug_return_type] || 'SfvbSearchFacetsResponse'
21733
+
21734
+ # auth_names
21735
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
21736
+
21737
+ new_options = opts.merge(
21738
+ :operation => :"SfvbApi.update_sfvb_search_facets",
21739
+ :header_params => header_params,
21740
+ :query_params => query_params,
21741
+ :form_params => form_params,
21742
+ :body => post_body,
21743
+ :auth_names => auth_names,
21744
+ :return_type => return_type
21745
+ )
21746
+
21747
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
21748
+ if @api_client.config.debugging
21749
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_search_facets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
21750
+ end
21751
+ return data, status_code, headers
21752
+ end
21753
+
21448
21754
  # Change one step's settings or audience filter
21449
21755
  # Replaces the step's settings (config_json), its audience filter (filter_profile_equation_json), or both. Nothing else about the step or the sequence changes. Send the step's hash_sha256 as If-Match; the write only lands if the step is still what you read. An email step's audience filter changes here, but not its settings. Experiment, resend, webhook, begin, end, continue and merge steps are refused. On a post_card step only disabled, name and info change, and not its filter. A sequence whose campaign or flow is live needs sfvb_publish. Turning a post_card step on, live or not, needs an approved sequence_step.enable_postcard approval (Approval-Id): once on, it mails printed cards whenever the campaign or flow runs.
21450
21756
  # @param storefront_oid [Integer]
@@ -283,7 +283,7 @@ module UltracartClient
283
283
  # Check to see if the all the properties in the model are valid
284
284
  # @return true if the model is valid
285
285
  def valid?
286
- action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
286
+ action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill", "page.move"])
287
287
  return false unless action_validator.valid?(@action)
288
288
  true
289
289
  end
@@ -291,7 +291,7 @@ module UltracartClient
291
291
  # Custom attribute writer method checking allowed values (enum).
292
292
  # @param [Object] action Object to be assigned
293
293
  def action=(action)
294
- validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
294
+ validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill", "page.move"])
295
295
  unless validator.valid?(action)
296
296
  fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
297
297
  end
@@ -48,9 +48,18 @@ module UltracartClient
48
48
  # For item.pricing, the item whose pricing changes.
49
49
  attr_accessor :merchant_item_oid
50
50
 
51
+ # For page.move, where the page goes, exactly as the move will send it. path is the page as it is now.
52
+ attr_accessor :new_path
53
+
54
+ # For page.move, how many pages move, the page itself included, when it was requested. Set by the server.
55
+ attr_accessor :pages_moved
56
+
51
57
  # The file path, for file.delete, file.put_script and file.put_template, or the page path for experiment.start of a page experiment. Exactly as the gated call will send it.
52
58
  attr_accessor :path
53
59
 
60
+ # For page.move, 301 when the move also redirects the old addresses, as the move will send it. Left out or none for no redirect.
61
+ attr_accessor :redirect_old_url
62
+
54
63
  # For experiment.start of a url experiment, the hash of the checked experiment approved, for item.pricing, tracking_provider.change and affiliate_network.change the hash of the change, and for smart_attribution.change the hash of the configuration the change would store. Set by the server. The gated call must send the same.
55
64
  attr_accessor :request_sha256
56
65
 
@@ -129,7 +138,10 @@ module UltracartClient
129
138
  :'experiment_oid' => :'experiment_oid',
130
139
  :'item_count' => :'item_count',
131
140
  :'merchant_item_oid' => :'merchant_item_oid',
141
+ :'new_path' => :'new_path',
142
+ :'pages_moved' => :'pages_moved',
132
143
  :'path' => :'path',
144
+ :'redirect_old_url' => :'redirect_old_url',
133
145
  :'request_sha256' => :'request_sha256',
134
146
  :'rows_sha256' => :'rows_sha256',
135
147
  :'rule_count' => :'rule_count',
@@ -166,7 +178,10 @@ module UltracartClient
166
178
  :'experiment_oid' => :'Integer',
167
179
  :'item_count' => :'Integer',
168
180
  :'merchant_item_oid' => :'Integer',
181
+ :'new_path' => :'String',
182
+ :'pages_moved' => :'Integer',
169
183
  :'path' => :'String',
184
+ :'redirect_old_url' => :'String',
170
185
  :'request_sha256' => :'String',
171
186
  :'rows_sha256' => :'String',
172
187
  :'rule_count' => :'Integer',
@@ -251,10 +266,22 @@ module UltracartClient
251
266
  self.merchant_item_oid = attributes[:'merchant_item_oid']
252
267
  end
253
268
 
269
+ if attributes.key?(:'new_path')
270
+ self.new_path = attributes[:'new_path']
271
+ end
272
+
273
+ if attributes.key?(:'pages_moved')
274
+ self.pages_moved = attributes[:'pages_moved']
275
+ end
276
+
254
277
  if attributes.key?(:'path')
255
278
  self.path = attributes[:'path']
256
279
  end
257
280
 
281
+ if attributes.key?(:'redirect_old_url')
282
+ self.redirect_old_url = attributes[:'redirect_old_url']
283
+ end
284
+
258
285
  if attributes.key?(:'request_sha256')
259
286
  self.request_sha256 = attributes[:'request_sha256']
260
287
  end
@@ -353,7 +380,10 @@ module UltracartClient
353
380
  experiment_oid == o.experiment_oid &&
354
381
  item_count == o.item_count &&
355
382
  merchant_item_oid == o.merchant_item_oid &&
383
+ new_path == o.new_path &&
384
+ pages_moved == o.pages_moved &&
356
385
  path == o.path &&
386
+ redirect_old_url == o.redirect_old_url &&
357
387
  request_sha256 == o.request_sha256 &&
358
388
  rows_sha256 == o.rows_sha256 &&
359
389
  rule_count == o.rule_count &&
@@ -379,7 +409,7 @@ module UltracartClient
379
409
  # Calculates hash code according to all attributes.
380
410
  # @return [Integer] Hash code
381
411
  def hash
382
- [affiliate_network_oid, after_step_uuid, attribute_names, blog_post_oid, branch_step_uuid, content_sha256, domain, esp_twilio_uuid, experiment_oid, item_count, merchant_item_oid, path, request_sha256, rows_sha256, rule_count, segment_uuid, sequence_uuid, side, slot, step_uuid, tracking_provider, upsell_kind, upsell_oid, version, widget_id, winner_variation_number].hash
412
+ [affiliate_network_oid, after_step_uuid, attribute_names, blog_post_oid, branch_step_uuid, content_sha256, domain, esp_twilio_uuid, experiment_oid, item_count, merchant_item_oid, new_path, pages_moved, path, redirect_old_url, request_sha256, rows_sha256, rule_count, segment_uuid, sequence_uuid, side, slot, step_uuid, tracking_provider, upsell_kind, upsell_oid, version, widget_id, winner_variation_number].hash
383
413
  end
384
414
 
385
415
  # Builds the object from hash