ultracart_api 4.1.199 → 4.1.200

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/SfvbApi.md +465 -11
  4. data/docs/SfvbApprovalCreateRequest.md +6 -0
  5. data/docs/SfvbApprovalParams.md +23 -3
  6. data/docs/SfvbItemAttributeBatchRequest.md +20 -0
  7. data/docs/SfvbItemAttributeBatchResponse.md +40 -0
  8. data/docs/SfvbItemAttributeBatchRow.md +30 -0
  9. data/docs/SfvbItemAttributeBatchRowResult.md +36 -0
  10. data/docs/SfvbItemPricing.md +38 -0
  11. data/docs/SfvbItemPricingRequest.md +32 -0
  12. data/docs/SfvbItemRelated.md +28 -0
  13. data/docs/SfvbItemRelatedItem.md +22 -0
  14. data/docs/SfvbItemRelatedRequest.md +22 -0
  15. data/docs/SfvbItemVolumeDiscount.md +20 -0
  16. data/lib/ultracart_api/api/sfvb_api.rb +640 -16
  17. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +33 -3
  18. data/lib/ultracart_api/models/sfvb_approval_params.rb +142 -6
  19. data/lib/ultracart_api/models/sfvb_item_attribute_batch_request.rb +232 -0
  20. data/lib/ultracart_api/models/sfvb_item_attribute_batch_response.rb +332 -0
  21. data/lib/ultracart_api/models/sfvb_item_attribute_batch_row.rb +280 -0
  22. data/lib/ultracart_api/models/sfvb_item_attribute_batch_row_result.rb +344 -0
  23. data/lib/ultracart_api/models/sfvb_item_pricing.rb +322 -0
  24. data/lib/ultracart_api/models/sfvb_item_pricing_request.rb +292 -0
  25. data/lib/ultracart_api/models/sfvb_item_related.rb +272 -0
  26. data/lib/ultracart_api/models/sfvb_item_related_item.rb +274 -0
  27. data/lib/ultracart_api/models/sfvb_item_related_request.rb +242 -0
  28. data/lib/ultracart_api/models/sfvb_item_volume_discount.rb +230 -0
  29. data/lib/ultracart_api/version.rb +1 -1
  30. data/lib/ultracart_api.rb +10 -0
  31. metadata +22 -2
@@ -1889,6 +1889,81 @@ module UltracartClient
1889
1889
  return data, status_code, headers
1890
1890
  end
1891
1891
 
1892
+ # Check attribute changes across many items without writing them
1893
+ # Checks up to 2,000 rows on up to 200 items, each with the single attribute update's checks, and answers every row as change, unchanged, stale (expected_value differs from the current value), not_found or invalid, with the current value and its current_sha256, plus a plan_hash over the change rows. Writes nothing. SEO attributes are refused; a batch never touches them or any attribute it does not name.
1894
+ # @param storefront_oid [Integer]
1895
+ # @param item_attribute_batch_request [SfvbItemAttributeBatchRequest] The rows
1896
+ # @param [Hash] opts the optional parameters
1897
+ # @return [SfvbItemAttributeBatchResponse]
1898
+ def dry_run_sfvb_item_attribute_batch(storefront_oid, item_attribute_batch_request, opts = {})
1899
+ data, _status_code, _headers = dry_run_sfvb_item_attribute_batch_with_http_info(storefront_oid, item_attribute_batch_request, opts)
1900
+ data
1901
+ end
1902
+
1903
+ # Check attribute changes across many items without writing them
1904
+ # Checks up to 2,000 rows on up to 200 items, each with the single attribute update's checks, and answers every row as change, unchanged, stale (expected_value differs from the current value), not_found or invalid, with the current value and its current_sha256, plus a plan_hash over the change rows. Writes nothing. SEO attributes are refused; a batch never touches them or any attribute it does not name.
1905
+ # @param storefront_oid [Integer]
1906
+ # @param item_attribute_batch_request [SfvbItemAttributeBatchRequest] The rows
1907
+ # @param [Hash] opts the optional parameters
1908
+ # @return [Array<(SfvbItemAttributeBatchResponse, Integer, Hash)>] SfvbItemAttributeBatchResponse data, response status code and response headers
1909
+ def dry_run_sfvb_item_attribute_batch_with_http_info(storefront_oid, item_attribute_batch_request, opts = {})
1910
+ if @api_client.config.debugging
1911
+ @api_client.config.logger.debug 'Calling API: SfvbApi.dry_run_sfvb_item_attribute_batch ...'
1912
+ end
1913
+ # verify the required parameter 'storefront_oid' is set
1914
+ if @api_client.config.client_side_validation && storefront_oid.nil?
1915
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.dry_run_sfvb_item_attribute_batch"
1916
+ end
1917
+ # verify the required parameter 'item_attribute_batch_request' is set
1918
+ if @api_client.config.client_side_validation && item_attribute_batch_request.nil?
1919
+ fail ArgumentError, "Missing the required parameter 'item_attribute_batch_request' when calling SfvbApi.dry_run_sfvb_item_attribute_batch"
1920
+ end
1921
+ # resource path
1922
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/attributes/batch/dry_run'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
1923
+
1924
+ # query parameters
1925
+ query_params = opts[:query_params] || {}
1926
+
1927
+ # header parameters
1928
+ header_params = opts[:header_params] || {}
1929
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1930
+ # HTTP header 'Accept' (if needed)
1931
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1932
+ # HTTP header 'Content-Type'
1933
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1934
+ if !content_type.nil?
1935
+ header_params['Content-Type'] = content_type
1936
+ end
1937
+
1938
+ # form parameters
1939
+ form_params = opts[:form_params] || {}
1940
+
1941
+ # http body (model)
1942
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_attribute_batch_request)
1943
+
1944
+ # return_type
1945
+ return_type = opts[:debug_return_type] || 'SfvbItemAttributeBatchResponse'
1946
+
1947
+ # auth_names
1948
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1949
+
1950
+ new_options = opts.merge(
1951
+ :operation => :"SfvbApi.dry_run_sfvb_item_attribute_batch",
1952
+ :header_params => header_params,
1953
+ :query_params => query_params,
1954
+ :form_params => form_params,
1955
+ :body => post_body,
1956
+ :auth_names => auth_names,
1957
+ :return_type => return_type
1958
+ )
1959
+
1960
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1961
+ if @api_client.config.debugging
1962
+ @api_client.config.logger.debug "API called: SfvbApi#dry_run_sfvb_item_attribute_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1963
+ end
1964
+ return data, status_code, headers
1965
+ end
1966
+
1892
1967
  # Check a batch delete of redirect rules without writing it
1893
1968
  # Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
1894
1969
  # @param storefront_oid [Integer]
@@ -2503,11 +2578,158 @@ module UltracartClient
2503
2578
  return data, status_code, headers
2504
2579
  end
2505
2580
 
2581
+ # Enable an upsell offer
2582
+ # Switches the offer on. The only way to switch one on - create and update refuse active true on an offer that is off. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved upsell.enable request for this offer (see POST /sfvb/approvals). An offer that is already on is returned unchanged, and no approval is used.
2583
+ # @param storefront_oid [Integer]
2584
+ # @param upsell_offer_oid [Integer]
2585
+ # @param [Hash] opts the optional parameters
2586
+ # @option opts [String] :approval_id The approval_id of an approved upsell.enable request for this offer. Required when the offer is off. See POST /sfvb/approvals.
2587
+ # @return [SfvbUpsellOffer]
2588
+ def enable_sfvb_upsell_offer(storefront_oid, upsell_offer_oid, opts = {})
2589
+ data, _status_code, _headers = enable_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts)
2590
+ data
2591
+ end
2592
+
2593
+ # Enable an upsell offer
2594
+ # Switches the offer on. The only way to switch one on - create and update refuse active true on an offer that is off. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved upsell.enable request for this offer (see POST /sfvb/approvals). An offer that is already on is returned unchanged, and no approval is used.
2595
+ # @param storefront_oid [Integer]
2596
+ # @param upsell_offer_oid [Integer]
2597
+ # @param [Hash] opts the optional parameters
2598
+ # @option opts [String] :approval_id The approval_id of an approved upsell.enable request for this offer. Required when the offer is off. See POST /sfvb/approvals.
2599
+ # @return [Array<(SfvbUpsellOffer, Integer, Hash)>] SfvbUpsellOffer data, response status code and response headers
2600
+ def enable_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts = {})
2601
+ if @api_client.config.debugging
2602
+ @api_client.config.logger.debug 'Calling API: SfvbApi.enable_sfvb_upsell_offer ...'
2603
+ end
2604
+ # verify the required parameter 'storefront_oid' is set
2605
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2606
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.enable_sfvb_upsell_offer"
2607
+ end
2608
+ # verify the required parameter 'upsell_offer_oid' is set
2609
+ if @api_client.config.client_side_validation && upsell_offer_oid.nil?
2610
+ fail ArgumentError, "Missing the required parameter 'upsell_offer_oid' when calling SfvbApi.enable_sfvb_upsell_offer"
2611
+ end
2612
+ # resource path
2613
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers/{upsell_offer_oid}/enable'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_offer_oid' + '}', CGI.escape(upsell_offer_oid.to_s))
2614
+
2615
+ # query parameters
2616
+ query_params = opts[:query_params] || {}
2617
+
2618
+ # header parameters
2619
+ header_params = opts[:header_params] || {}
2620
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2621
+ # HTTP header 'Accept' (if needed)
2622
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2623
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
2624
+
2625
+ # form parameters
2626
+ form_params = opts[:form_params] || {}
2627
+
2628
+ # http body (model)
2629
+ post_body = opts[:debug_body]
2630
+
2631
+ # return_type
2632
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffer'
2633
+
2634
+ # auth_names
2635
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2636
+
2637
+ new_options = opts.merge(
2638
+ :operation => :"SfvbApi.enable_sfvb_upsell_offer",
2639
+ :header_params => header_params,
2640
+ :query_params => query_params,
2641
+ :form_params => form_params,
2642
+ :body => post_body,
2643
+ :auth_names => auth_names,
2644
+ :return_type => return_type
2645
+ )
2646
+
2647
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2648
+ if @api_client.config.debugging
2649
+ @api_client.config.logger.debug "API called: SfvbApi#enable_sfvb_upsell_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2650
+ end
2651
+ return data, status_code, headers
2652
+ end
2653
+
2654
+ # Enable an upsell path
2655
+ # Switches the path on, so it starts running. The only way to switch one on - create, update and unarchive refuse to. An archived path is refused; unarchive it first. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved upsell.enable request for this path (see POST /sfvb/approvals). A path that is already on is returned unchanged, and no approval is used.
2656
+ # @param storefront_oid [Integer]
2657
+ # @param upsell_path_oid [Integer]
2658
+ # @param [Hash] opts the optional parameters
2659
+ # @option opts [String] :approval_id The approval_id of an approved upsell.enable request for this path. Required when the path is off. See POST /sfvb/approvals.
2660
+ # @return [SfvbUpsellPath]
2661
+ def enable_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
2662
+ data, _status_code, _headers = enable_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
2663
+ data
2664
+ end
2665
+
2666
+ # Enable an upsell path
2667
+ # Switches the path on, so it starts running. The only way to switch one on - create, update and unarchive refuse to. An archived path is refused; unarchive it first. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved upsell.enable request for this path (see POST /sfvb/approvals). A path that is already on is returned unchanged, and no approval is used.
2668
+ # @param storefront_oid [Integer]
2669
+ # @param upsell_path_oid [Integer]
2670
+ # @param [Hash] opts the optional parameters
2671
+ # @option opts [String] :approval_id The approval_id of an approved upsell.enable request for this path. Required when the path is off. See POST /sfvb/approvals.
2672
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
2673
+ def enable_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
2674
+ if @api_client.config.debugging
2675
+ @api_client.config.logger.debug 'Calling API: SfvbApi.enable_sfvb_upsell_path ...'
2676
+ end
2677
+ # verify the required parameter 'storefront_oid' is set
2678
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2679
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.enable_sfvb_upsell_path"
2680
+ end
2681
+ # verify the required parameter 'upsell_path_oid' is set
2682
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
2683
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.enable_sfvb_upsell_path"
2684
+ end
2685
+ # resource path
2686
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/enable'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
2687
+
2688
+ # query parameters
2689
+ query_params = opts[:query_params] || {}
2690
+
2691
+ # header parameters
2692
+ header_params = opts[:header_params] || {}
2693
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2694
+ # HTTP header 'Accept' (if needed)
2695
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2696
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
2697
+
2698
+ # form parameters
2699
+ form_params = opts[:form_params] || {}
2700
+
2701
+ # http body (model)
2702
+ post_body = opts[:debug_body]
2703
+
2704
+ # return_type
2705
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
2706
+
2707
+ # auth_names
2708
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2709
+
2710
+ new_options = opts.merge(
2711
+ :operation => :"SfvbApi.enable_sfvb_upsell_path",
2712
+ :header_params => header_params,
2713
+ :query_params => query_params,
2714
+ :form_params => form_params,
2715
+ :body => post_body,
2716
+ :auth_names => auth_names,
2717
+ :return_type => return_type
2718
+ )
2719
+
2720
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2721
+ if @api_client.config.debugging
2722
+ @api_client.config.logger.debug "API called: SfvbApi#enable_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2723
+ end
2724
+ return data, status_code, headers
2725
+ end
2726
+
2506
2727
  # End an experiment
2507
- # Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment's winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment's id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
2728
+ # Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment's winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment's id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish, and the approval of the person who signed in the CLI - an approved experiment.end request for this experiment and winner, which always needs a fresh authenticator code (see POST /sfvb/approvals).
2508
2729
  # @param storefront_oid [Integer]
2509
2730
  # @param experiment_oid [Integer]
2510
2731
  # @param [Hash] opts the optional parameters
2732
+ # @option opts [String] :approval_id The approval_id of an approved experiment.end request for this experiment and winner. Required. See POST /sfvb/approvals.
2511
2733
  # @option opts [SfvbExperimentEndRequest] :experiment_end_request The winner, if any
2512
2734
  # @return [SfvbExperiment]
2513
2735
  def end_sfvb_experiment(storefront_oid, experiment_oid, opts = {})
@@ -2516,10 +2738,11 @@ module UltracartClient
2516
2738
  end
2517
2739
 
2518
2740
  # End an experiment
2519
- # Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment&#39;s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment&#39;s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish.
2741
+ # Ends a running experiment. With winner_variation_number the winner gets every visitor, including visitors already assigned to another variation, and a page experiment&#39;s winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment&#39;s id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Always needs sfvb_publish, and the approval of the person who signed in the CLI - an approved experiment.end request for this experiment and winner, which always needs a fresh authenticator code (see POST /sfvb/approvals).
2520
2742
  # @param storefront_oid [Integer]
2521
2743
  # @param experiment_oid [Integer]
2522
2744
  # @param [Hash] opts the optional parameters
2745
+ # @option opts [String] :approval_id The approval_id of an approved experiment.end request for this experiment and winner. Required. See POST /sfvb/approvals.
2523
2746
  # @option opts [SfvbExperimentEndRequest] :experiment_end_request The winner, if any
2524
2747
  # @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
2525
2748
  def end_sfvb_experiment_with_http_info(storefront_oid, experiment_oid, opts = {})
@@ -2550,6 +2773,7 @@ module UltracartClient
2550
2773
  if !content_type.nil?
2551
2774
  header_params['Content-Type'] = content_type
2552
2775
  end
2776
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
2553
2777
 
2554
2778
  # form parameters
2555
2779
  form_params = opts[:form_params] || {}
@@ -3756,7 +3980,7 @@ module UltracartClient
3756
3980
  end
3757
3981
 
3758
3982
  # Read an item's storefront facing content
3759
- # The attributes, images, title, description and search metadata a StoreFront element can render, reconciled against the templates behind the pages this item sits on. An attribute a template declares but nothing has set comes back present with an empty value, which is how you discover what the page is asking for. Pricing, shipping, inventory, tax, variants and kit structure are not here because no element reads them; use the item API for those. Address by merchant_item_id, the value data-context-item-id carries, or by merchant_item_oid.
3983
+ # The attributes, images, title, description and search metadata a StoreFront element can render, reconciled against the templates behind the pages this item sits on. An attribute a template declares but nothing has set comes back present with an empty value, which is how you discover what the page is asking for. Pricing and related items have their own calls, items/pricing and items/related. Shipping, inventory, tax, variants and kit structure stay with the item API. Address by merchant_item_id, the value data-context-item-id carries, or by merchant_item_oid.
3760
3984
  # @param storefront_oid [Integer]
3761
3985
  # @param [Hash] opts the optional parameters
3762
3986
  # @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
@@ -3768,7 +3992,7 @@ module UltracartClient
3768
3992
  end
3769
3993
 
3770
3994
  # Read an item&#39;s storefront facing content
3771
- # The attributes, images, title, description and search metadata a StoreFront element can render, reconciled against the templates behind the pages this item sits on. An attribute a template declares but nothing has set comes back present with an empty value, which is how you discover what the page is asking for. Pricing, shipping, inventory, tax, variants and kit structure are not here because no element reads them; use the item API for those. Address by merchant_item_id, the value data-context-item-id carries, or by merchant_item_oid.
3995
+ # The attributes, images, title, description and search metadata a StoreFront element can render, reconciled against the templates behind the pages this item sits on. An attribute a template declares but nothing has set comes back present with an empty value, which is how you discover what the page is asking for. Pricing and related items have their own calls, items/pricing and items/related. Shipping, inventory, tax, variants and kit structure stay with the item API. Address by merchant_item_id, the value data-context-item-id carries, or by merchant_item_oid.
3772
3996
  # @param storefront_oid [Integer]
3773
3997
  # @param [Hash] opts the optional parameters
3774
3998
  # @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
@@ -3825,6 +4049,146 @@ module UltracartClient
3825
4049
  return data, status_code, headers
3826
4050
  end
3827
4051
 
4052
+ # Read what an item charges
4053
+ # Price, sale (with whether it applies now), MSRP and retail volume pricing - what itemprice, itemsale, itemmsrp, itemsavings and itemvolumediscounts render - with a hash_sha256 to send as If-Match when changing it. Wholesale pricing tiers are not shown. Address by merchant_item_id or merchant_item_oid.
4054
+ # @param storefront_oid [Integer]
4055
+ # @param [Hash] opts the optional parameters
4056
+ # @option opts [String] :merchant_item_id
4057
+ # @option opts [Integer] :merchant_item_oid
4058
+ # @return [SfvbItemPricing]
4059
+ def get_sfvb_item_pricing(storefront_oid, opts = {})
4060
+ data, _status_code, _headers = get_sfvb_item_pricing_with_http_info(storefront_oid, opts)
4061
+ data
4062
+ end
4063
+
4064
+ # Read what an item charges
4065
+ # Price, sale (with whether it applies now), MSRP and retail volume pricing - what itemprice, itemsale, itemmsrp, itemsavings and itemvolumediscounts render - with a hash_sha256 to send as If-Match when changing it. Wholesale pricing tiers are not shown. Address by merchant_item_id or merchant_item_oid.
4066
+ # @param storefront_oid [Integer]
4067
+ # @param [Hash] opts the optional parameters
4068
+ # @option opts [String] :merchant_item_id
4069
+ # @option opts [Integer] :merchant_item_oid
4070
+ # @return [Array<(SfvbItemPricing, Integer, Hash)>] SfvbItemPricing data, response status code and response headers
4071
+ def get_sfvb_item_pricing_with_http_info(storefront_oid, opts = {})
4072
+ if @api_client.config.debugging
4073
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_pricing ...'
4074
+ end
4075
+ # verify the required parameter 'storefront_oid' is set
4076
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4077
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_pricing"
4078
+ end
4079
+ # resource path
4080
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/pricing'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4081
+
4082
+ # query parameters
4083
+ query_params = opts[:query_params] || {}
4084
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
4085
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
4086
+
4087
+ # header parameters
4088
+ header_params = opts[:header_params] || {}
4089
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4090
+ # HTTP header 'Accept' (if needed)
4091
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4092
+
4093
+ # form parameters
4094
+ form_params = opts[:form_params] || {}
4095
+
4096
+ # http body (model)
4097
+ post_body = opts[:debug_body]
4098
+
4099
+ # return_type
4100
+ return_type = opts[:debug_return_type] || 'SfvbItemPricing'
4101
+
4102
+ # auth_names
4103
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4104
+
4105
+ new_options = opts.merge(
4106
+ :operation => :"SfvbApi.get_sfvb_item_pricing",
4107
+ :header_params => header_params,
4108
+ :query_params => query_params,
4109
+ :form_params => form_params,
4110
+ :body => post_body,
4111
+ :auth_names => auth_names,
4112
+ :return_type => return_type
4113
+ )
4114
+
4115
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4116
+ if @api_client.config.debugging
4117
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4118
+ end
4119
+ return data, status_code, headers
4120
+ end
4121
+
4122
+ # Read an item's related items
4123
+ # What itemrelateditemslist lists - the merchant's own related items (user, addon, complementary) and the ones UltraCart calculates (system), with a hash_sha256 to send as If-Match when changing them.
4124
+ # @param storefront_oid [Integer]
4125
+ # @param [Hash] opts the optional parameters
4126
+ # @option opts [String] :merchant_item_id
4127
+ # @option opts [Integer] :merchant_item_oid
4128
+ # @return [SfvbItemRelated]
4129
+ def get_sfvb_item_related(storefront_oid, opts = {})
4130
+ data, _status_code, _headers = get_sfvb_item_related_with_http_info(storefront_oid, opts)
4131
+ data
4132
+ end
4133
+
4134
+ # Read an item&#39;s related items
4135
+ # What itemrelateditemslist lists - the merchant&#39;s own related items (user, addon, complementary) and the ones UltraCart calculates (system), with a hash_sha256 to send as If-Match when changing them.
4136
+ # @param storefront_oid [Integer]
4137
+ # @param [Hash] opts the optional parameters
4138
+ # @option opts [String] :merchant_item_id
4139
+ # @option opts [Integer] :merchant_item_oid
4140
+ # @return [Array<(SfvbItemRelated, Integer, Hash)>] SfvbItemRelated data, response status code and response headers
4141
+ def get_sfvb_item_related_with_http_info(storefront_oid, opts = {})
4142
+ if @api_client.config.debugging
4143
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_related ...'
4144
+ end
4145
+ # verify the required parameter 'storefront_oid' is set
4146
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4147
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_related"
4148
+ end
4149
+ # resource path
4150
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/related'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4151
+
4152
+ # query parameters
4153
+ query_params = opts[:query_params] || {}
4154
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
4155
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
4156
+
4157
+ # header parameters
4158
+ header_params = opts[:header_params] || {}
4159
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4160
+ # HTTP header 'Accept' (if needed)
4161
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4162
+
4163
+ # form parameters
4164
+ form_params = opts[:form_params] || {}
4165
+
4166
+ # http body (model)
4167
+ post_body = opts[:debug_body]
4168
+
4169
+ # return_type
4170
+ return_type = opts[:debug_return_type] || 'SfvbItemRelated'
4171
+
4172
+ # auth_names
4173
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4174
+
4175
+ new_options = opts.merge(
4176
+ :operation => :"SfvbApi.get_sfvb_item_related",
4177
+ :header_params => header_params,
4178
+ :query_params => query_params,
4179
+ :form_params => form_params,
4180
+ :body => post_body,
4181
+ :auth_names => auth_names,
4182
+ :return_type => return_type
4183
+ )
4184
+
4185
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4186
+ if @api_client.config.debugging
4187
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_related\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4188
+ end
4189
+ return data, status_code, headers
4190
+ end
4191
+
3828
4192
  # Read one library entry including its CJSON
3829
4193
  # 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.
3830
4194
  # @param storefront_oid [Integer]
@@ -6300,7 +6664,7 @@ module UltracartClient
6300
6664
  end
6301
6665
 
6302
6666
  # Create an upsell offer
6303
- # Every item it names must exist, and every shipping method, payment method and loyalty tier must be one the merchant has. Put it on a path with a path update to have it shown. Creating it switched on, or with upsell_item_id_javascript or offsite_content_url, needs sfvb_publish. Its page content is its container, written with the container endpoints and owner type upsell.
6667
+ # Every item it names must exist, and every shipping method, payment method and loyalty tier must be one the merchant has. Put it on a path with a path update to have it shown. It must be created with active false, and switched on with the enable call, which needs approval. upsell_item_id_javascript or offsite_content_url needs sfvb_publish. Its page content is its container, written with the container endpoints and owner type upsell.
6304
6668
  # @param storefront_oid [Integer]
6305
6669
  # @param upsell_offer [SfvbUpsellOffer] The offer to create
6306
6670
  # @param [Hash] opts the optional parameters
@@ -6311,7 +6675,7 @@ module UltracartClient
6311
6675
  end
6312
6676
 
6313
6677
  # Create an upsell offer
6314
- # Every item it names must exist, and every shipping method, payment method and loyalty tier must be one the merchant has. Put it on a path with a path update to have it shown. Creating it switched on, or with upsell_item_id_javascript or offsite_content_url, needs sfvb_publish. Its page content is its container, written with the container endpoints and owner type upsell.
6678
+ # Every item it names must exist, and every shipping method, payment method and loyalty tier must be one the merchant has. Put it on a path with a path update to have it shown. It must be created with active false, and switched on with the enable call, which needs approval. upsell_item_id_javascript or offsite_content_url needs sfvb_publish. Its page content is its container, written with the container endpoints and owner type upsell.
6315
6679
  # @param storefront_oid [Integer]
6316
6680
  # @param upsell_offer [SfvbUpsellOffer] The offer to create
6317
6681
  # @param [Hash] opts the optional parameters
@@ -6375,7 +6739,7 @@ module UltracartClient
6375
6739
  end
6376
6740
 
6377
6741
  # Create an upsell path
6378
- # Placed last in path order. Every offer a step names must be an offer of this storefront, and every item in the item logic must exist. Creating it switched on needs sfvb_publish; create it with active false to build it without that scope.
6742
+ # Placed last in path order. Every offer a step names must be an offer of this storefront, and every item in the item logic must exist. It must be created with active false, and switched on with the enable call, which needs approval.
6379
6743
  # @param storefront_oid [Integer]
6380
6744
  # @param upsell_path [SfvbUpsellPath] The path to create
6381
6745
  # @param [Hash] opts the optional parameters
@@ -6386,7 +6750,7 @@ module UltracartClient
6386
6750
  end
6387
6751
 
6388
6752
  # Create an upsell path
6389
- # Placed last in path order. Every offer a step names must be an offer of this storefront, and every item in the item logic must exist. Creating it switched on needs sfvb_publish; create it with active false to build it without that scope.
6753
+ # Placed last in path order. Every offer a step names must be an offer of this storefront, and every item in the item logic must exist. It must be created with active false, and switched on with the enable call, which needs approval.
6390
6754
  # @param storefront_oid [Integer]
6391
6755
  # @param upsell_path [SfvbUpsellPath] The path to create
6392
6756
  # @param [Hash] opts the optional parameters
@@ -8521,6 +8885,185 @@ module UltracartClient
8521
8885
  return data, status_code, headers
8522
8886
  end
8523
8887
 
8888
+ # Change what an item charges
8889
+ # Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
8890
+ # @param storefront_oid [Integer]
8891
+ # @param if_match [String] hash_sha256 from the pricing read. Required; 428 when absent, 412 when stale.
8892
+ # @param item_pricing_request [SfvbItemPricingRequest] The change
8893
+ # @param [Hash] opts the optional parameters
8894
+ # @option opts [String] :merchant_item_id
8895
+ # @option opts [Integer] :merchant_item_oid
8896
+ # @option opts [String] :approval_id The approval_id of an approved item.pricing request for this item and change. Required. See POST /sfvb/approvals.
8897
+ # @return [SfvbItemPricing]
8898
+ def put_sfvb_item_pricing(storefront_oid, if_match, item_pricing_request, opts = {})
8899
+ data, _status_code, _headers = put_sfvb_item_pricing_with_http_info(storefront_oid, if_match, item_pricing_request, opts)
8900
+ data
8901
+ end
8902
+
8903
+ # Change what an item charges
8904
+ # Partial - a field left out is untouched. A sale needs sale_cost, sale_start and sale_end together, the end after the start; clear_sale removes it. msrp must be more than 0 (0 only when the price is 0); clear_msrp removes it. volume_discounts replaces the retail quantity breaks. Shoppers pay the new price at once, so this needs sfvb_publish, If-Match with the pricing hash_sha256, and the approval of the person who signed in the CLI - an approved item.pricing request for this item and exactly this change. A change that sets every field to what it already is returns the pricing unchanged and uses no approval.
8905
+ # @param storefront_oid [Integer]
8906
+ # @param if_match [String] hash_sha256 from the pricing read. Required; 428 when absent, 412 when stale.
8907
+ # @param item_pricing_request [SfvbItemPricingRequest] The change
8908
+ # @param [Hash] opts the optional parameters
8909
+ # @option opts [String] :merchant_item_id
8910
+ # @option opts [Integer] :merchant_item_oid
8911
+ # @option opts [String] :approval_id The approval_id of an approved item.pricing request for this item and change. Required. See POST /sfvb/approvals.
8912
+ # @return [Array<(SfvbItemPricing, Integer, Hash)>] SfvbItemPricing data, response status code and response headers
8913
+ def put_sfvb_item_pricing_with_http_info(storefront_oid, if_match, item_pricing_request, opts = {})
8914
+ if @api_client.config.debugging
8915
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_pricing ...'
8916
+ end
8917
+ # verify the required parameter 'storefront_oid' is set
8918
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8919
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_pricing"
8920
+ end
8921
+ # verify the required parameter 'if_match' is set
8922
+ if @api_client.config.client_side_validation && if_match.nil?
8923
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_item_pricing"
8924
+ end
8925
+ # verify the required parameter 'item_pricing_request' is set
8926
+ if @api_client.config.client_side_validation && item_pricing_request.nil?
8927
+ fail ArgumentError, "Missing the required parameter 'item_pricing_request' when calling SfvbApi.put_sfvb_item_pricing"
8928
+ end
8929
+ # resource path
8930
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/pricing'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
8931
+
8932
+ # query parameters
8933
+ query_params = opts[:query_params] || {}
8934
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
8935
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
8936
+
8937
+ # header parameters
8938
+ header_params = opts[:header_params] || {}
8939
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8940
+ # HTTP header 'Accept' (if needed)
8941
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8942
+ # HTTP header 'Content-Type'
8943
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
8944
+ if !content_type.nil?
8945
+ header_params['Content-Type'] = content_type
8946
+ end
8947
+ header_params[:'If-Match'] = if_match
8948
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
8949
+
8950
+ # form parameters
8951
+ form_params = opts[:form_params] || {}
8952
+
8953
+ # http body (model)
8954
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_pricing_request)
8955
+
8956
+ # return_type
8957
+ return_type = opts[:debug_return_type] || 'SfvbItemPricing'
8958
+
8959
+ # auth_names
8960
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
8961
+
8962
+ new_options = opts.merge(
8963
+ :operation => :"SfvbApi.put_sfvb_item_pricing",
8964
+ :header_params => header_params,
8965
+ :query_params => query_params,
8966
+ :form_params => form_params,
8967
+ :body => post_body,
8968
+ :auth_names => auth_names,
8969
+ :return_type => return_type
8970
+ )
8971
+
8972
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
8973
+ if @api_client.config.debugging
8974
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8975
+ end
8976
+ return data, status_code, headers
8977
+ end
8978
+
8979
+ # Replace an item's related items
8980
+ # Replaces the merchant's own related items, in order, and keeps the ones UltraCart calculates. Each must be an item of this account and not the item itself, named once, up to 50. No link back is added to the other items. Needs sfvb_publish and If-Match with the related hash_sha256.
8981
+ # @param storefront_oid [Integer]
8982
+ # @param if_match [String] hash_sha256 from the related read. Required; 428 when absent, 412 when stale.
8983
+ # @param item_related_request [SfvbItemRelatedRequest] The related items
8984
+ # @param [Hash] opts the optional parameters
8985
+ # @option opts [String] :merchant_item_id
8986
+ # @option opts [Integer] :merchant_item_oid
8987
+ # @return [SfvbItemRelated]
8988
+ def put_sfvb_item_related(storefront_oid, if_match, item_related_request, opts = {})
8989
+ data, _status_code, _headers = put_sfvb_item_related_with_http_info(storefront_oid, if_match, item_related_request, opts)
8990
+ data
8991
+ end
8992
+
8993
+ # Replace an item&#39;s related items
8994
+ # Replaces the merchant&#39;s own related items, in order, and keeps the ones UltraCart calculates. Each must be an item of this account and not the item itself, named once, up to 50. No link back is added to the other items. Needs sfvb_publish and If-Match with the related hash_sha256.
8995
+ # @param storefront_oid [Integer]
8996
+ # @param if_match [String] hash_sha256 from the related read. Required; 428 when absent, 412 when stale.
8997
+ # @param item_related_request [SfvbItemRelatedRequest] The related items
8998
+ # @param [Hash] opts the optional parameters
8999
+ # @option opts [String] :merchant_item_id
9000
+ # @option opts [Integer] :merchant_item_oid
9001
+ # @return [Array<(SfvbItemRelated, Integer, Hash)>] SfvbItemRelated data, response status code and response headers
9002
+ def put_sfvb_item_related_with_http_info(storefront_oid, if_match, item_related_request, opts = {})
9003
+ if @api_client.config.debugging
9004
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_related ...'
9005
+ end
9006
+ # verify the required parameter 'storefront_oid' is set
9007
+ if @api_client.config.client_side_validation && storefront_oid.nil?
9008
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_related"
9009
+ end
9010
+ # verify the required parameter 'if_match' is set
9011
+ if @api_client.config.client_side_validation && if_match.nil?
9012
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_item_related"
9013
+ end
9014
+ # verify the required parameter 'item_related_request' is set
9015
+ if @api_client.config.client_side_validation && item_related_request.nil?
9016
+ fail ArgumentError, "Missing the required parameter 'item_related_request' when calling SfvbApi.put_sfvb_item_related"
9017
+ end
9018
+ # resource path
9019
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/related'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
9020
+
9021
+ # query parameters
9022
+ query_params = opts[:query_params] || {}
9023
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
9024
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
9025
+
9026
+ # header parameters
9027
+ header_params = opts[:header_params] || {}
9028
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
9029
+ # HTTP header 'Accept' (if needed)
9030
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
9031
+ # HTTP header 'Content-Type'
9032
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
9033
+ if !content_type.nil?
9034
+ header_params['Content-Type'] = content_type
9035
+ end
9036
+ header_params[:'If-Match'] = if_match
9037
+
9038
+ # form parameters
9039
+ form_params = opts[:form_params] || {}
9040
+
9041
+ # http body (model)
9042
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_related_request)
9043
+
9044
+ # return_type
9045
+ return_type = opts[:debug_return_type] || 'SfvbItemRelated'
9046
+
9047
+ # auth_names
9048
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
9049
+
9050
+ new_options = opts.merge(
9051
+ :operation => :"SfvbApi.put_sfvb_item_related",
9052
+ :header_params => header_params,
9053
+ :query_params => query_params,
9054
+ :form_params => form_params,
9055
+ :body => post_body,
9056
+ :auth_names => auth_names,
9057
+ :return_type => return_type
9058
+ )
9059
+
9060
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
9061
+ if @api_client.config.debugging
9062
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_related\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9063
+ end
9064
+ return data, status_code, headers
9065
+ end
9066
+
8524
9067
  # Change an item's search metadata
8525
9068
  # Partial - a field left out is untouched, a field sent empty is cleared and the page falls back to what it fell back to before. Underneath these are three item attributes with reserved names, so this and the attributes endpoint reach the same storage; it exists separately because the names are not discoverable from the templates. Two things worth knowing. A title set here changes the document title only - og:title and twitter:title render the item's description either way. And there is no canonical or noindex field, because both are site wide switches rather than per item values.
8526
9069
  # @param storefront_oid [Integer]
@@ -10440,10 +10983,11 @@ module UltracartClient
10440
10983
  end
10441
10984
 
10442
10985
  # Start an experiment
10443
- # 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.
10986
+ # 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, and the approval of the person who signed in the CLI - an approved experiment.start request for exactly this start (see POST /sfvb/approvals).
10444
10987
  # @param storefront_oid [Integer]
10445
10988
  # @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
10446
10989
  # @param [Hash] opts the optional parameters
10990
+ # @option opts [String] :approval_id The approval_id of an approved experiment.start request for exactly this start. Required. See POST /sfvb/approvals.
10447
10991
  # @return [SfvbExperiment]
10448
10992
  def start_sfvb_experiment(storefront_oid, experiment_start_request, opts = {})
10449
10993
  data, _status_code, _headers = start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts)
@@ -10451,10 +10995,11 @@ module UltracartClient
10451
10995
  end
10452
10996
 
10453
10997
  # Start an experiment
10454
- # 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&#39;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.
10998
+ # 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&#39;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, and the approval of the person who signed in the CLI - an approved experiment.start request for exactly this start (see POST /sfvb/approvals).
10455
10999
  # @param storefront_oid [Integer]
10456
11000
  # @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
10457
11001
  # @param [Hash] opts the optional parameters
11002
+ # @option opts [String] :approval_id The approval_id of an approved experiment.start request for exactly this start. Required. See POST /sfvb/approvals.
10458
11003
  # @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
10459
11004
  def start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts = {})
10460
11005
  if @api_client.config.debugging
@@ -10484,6 +11029,7 @@ module UltracartClient
10484
11029
  if !content_type.nil?
10485
11030
  header_params['Content-Type'] = content_type
10486
11031
  end
11032
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
10487
11033
 
10488
11034
  # form parameters
10489
11035
  form_params = opts[:form_params] || {}
@@ -10515,7 +11061,7 @@ module UltracartClient
10515
11061
  end
10516
11062
 
10517
11063
  # Unarchive an upsell path
10518
- # Brings the path back into the default list. Unarchiving one that is switched on starts it, so that needs sfvb_publish.
11064
+ # Brings the path back into the default list. A path that is switched on is refused, because unarchiving it would start it without approval - disable it, unarchive it, then enable it.
10519
11065
  # @param storefront_oid [Integer]
10520
11066
  # @param upsell_path_oid [Integer]
10521
11067
  # @param [Hash] opts the optional parameters
@@ -10526,7 +11072,7 @@ module UltracartClient
10526
11072
  end
10527
11073
 
10528
11074
  # Unarchive an upsell path
10529
- # Brings the path back into the default list. Unarchiving one that is switched on starts it, so that needs sfvb_publish.
11075
+ # Brings the path back into the default list. A path that is switched on is refused, because unarchiving it would start it without approval - disable it, unarchive it, then enable it.
10530
11076
  # @param storefront_oid [Integer]
10531
11077
  # @param upsell_path_oid [Integer]
10532
11078
  # @param [Hash] opts the optional parameters
@@ -10962,6 +11508,84 @@ module UltracartClient
10962
11508
  return data, status_code, headers
10963
11509
  end
10964
11510
 
11511
+ # Change attributes across many items in one call
11512
+ # Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
11513
+ # @param storefront_oid [Integer]
11514
+ # @param item_attribute_batch_request [SfvbItemAttributeBatchRequest] The dry run&#39;s change rows and plan_hash
11515
+ # @param [Hash] opts the optional parameters
11516
+ # @option opts [String] :approval_id The approval_id of an approved item.attribute_batch request for exactly these rows. Required. See POST /sfvb/approvals.
11517
+ # @return [SfvbItemAttributeBatchResponse]
11518
+ def update_sfvb_item_attribute_batch(storefront_oid, item_attribute_batch_request, opts = {})
11519
+ data, _status_code, _headers = update_sfvb_item_attribute_batch_with_http_info(storefront_oid, item_attribute_batch_request, opts)
11520
+ data
11521
+ end
11522
+
11523
+ # Change attributes across many items in one call
11524
+ # Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
11525
+ # @param storefront_oid [Integer]
11526
+ # @param item_attribute_batch_request [SfvbItemAttributeBatchRequest] The dry run&#39;s change rows and plan_hash
11527
+ # @param [Hash] opts the optional parameters
11528
+ # @option opts [String] :approval_id The approval_id of an approved item.attribute_batch request for exactly these rows. Required. See POST /sfvb/approvals.
11529
+ # @return [Array<(SfvbItemAttributeBatchResponse, Integer, Hash)>] SfvbItemAttributeBatchResponse data, response status code and response headers
11530
+ def update_sfvb_item_attribute_batch_with_http_info(storefront_oid, item_attribute_batch_request, opts = {})
11531
+ if @api_client.config.debugging
11532
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_item_attribute_batch ...'
11533
+ end
11534
+ # verify the required parameter 'storefront_oid' is set
11535
+ if @api_client.config.client_side_validation && storefront_oid.nil?
11536
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_item_attribute_batch"
11537
+ end
11538
+ # verify the required parameter 'item_attribute_batch_request' is set
11539
+ if @api_client.config.client_side_validation && item_attribute_batch_request.nil?
11540
+ fail ArgumentError, "Missing the required parameter 'item_attribute_batch_request' when calling SfvbApi.update_sfvb_item_attribute_batch"
11541
+ end
11542
+ # resource path
11543
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/attributes/batch'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
11544
+
11545
+ # query parameters
11546
+ query_params = opts[:query_params] || {}
11547
+
11548
+ # header parameters
11549
+ header_params = opts[:header_params] || {}
11550
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
11551
+ # HTTP header 'Accept' (if needed)
11552
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
11553
+ # HTTP header 'Content-Type'
11554
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
11555
+ if !content_type.nil?
11556
+ header_params['Content-Type'] = content_type
11557
+ end
11558
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
11559
+
11560
+ # form parameters
11561
+ form_params = opts[:form_params] || {}
11562
+
11563
+ # http body (model)
11564
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_attribute_batch_request)
11565
+
11566
+ # return_type
11567
+ return_type = opts[:debug_return_type] || 'SfvbItemAttributeBatchResponse'
11568
+
11569
+ # auth_names
11570
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
11571
+
11572
+ new_options = opts.merge(
11573
+ :operation => :"SfvbApi.update_sfvb_item_attribute_batch",
11574
+ :header_params => header_params,
11575
+ :query_params => query_params,
11576
+ :form_params => form_params,
11577
+ :body => post_body,
11578
+ :auth_names => auth_names,
11579
+ :return_type => return_type
11580
+ )
11581
+
11582
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
11583
+ if @api_client.config.debugging
11584
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_item_attribute_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
11585
+ end
11586
+ return data, status_code, headers
11587
+ end
11588
+
10965
11589
  # Update a library entry's draft
10966
11590
  # 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.
10967
11591
  # @param storefront_oid [Integer]
@@ -11139,7 +11763,7 @@ module UltracartClient
11139
11763
  end
11140
11764
 
11141
11765
  # Update an upsell offer
11142
- # 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.
11766
+ # 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, or changing upsell_item_id_javascript or offsite_content_url, needs sfvb_publish. An update cannot switch an offer on; that is the enable call, which needs approval. Settings the API does not show, such as the offer's screenshots, are kept.
11143
11767
  # @param storefront_oid [Integer]
11144
11768
  # @param upsell_offer_oid [Integer]
11145
11769
  # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
@@ -11152,7 +11776,7 @@ module UltracartClient
11152
11776
  end
11153
11777
 
11154
11778
  # Update an upsell offer
11155
- # 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&#39;s screenshots, are kept.
11779
+ # 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, or changing upsell_item_id_javascript or offsite_content_url, needs sfvb_publish. An update cannot switch an offer on; that is the enable call, which needs approval. Settings the API does not show, such as the offer&#39;s screenshots, are kept.
11156
11780
  # @param storefront_oid [Integer]
11157
11781
  # @param upsell_offer_oid [Integer]
11158
11782
  # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
@@ -11227,7 +11851,7 @@ module UltracartClient
11227
11851
  end
11228
11852
 
11229
11853
  # Update an upsell path
11230
- # A full replace. Send back the whole path you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Order and archived keep their stored values; change them with the move, archive and unarchive calls. Changing a running path, or switching one on, needs sfvb_publish.
11854
+ # A full replace. Send back the whole path you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Order and archived keep their stored values; change them with the move, archive and unarchive calls. Changing a running path needs sfvb_publish. An update cannot switch a path on; that is the enable call, which needs approval.
11231
11855
  # @param storefront_oid [Integer]
11232
11856
  # @param upsell_path_oid [Integer]
11233
11857
  # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
@@ -11240,7 +11864,7 @@ module UltracartClient
11240
11864
  end
11241
11865
 
11242
11866
  # Update an upsell path
11243
- # A full replace. Send back the whole path you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Order and archived keep their stored values; change them with the move, archive and unarchive calls. Changing a running path, or switching one on, needs sfvb_publish.
11867
+ # A full replace. Send back the whole path you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Order and archived keep their stored values; change them with the move, archive and unarchive calls. Changing a running path needs sfvb_publish. An update cannot switch a path on; that is the enable call, which needs approval.
11244
11868
  # @param storefront_oid [Integer]
11245
11869
  # @param upsell_path_oid [Integer]
11246
11870
  # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.