ultracart_api 4.1.198 → 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.
- checksums.yaml +4 -4
- data/README.md +30 -2
- data/docs/SfvbApi.md +582 -15
- data/docs/SfvbApproval.md +3 -1
- data/docs/SfvbApprovalCreateRequest.md +11 -1
- data/docs/SfvbApprovalParams.md +30 -2
- data/docs/SfvbApprovalReview.md +36 -0
- data/docs/SfvbApprovalReviewFinding.md +24 -0
- data/docs/SfvbItemAttributeBatchRequest.md +20 -0
- data/docs/SfvbItemAttributeBatchResponse.md +40 -0
- data/docs/SfvbItemAttributeBatchRow.md +30 -0
- data/docs/SfvbItemAttributeBatchRowResult.md +36 -0
- data/docs/SfvbItemPricing.md +38 -0
- data/docs/SfvbItemPricingRequest.md +32 -0
- data/docs/SfvbItemRelated.md +28 -0
- data/docs/SfvbItemRelatedItem.md +22 -0
- data/docs/SfvbItemRelatedRequest.md +22 -0
- data/docs/SfvbItemVolumeDiscount.md +20 -0
- data/docs/SfvbRedirectDeleteRequest.md +20 -0
- data/docs/SfvbRedirectDeleteResponse.md +36 -0
- data/docs/SfvbRedirectDeleteRow.md +20 -0
- data/docs/SfvbRedirectDeleteRowResult.md +32 -0
- data/lib/ultracart_api/api/sfvb_api.rb +852 -69
- data/lib/ultracart_api/models/sfvb_approval.rb +13 -4
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +58 -6
- data/lib/ultracart_api/models/sfvb_approval_params.rb +181 -5
- data/lib/ultracart_api/models/sfvb_approval_review.rb +354 -0
- data/lib/ultracart_api/models/sfvb_approval_review_finding.rb +250 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_request.rb +232 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_response.rb +332 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_row.rb +280 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_batch_row_result.rb +344 -0
- data/lib/ultracart_api/models/sfvb_item_pricing.rb +322 -0
- data/lib/ultracart_api/models/sfvb_item_pricing_request.rb +292 -0
- data/lib/ultracart_api/models/sfvb_item_related.rb +272 -0
- data/lib/ultracart_api/models/sfvb_item_related_item.rb +274 -0
- data/lib/ultracart_api/models/sfvb_item_related_request.rb +242 -0
- data/lib/ultracart_api/models/sfvb_item_volume_discount.rb +230 -0
- data/lib/ultracart_api/models/sfvb_redirect_delete_request.rb +232 -0
- data/lib/ultracart_api/models/sfvb_redirect_delete_response.rb +312 -0
- data/lib/ultracart_api/models/sfvb_redirect_delete_row.rb +230 -0
- data/lib/ultracart_api/models/sfvb_redirect_delete_row_result.rb +324 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +16 -0
- metadata +34 -2
|
@@ -1446,6 +1446,84 @@ module UltracartClient
|
|
|
1446
1446
|
return data, status_code, headers
|
|
1447
1447
|
end
|
|
1448
1448
|
|
|
1449
|
+
# Delete up to 5,000 redirect rules in one call
|
|
1450
|
+
# Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
|
|
1451
|
+
# @param storefront_oid [Integer]
|
|
1452
|
+
# @param redirect_delete_request [SfvbRedirectDeleteRequest] The request
|
|
1453
|
+
# @param [Hash] opts the optional parameters
|
|
1454
|
+
# @option opts [String] :approval_id The approval_id of an approved redirect.delete_batch request for exactly these rows. Required. See POST /sfvb/approvals.
|
|
1455
|
+
# @return [SfvbRedirectDeleteResponse]
|
|
1456
|
+
def delete_sfvb_redirects(storefront_oid, redirect_delete_request, opts = {})
|
|
1457
|
+
data, _status_code, _headers = delete_sfvb_redirects_with_http_info(storefront_oid, redirect_delete_request, opts)
|
|
1458
|
+
data
|
|
1459
|
+
end
|
|
1460
|
+
|
|
1461
|
+
# Delete up to 5,000 redirect rules in one call
|
|
1462
|
+
# Deletes exactly the rows of a dry run, given its plan_hash, in one transaction. Every row needs its hash_sha256. A rule changed since its hash was read is skipped and reported as stale, and a missing one as not_found; the other rows still go through. Needs the approval of the person who signed in the CLI, as an approved redirect.delete_batch request for exactly these rows in the Approval-Id header, and sfvb_publish. Deleting rules lets add and import work again once the storefront is back under 5,000 rules.
|
|
1463
|
+
# @param storefront_oid [Integer]
|
|
1464
|
+
# @param redirect_delete_request [SfvbRedirectDeleteRequest] The request
|
|
1465
|
+
# @param [Hash] opts the optional parameters
|
|
1466
|
+
# @option opts [String] :approval_id The approval_id of an approved redirect.delete_batch request for exactly these rows. Required. See POST /sfvb/approvals.
|
|
1467
|
+
# @return [Array<(SfvbRedirectDeleteResponse, Integer, Hash)>] SfvbRedirectDeleteResponse data, response status code and response headers
|
|
1468
|
+
def delete_sfvb_redirects_with_http_info(storefront_oid, redirect_delete_request, opts = {})
|
|
1469
|
+
if @api_client.config.debugging
|
|
1470
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_redirects ...'
|
|
1471
|
+
end
|
|
1472
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1473
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1474
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_redirects"
|
|
1475
|
+
end
|
|
1476
|
+
# verify the required parameter 'redirect_delete_request' is set
|
|
1477
|
+
if @api_client.config.client_side_validation && redirect_delete_request.nil?
|
|
1478
|
+
fail ArgumentError, "Missing the required parameter 'redirect_delete_request' when calling SfvbApi.delete_sfvb_redirects"
|
|
1479
|
+
end
|
|
1480
|
+
# resource path
|
|
1481
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/redirects/delete'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1482
|
+
|
|
1483
|
+
# query parameters
|
|
1484
|
+
query_params = opts[:query_params] || {}
|
|
1485
|
+
|
|
1486
|
+
# header parameters
|
|
1487
|
+
header_params = opts[:header_params] || {}
|
|
1488
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1489
|
+
# HTTP header 'Accept' (if needed)
|
|
1490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1491
|
+
# HTTP header 'Content-Type'
|
|
1492
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
1493
|
+
if !content_type.nil?
|
|
1494
|
+
header_params['Content-Type'] = content_type
|
|
1495
|
+
end
|
|
1496
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
1497
|
+
|
|
1498
|
+
# form parameters
|
|
1499
|
+
form_params = opts[:form_params] || {}
|
|
1500
|
+
|
|
1501
|
+
# http body (model)
|
|
1502
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(redirect_delete_request)
|
|
1503
|
+
|
|
1504
|
+
# return_type
|
|
1505
|
+
return_type = opts[:debug_return_type] || 'SfvbRedirectDeleteResponse'
|
|
1506
|
+
|
|
1507
|
+
# auth_names
|
|
1508
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1509
|
+
|
|
1510
|
+
new_options = opts.merge(
|
|
1511
|
+
:operation => :"SfvbApi.delete_sfvb_redirects",
|
|
1512
|
+
:header_params => header_params,
|
|
1513
|
+
:query_params => query_params,
|
|
1514
|
+
:form_params => form_params,
|
|
1515
|
+
:body => post_body,
|
|
1516
|
+
:auth_names => auth_names,
|
|
1517
|
+
:return_type => return_type
|
|
1518
|
+
)
|
|
1519
|
+
|
|
1520
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1521
|
+
if @api_client.config.debugging
|
|
1522
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_redirects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1523
|
+
end
|
|
1524
|
+
return data, status_code, headers
|
|
1525
|
+
end
|
|
1526
|
+
|
|
1449
1527
|
# Detach an image from a blog post
|
|
1450
1528
|
# Name exactly one of default_image, code or blog_post_multimedia_oid. Removes the image from the post and deletes its stored copy. Take it out of the body too, or the body keeps a broken image. A post that is not a draft needs sfvb_publish.
|
|
1451
1529
|
# @param storefront_oid [Integer]
|
|
@@ -1811,6 +1889,156 @@ module UltracartClient
|
|
|
1811
1889
|
return data, status_code, headers
|
|
1812
1890
|
end
|
|
1813
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
|
+
|
|
1967
|
+
# Check a batch delete of redirect rules without writing it
|
|
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.
|
|
1969
|
+
# @param storefront_oid [Integer]
|
|
1970
|
+
# @param redirect_delete_request [SfvbRedirectDeleteRequest] The request
|
|
1971
|
+
# @param [Hash] opts the optional parameters
|
|
1972
|
+
# @return [SfvbRedirectDeleteResponse]
|
|
1973
|
+
def dry_run_sfvb_redirect_delete(storefront_oid, redirect_delete_request, opts = {})
|
|
1974
|
+
data, _status_code, _headers = dry_run_sfvb_redirect_delete_with_http_info(storefront_oid, redirect_delete_request, opts)
|
|
1975
|
+
data
|
|
1976
|
+
end
|
|
1977
|
+
|
|
1978
|
+
# Check a batch delete of redirect rules without writing it
|
|
1979
|
+
# 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.
|
|
1980
|
+
# @param storefront_oid [Integer]
|
|
1981
|
+
# @param redirect_delete_request [SfvbRedirectDeleteRequest] The request
|
|
1982
|
+
# @param [Hash] opts the optional parameters
|
|
1983
|
+
# @return [Array<(SfvbRedirectDeleteResponse, Integer, Hash)>] SfvbRedirectDeleteResponse data, response status code and response headers
|
|
1984
|
+
def dry_run_sfvb_redirect_delete_with_http_info(storefront_oid, redirect_delete_request, opts = {})
|
|
1985
|
+
if @api_client.config.debugging
|
|
1986
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.dry_run_sfvb_redirect_delete ...'
|
|
1987
|
+
end
|
|
1988
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1989
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1990
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.dry_run_sfvb_redirect_delete"
|
|
1991
|
+
end
|
|
1992
|
+
# verify the required parameter 'redirect_delete_request' is set
|
|
1993
|
+
if @api_client.config.client_side_validation && redirect_delete_request.nil?
|
|
1994
|
+
fail ArgumentError, "Missing the required parameter 'redirect_delete_request' when calling SfvbApi.dry_run_sfvb_redirect_delete"
|
|
1995
|
+
end
|
|
1996
|
+
# resource path
|
|
1997
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/redirects/delete/dry_run'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1998
|
+
|
|
1999
|
+
# query parameters
|
|
2000
|
+
query_params = opts[:query_params] || {}
|
|
2001
|
+
|
|
2002
|
+
# header parameters
|
|
2003
|
+
header_params = opts[:header_params] || {}
|
|
2004
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
2005
|
+
# HTTP header 'Accept' (if needed)
|
|
2006
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
2007
|
+
# HTTP header 'Content-Type'
|
|
2008
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
2009
|
+
if !content_type.nil?
|
|
2010
|
+
header_params['Content-Type'] = content_type
|
|
2011
|
+
end
|
|
2012
|
+
|
|
2013
|
+
# form parameters
|
|
2014
|
+
form_params = opts[:form_params] || {}
|
|
2015
|
+
|
|
2016
|
+
# http body (model)
|
|
2017
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(redirect_delete_request)
|
|
2018
|
+
|
|
2019
|
+
# return_type
|
|
2020
|
+
return_type = opts[:debug_return_type] || 'SfvbRedirectDeleteResponse'
|
|
2021
|
+
|
|
2022
|
+
# auth_names
|
|
2023
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
2024
|
+
|
|
2025
|
+
new_options = opts.merge(
|
|
2026
|
+
:operation => :"SfvbApi.dry_run_sfvb_redirect_delete",
|
|
2027
|
+
:header_params => header_params,
|
|
2028
|
+
:query_params => query_params,
|
|
2029
|
+
:form_params => form_params,
|
|
2030
|
+
:body => post_body,
|
|
2031
|
+
:auth_names => auth_names,
|
|
2032
|
+
:return_type => return_type
|
|
2033
|
+
)
|
|
2034
|
+
|
|
2035
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
2036
|
+
if @api_client.config.debugging
|
|
2037
|
+
@api_client.config.logger.debug "API called: SfvbApi#dry_run_sfvb_redirect_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2038
|
+
end
|
|
2039
|
+
return data, status_code, headers
|
|
2040
|
+
end
|
|
2041
|
+
|
|
1814
2042
|
# Check a redirect import without writing it
|
|
1815
2043
|
# Checks up to 5,000 rows against the existing rules and each other, and returns the findings per row with a plan_hash. Writes nothing. Rows are merged with the existing rules; nothing is ever deleted.
|
|
1816
2044
|
# @param storefront_oid [Integer]
|
|
@@ -2350,11 +2578,158 @@ module UltracartClient
|
|
|
2350
2578
|
return data, status_code, headers
|
|
2351
2579
|
end
|
|
2352
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
|
+
|
|
2353
2727
|
# End an experiment
|
|
2354
|
-
# 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).
|
|
2355
2729
|
# @param storefront_oid [Integer]
|
|
2356
2730
|
# @param experiment_oid [Integer]
|
|
2357
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.
|
|
2358
2733
|
# @option opts [SfvbExperimentEndRequest] :experiment_end_request The winner, if any
|
|
2359
2734
|
# @return [SfvbExperiment]
|
|
2360
2735
|
def end_sfvb_experiment(storefront_oid, experiment_oid, opts = {})
|
|
@@ -2363,10 +2738,11 @@ module UltracartClient
|
|
|
2363
2738
|
end
|
|
2364
2739
|
|
|
2365
2740
|
# End an experiment
|
|
2366
|
-
# 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.
|
|
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'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).
|
|
2367
2742
|
# @param storefront_oid [Integer]
|
|
2368
2743
|
# @param experiment_oid [Integer]
|
|
2369
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.
|
|
2370
2746
|
# @option opts [SfvbExperimentEndRequest] :experiment_end_request The winner, if any
|
|
2371
2747
|
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
2372
2748
|
def end_sfvb_experiment_with_http_info(storefront_oid, experiment_oid, opts = {})
|
|
@@ -2397,6 +2773,7 @@ module UltracartClient
|
|
|
2397
2773
|
if !content_type.nil?
|
|
2398
2774
|
header_params['Content-Type'] = content_type
|
|
2399
2775
|
end
|
|
2776
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
2400
2777
|
|
|
2401
2778
|
# form parameters
|
|
2402
2779
|
form_params = opts[:form_params] || {}
|
|
@@ -3481,18 +3858,161 @@ module UltracartClient
|
|
|
3481
3858
|
end
|
|
3482
3859
|
# verify the required parameter 'storefront_oid' is set
|
|
3483
3860
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3484
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_i18n_message"
|
|
3485
|
-
end
|
|
3486
|
-
# verify the required parameter 'key' is set
|
|
3487
|
-
if @api_client.config.client_side_validation && key.nil?
|
|
3488
|
-
fail ArgumentError, "Missing the required parameter 'key' when calling SfvbApi.get_sfvb_i18n_message"
|
|
3861
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_i18n_message"
|
|
3862
|
+
end
|
|
3863
|
+
# verify the required parameter 'key' is set
|
|
3864
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
3865
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling SfvbApi.get_sfvb_i18n_message"
|
|
3866
|
+
end
|
|
3867
|
+
# resource path
|
|
3868
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/i18n/messages/{key}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
|
3869
|
+
|
|
3870
|
+
# query parameters
|
|
3871
|
+
query_params = opts[:query_params] || {}
|
|
3872
|
+
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
3873
|
+
|
|
3874
|
+
# header parameters
|
|
3875
|
+
header_params = opts[:header_params] || {}
|
|
3876
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3877
|
+
# HTTP header 'Accept' (if needed)
|
|
3878
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3879
|
+
|
|
3880
|
+
# form parameters
|
|
3881
|
+
form_params = opts[:form_params] || {}
|
|
3882
|
+
|
|
3883
|
+
# http body (model)
|
|
3884
|
+
post_body = opts[:debug_body]
|
|
3885
|
+
|
|
3886
|
+
# return_type
|
|
3887
|
+
return_type = opts[:debug_return_type] || 'SfvbI18nMessage'
|
|
3888
|
+
|
|
3889
|
+
# auth_names
|
|
3890
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3891
|
+
|
|
3892
|
+
new_options = opts.merge(
|
|
3893
|
+
:operation => :"SfvbApi.get_sfvb_i18n_message",
|
|
3894
|
+
:header_params => header_params,
|
|
3895
|
+
:query_params => query_params,
|
|
3896
|
+
:form_params => form_params,
|
|
3897
|
+
:body => post_body,
|
|
3898
|
+
:auth_names => auth_names,
|
|
3899
|
+
:return_type => return_type
|
|
3900
|
+
)
|
|
3901
|
+
|
|
3902
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3903
|
+
if @api_client.config.debugging
|
|
3904
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_i18n_message\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3905
|
+
end
|
|
3906
|
+
return data, status_code, headers
|
|
3907
|
+
end
|
|
3908
|
+
|
|
3909
|
+
# Read where a message's translations come from
|
|
3910
|
+
# For one message, each enabled language's text and whether a shopper sees a hand translation, a machine translation, one still queued (pending) or none yet. Nothing is generated by reading it.
|
|
3911
|
+
# @param storefront_oid [Integer]
|
|
3912
|
+
# @param key [String]
|
|
3913
|
+
# @param [Hash] opts the optional parameters
|
|
3914
|
+
# @option opts [Integer] :theme_oid
|
|
3915
|
+
# @return [SfvbI18nMachineTranslationsResponse]
|
|
3916
|
+
def get_sfvb_i18n_message_machine_translations(storefront_oid, key, opts = {})
|
|
3917
|
+
data, _status_code, _headers = get_sfvb_i18n_message_machine_translations_with_http_info(storefront_oid, key, opts)
|
|
3918
|
+
data
|
|
3919
|
+
end
|
|
3920
|
+
|
|
3921
|
+
# Read where a message's translations come from
|
|
3922
|
+
# For one message, each enabled language's text and whether a shopper sees a hand translation, a machine translation, one still queued (pending) or none yet. Nothing is generated by reading it.
|
|
3923
|
+
# @param storefront_oid [Integer]
|
|
3924
|
+
# @param key [String]
|
|
3925
|
+
# @param [Hash] opts the optional parameters
|
|
3926
|
+
# @option opts [Integer] :theme_oid
|
|
3927
|
+
# @return [Array<(SfvbI18nMachineTranslationsResponse, Integer, Hash)>] SfvbI18nMachineTranslationsResponse data, response status code and response headers
|
|
3928
|
+
def get_sfvb_i18n_message_machine_translations_with_http_info(storefront_oid, key, opts = {})
|
|
3929
|
+
if @api_client.config.debugging
|
|
3930
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_i18n_message_machine_translations ...'
|
|
3931
|
+
end
|
|
3932
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3933
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3934
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_i18n_message_machine_translations"
|
|
3935
|
+
end
|
|
3936
|
+
# verify the required parameter 'key' is set
|
|
3937
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
3938
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling SfvbApi.get_sfvb_i18n_message_machine_translations"
|
|
3939
|
+
end
|
|
3940
|
+
# resource path
|
|
3941
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/i18n/messages/{key}/machine_translations'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
|
|
3942
|
+
|
|
3943
|
+
# query parameters
|
|
3944
|
+
query_params = opts[:query_params] || {}
|
|
3945
|
+
query_params[:'theme_oid'] = opts[:'theme_oid'] if !opts[:'theme_oid'].nil?
|
|
3946
|
+
|
|
3947
|
+
# header parameters
|
|
3948
|
+
header_params = opts[:header_params] || {}
|
|
3949
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3950
|
+
# HTTP header 'Accept' (if needed)
|
|
3951
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3952
|
+
|
|
3953
|
+
# form parameters
|
|
3954
|
+
form_params = opts[:form_params] || {}
|
|
3955
|
+
|
|
3956
|
+
# http body (model)
|
|
3957
|
+
post_body = opts[:debug_body]
|
|
3958
|
+
|
|
3959
|
+
# return_type
|
|
3960
|
+
return_type = opts[:debug_return_type] || 'SfvbI18nMachineTranslationsResponse'
|
|
3961
|
+
|
|
3962
|
+
# auth_names
|
|
3963
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3964
|
+
|
|
3965
|
+
new_options = opts.merge(
|
|
3966
|
+
:operation => :"SfvbApi.get_sfvb_i18n_message_machine_translations",
|
|
3967
|
+
:header_params => header_params,
|
|
3968
|
+
:query_params => query_params,
|
|
3969
|
+
:form_params => form_params,
|
|
3970
|
+
:body => post_body,
|
|
3971
|
+
:auth_names => auth_names,
|
|
3972
|
+
:return_type => return_type
|
|
3973
|
+
)
|
|
3974
|
+
|
|
3975
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3976
|
+
if @api_client.config.debugging
|
|
3977
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_i18n_message_machine_translations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3978
|
+
end
|
|
3979
|
+
return data, status_code, headers
|
|
3980
|
+
end
|
|
3981
|
+
|
|
3982
|
+
# Read an item's storefront facing content
|
|
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.
|
|
3984
|
+
# @param storefront_oid [Integer]
|
|
3985
|
+
# @param [Hash] opts the optional parameters
|
|
3986
|
+
# @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
|
|
3987
|
+
# @option opts [Integer] :merchant_item_oid The item oid. Send this or merchant_item_id, not both
|
|
3988
|
+
# @return [SfvbItemResponse]
|
|
3989
|
+
def get_sfvb_item(storefront_oid, opts = {})
|
|
3990
|
+
data, _status_code, _headers = get_sfvb_item_with_http_info(storefront_oid, opts)
|
|
3991
|
+
data
|
|
3992
|
+
end
|
|
3993
|
+
|
|
3994
|
+
# Read an item's storefront facing content
|
|
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.
|
|
3996
|
+
# @param storefront_oid [Integer]
|
|
3997
|
+
# @param [Hash] opts the optional parameters
|
|
3998
|
+
# @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
|
|
3999
|
+
# @option opts [Integer] :merchant_item_oid The item oid. Send this or merchant_item_id, not both
|
|
4000
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
4001
|
+
def get_sfvb_item_with_http_info(storefront_oid, opts = {})
|
|
4002
|
+
if @api_client.config.debugging
|
|
4003
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item ...'
|
|
4004
|
+
end
|
|
4005
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4006
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4007
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item"
|
|
3489
4008
|
end
|
|
3490
4009
|
# resource path
|
|
3491
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
4010
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3492
4011
|
|
|
3493
4012
|
# query parameters
|
|
3494
4013
|
query_params = opts[:query_params] || {}
|
|
3495
|
-
query_params[:'
|
|
4014
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
4015
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
3496
4016
|
|
|
3497
4017
|
# header parameters
|
|
3498
4018
|
header_params = opts[:header_params] || {}
|
|
@@ -3507,13 +4027,13 @@ module UltracartClient
|
|
|
3507
4027
|
post_body = opts[:debug_body]
|
|
3508
4028
|
|
|
3509
4029
|
# return_type
|
|
3510
|
-
return_type = opts[:debug_return_type] || '
|
|
4030
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
3511
4031
|
|
|
3512
4032
|
# auth_names
|
|
3513
4033
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3514
4034
|
|
|
3515
4035
|
new_options = opts.merge(
|
|
3516
|
-
:operation => :"SfvbApi.
|
|
4036
|
+
:operation => :"SfvbApi.get_sfvb_item",
|
|
3517
4037
|
:header_params => header_params,
|
|
3518
4038
|
:query_params => query_params,
|
|
3519
4039
|
:form_params => form_params,
|
|
@@ -3524,48 +4044,45 @@ module UltracartClient
|
|
|
3524
4044
|
|
|
3525
4045
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3526
4046
|
if @api_client.config.debugging
|
|
3527
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
4047
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3528
4048
|
end
|
|
3529
4049
|
return data, status_code, headers
|
|
3530
4050
|
end
|
|
3531
4051
|
|
|
3532
|
-
# Read
|
|
3533
|
-
#
|
|
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.
|
|
3534
4054
|
# @param storefront_oid [Integer]
|
|
3535
|
-
# @param key [String]
|
|
3536
4055
|
# @param [Hash] opts the optional parameters
|
|
3537
|
-
# @option opts [
|
|
3538
|
-
# @
|
|
3539
|
-
|
|
3540
|
-
|
|
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)
|
|
3541
4061
|
data
|
|
3542
4062
|
end
|
|
3543
4063
|
|
|
3544
|
-
# Read
|
|
3545
|
-
#
|
|
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.
|
|
3546
4066
|
# @param storefront_oid [Integer]
|
|
3547
|
-
# @param key [String]
|
|
3548
4067
|
# @param [Hash] opts the optional parameters
|
|
3549
|
-
# @option opts [
|
|
3550
|
-
# @
|
|
3551
|
-
|
|
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 = {})
|
|
3552
4072
|
if @api_client.config.debugging
|
|
3553
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
4073
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_pricing ...'
|
|
3554
4074
|
end
|
|
3555
4075
|
# verify the required parameter 'storefront_oid' is set
|
|
3556
4076
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3557
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
3558
|
-
end
|
|
3559
|
-
# verify the required parameter 'key' is set
|
|
3560
|
-
if @api_client.config.client_side_validation && key.nil?
|
|
3561
|
-
fail ArgumentError, "Missing the required parameter 'key' when calling SfvbApi.get_sfvb_i18n_message_machine_translations"
|
|
4077
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_pricing"
|
|
3562
4078
|
end
|
|
3563
4079
|
# resource path
|
|
3564
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
4080
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/pricing'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3565
4081
|
|
|
3566
4082
|
# query parameters
|
|
3567
4083
|
query_params = opts[:query_params] || {}
|
|
3568
|
-
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?
|
|
3569
4086
|
|
|
3570
4087
|
# header parameters
|
|
3571
4088
|
header_params = opts[:header_params] || {}
|
|
@@ -3580,13 +4097,13 @@ module UltracartClient
|
|
|
3580
4097
|
post_body = opts[:debug_body]
|
|
3581
4098
|
|
|
3582
4099
|
# return_type
|
|
3583
|
-
return_type = opts[:debug_return_type] || '
|
|
4100
|
+
return_type = opts[:debug_return_type] || 'SfvbItemPricing'
|
|
3584
4101
|
|
|
3585
4102
|
# auth_names
|
|
3586
4103
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3587
4104
|
|
|
3588
4105
|
new_options = opts.merge(
|
|
3589
|
-
:operation => :"SfvbApi.
|
|
4106
|
+
:operation => :"SfvbApi.get_sfvb_item_pricing",
|
|
3590
4107
|
:header_params => header_params,
|
|
3591
4108
|
:query_params => query_params,
|
|
3592
4109
|
:form_params => form_params,
|
|
@@ -3597,40 +4114,40 @@ module UltracartClient
|
|
|
3597
4114
|
|
|
3598
4115
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3599
4116
|
if @api_client.config.debugging
|
|
3600
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
4117
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_pricing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3601
4118
|
end
|
|
3602
4119
|
return data, status_code, headers
|
|
3603
4120
|
end
|
|
3604
4121
|
|
|
3605
|
-
# Read an item's
|
|
3606
|
-
#
|
|
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.
|
|
3607
4124
|
# @param storefront_oid [Integer]
|
|
3608
4125
|
# @param [Hash] opts the optional parameters
|
|
3609
|
-
# @option opts [String] :merchant_item_id
|
|
3610
|
-
# @option opts [Integer] :merchant_item_oid
|
|
3611
|
-
# @return [
|
|
3612
|
-
def
|
|
3613
|
-
data, _status_code, _headers =
|
|
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)
|
|
3614
4131
|
data
|
|
3615
4132
|
end
|
|
3616
4133
|
|
|
3617
|
-
# Read an item's
|
|
3618
|
-
#
|
|
4134
|
+
# Read an item's related items
|
|
4135
|
+
# 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.
|
|
3619
4136
|
# @param storefront_oid [Integer]
|
|
3620
4137
|
# @param [Hash] opts the optional parameters
|
|
3621
|
-
# @option opts [String] :merchant_item_id
|
|
3622
|
-
# @option opts [Integer] :merchant_item_oid
|
|
3623
|
-
# @return [Array<(
|
|
3624
|
-
def
|
|
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 = {})
|
|
3625
4142
|
if @api_client.config.debugging
|
|
3626
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
4143
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_related ...'
|
|
3627
4144
|
end
|
|
3628
4145
|
# verify the required parameter 'storefront_oid' is set
|
|
3629
4146
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3630
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
4147
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_related"
|
|
3631
4148
|
end
|
|
3632
4149
|
# resource path
|
|
3633
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/items'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4150
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/related'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3634
4151
|
|
|
3635
4152
|
# query parameters
|
|
3636
4153
|
query_params = opts[:query_params] || {}
|
|
@@ -3650,13 +4167,13 @@ module UltracartClient
|
|
|
3650
4167
|
post_body = opts[:debug_body]
|
|
3651
4168
|
|
|
3652
4169
|
# return_type
|
|
3653
|
-
return_type = opts[:debug_return_type] || '
|
|
4170
|
+
return_type = opts[:debug_return_type] || 'SfvbItemRelated'
|
|
3654
4171
|
|
|
3655
4172
|
# auth_names
|
|
3656
4173
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3657
4174
|
|
|
3658
4175
|
new_options = opts.merge(
|
|
3659
|
-
:operation => :"SfvbApi.
|
|
4176
|
+
:operation => :"SfvbApi.get_sfvb_item_related",
|
|
3660
4177
|
:header_params => header_params,
|
|
3661
4178
|
:query_params => query_params,
|
|
3662
4179
|
:form_params => form_params,
|
|
@@ -3667,7 +4184,7 @@ module UltracartClient
|
|
|
3667
4184
|
|
|
3668
4185
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3669
4186
|
if @api_client.config.debugging
|
|
3670
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
4187
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_related\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3671
4188
|
end
|
|
3672
4189
|
return data, status_code, headers
|
|
3673
4190
|
end
|
|
@@ -5850,7 +6367,7 @@ module UltracartClient
|
|
|
5850
6367
|
end
|
|
5851
6368
|
|
|
5852
6369
|
# Request a human approval
|
|
5853
|
-
# Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
|
|
6370
|
+
# Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart's scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
|
|
5854
6371
|
# @param approval_request [SfvbApprovalCreateRequest] The request
|
|
5855
6372
|
# @param [Hash] opts the optional parameters
|
|
5856
6373
|
# @option opts [Integer] :storefront_oid The storefront the action runs on. Required for storefront actions, left out for account-wide ones.
|
|
@@ -5861,7 +6378,7 @@ module UltracartClient
|
|
|
5861
6378
|
end
|
|
5862
6379
|
|
|
5863
6380
|
# Request a human approval
|
|
5864
|
-
# Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow.
|
|
6381
|
+
# Asks the person who signed in the CLI to approve one gated action on one exact target. Name the storefront with the storefront_oid query parameter. The target is checked the way the action will check it, so nobody is asked to approve a call that would fail. Show the person approval_url and user_code, poll GET approvals/{approval_id} every interval_seconds, and once it is approved repeat the gated call with the approval_id in the Approval-Id header. Asking again for the same thing returns the pending request (200) rather than a new one (201). A request lapses after 10 minutes. Requires a token that resolves to a user, so use the device authorization flow. For file.put_script send the script as content, or params.version for a revert. The request starts as reviewing while UltraCart's scanner and two AI models read it, then becomes pending with the review attached, or refused. Keep polling, and show approval_url only once it is pending. Only the hash is kept, so the write must send the same bytes.
|
|
5865
6382
|
# @param approval_request [SfvbApprovalCreateRequest] The request
|
|
5866
6383
|
# @param [Hash] opts the optional parameters
|
|
5867
6384
|
# @option opts [Integer] :storefront_oid The storefront the action runs on. Required for storefront actions, left out for account-wide ones.
|
|
@@ -6147,7 +6664,7 @@ module UltracartClient
|
|
|
6147
6664
|
end
|
|
6148
6665
|
|
|
6149
6666
|
# Create an upsell offer
|
|
6150
|
-
# 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.
|
|
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.
|
|
6151
6668
|
# @param storefront_oid [Integer]
|
|
6152
6669
|
# @param upsell_offer [SfvbUpsellOffer] The offer to create
|
|
6153
6670
|
# @param [Hash] opts the optional parameters
|
|
@@ -6158,7 +6675,7 @@ module UltracartClient
|
|
|
6158
6675
|
end
|
|
6159
6676
|
|
|
6160
6677
|
# Create an upsell offer
|
|
6161
|
-
# 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.
|
|
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.
|
|
6162
6679
|
# @param storefront_oid [Integer]
|
|
6163
6680
|
# @param upsell_offer [SfvbUpsellOffer] The offer to create
|
|
6164
6681
|
# @param [Hash] opts the optional parameters
|
|
@@ -6222,7 +6739,7 @@ module UltracartClient
|
|
|
6222
6739
|
end
|
|
6223
6740
|
|
|
6224
6741
|
# Create an upsell path
|
|
6225
|
-
# 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.
|
|
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.
|
|
6226
6743
|
# @param storefront_oid [Integer]
|
|
6227
6744
|
# @param upsell_path [SfvbUpsellPath] The path to create
|
|
6228
6745
|
# @param [Hash] opts the optional parameters
|
|
@@ -6233,7 +6750,7 @@ module UltracartClient
|
|
|
6233
6750
|
end
|
|
6234
6751
|
|
|
6235
6752
|
# Create an upsell path
|
|
6236
|
-
# 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.
|
|
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.
|
|
6237
6754
|
# @param storefront_oid [Integer]
|
|
6238
6755
|
# @param upsell_path [SfvbUpsellPath] The path to create
|
|
6239
6756
|
# @param [Hash] opts the optional parameters
|
|
@@ -7875,6 +8392,7 @@ module UltracartClient
|
|
|
7875
8392
|
# @param file_write_request [SfvbFileWriteRequest] File content to write
|
|
7876
8393
|
# @param [Hash] opts the optional parameters
|
|
7877
8394
|
# @option opts [String] :path
|
|
8395
|
+
# @option opts [String] :approval_id For a .js or .mjs file, the approval_id of an approved file.put_script request for exactly these bytes. Required for scripts. See POST /sfvb/approvals.
|
|
7878
8396
|
# @return [SfvbFileWriteResponse]
|
|
7879
8397
|
def put_sfvb_file_content(storefront_oid, if_match, file_write_request, opts = {})
|
|
7880
8398
|
data, _status_code, _headers = put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts)
|
|
@@ -7888,6 +8406,7 @@ module UltracartClient
|
|
|
7888
8406
|
# @param file_write_request [SfvbFileWriteRequest] File content to write
|
|
7889
8407
|
# @param [Hash] opts the optional parameters
|
|
7890
8408
|
# @option opts [String] :path
|
|
8409
|
+
# @option opts [String] :approval_id For a .js or .mjs file, the approval_id of an approved file.put_script request for exactly these bytes. Required for scripts. See POST /sfvb/approvals.
|
|
7891
8410
|
# @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
|
|
7892
8411
|
def put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts = {})
|
|
7893
8412
|
if @api_client.config.debugging
|
|
@@ -7923,6 +8442,7 @@ module UltracartClient
|
|
|
7923
8442
|
header_params['Content-Type'] = content_type
|
|
7924
8443
|
end
|
|
7925
8444
|
header_params[:'If-Match'] = if_match
|
|
8445
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
7926
8446
|
|
|
7927
8447
|
# form parameters
|
|
7928
8448
|
form_params = opts[:form_params] || {}
|
|
@@ -8365,6 +8885,185 @@ module UltracartClient
|
|
|
8365
8885
|
return data, status_code, headers
|
|
8366
8886
|
end
|
|
8367
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's related items
|
|
8994
|
+
# 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.
|
|
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
|
+
|
|
8368
9067
|
# Change an item's search metadata
|
|
8369
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.
|
|
8370
9069
|
# @param storefront_oid [Integer]
|
|
@@ -9884,6 +10583,7 @@ module UltracartClient
|
|
|
9884
10583
|
# @param if_match [String] Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
|
|
9885
10584
|
# @param file_revert_request [SfvbFileRevertRequest] Version to revert the file to
|
|
9886
10585
|
# @param [Hash] opts the optional parameters
|
|
10586
|
+
# @option opts [String] :approval_id For a .js or .mjs file, the approval_id of an approved file.put_script request naming this version. Required for scripts. See POST /sfvb/approvals.
|
|
9887
10587
|
# @return [SfvbFileWriteResponse]
|
|
9888
10588
|
def revert_sfvb_file(storefront_oid, if_match, file_revert_request, opts = {})
|
|
9889
10589
|
data, _status_code, _headers = revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts)
|
|
@@ -9896,6 +10596,7 @@ module UltracartClient
|
|
|
9896
10596
|
# @param if_match [String] Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
|
|
9897
10597
|
# @param file_revert_request [SfvbFileRevertRequest] Version to revert the file to
|
|
9898
10598
|
# @param [Hash] opts the optional parameters
|
|
10599
|
+
# @option opts [String] :approval_id For a .js or .mjs file, the approval_id of an approved file.put_script request naming this version. Required for scripts. See POST /sfvb/approvals.
|
|
9899
10600
|
# @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
|
|
9900
10601
|
def revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts = {})
|
|
9901
10602
|
if @api_client.config.debugging
|
|
@@ -9930,6 +10631,7 @@ module UltracartClient
|
|
|
9930
10631
|
header_params['Content-Type'] = content_type
|
|
9931
10632
|
end
|
|
9932
10633
|
header_params[:'If-Match'] = if_match
|
|
10634
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
9933
10635
|
|
|
9934
10636
|
# form parameters
|
|
9935
10637
|
form_params = opts[:form_params] || {}
|
|
@@ -10281,10 +10983,11 @@ module UltracartClient
|
|
|
10281
10983
|
end
|
|
10282
10984
|
|
|
10283
10985
|
# Start an experiment
|
|
10284
|
-
# 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).
|
|
10285
10987
|
# @param storefront_oid [Integer]
|
|
10286
10988
|
# @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
|
|
10287
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.
|
|
10288
10991
|
# @return [SfvbExperiment]
|
|
10289
10992
|
def start_sfvb_experiment(storefront_oid, experiment_start_request, opts = {})
|
|
10290
10993
|
data, _status_code, _headers = start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts)
|
|
@@ -10292,10 +10995,11 @@ module UltracartClient
|
|
|
10292
10995
|
end
|
|
10293
10996
|
|
|
10294
10997
|
# Start an experiment
|
|
10295
|
-
# 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.
|
|
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'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).
|
|
10296
10999
|
# @param storefront_oid [Integer]
|
|
10297
11000
|
# @param experiment_start_request [SfvbExperimentStartRequest] The experiment to start
|
|
10298
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.
|
|
10299
11003
|
# @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
|
|
10300
11004
|
def start_sfvb_experiment_with_http_info(storefront_oid, experiment_start_request, opts = {})
|
|
10301
11005
|
if @api_client.config.debugging
|
|
@@ -10325,6 +11029,7 @@ module UltracartClient
|
|
|
10325
11029
|
if !content_type.nil?
|
|
10326
11030
|
header_params['Content-Type'] = content_type
|
|
10327
11031
|
end
|
|
11032
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
10328
11033
|
|
|
10329
11034
|
# form parameters
|
|
10330
11035
|
form_params = opts[:form_params] || {}
|
|
@@ -10356,7 +11061,7 @@ module UltracartClient
|
|
|
10356
11061
|
end
|
|
10357
11062
|
|
|
10358
11063
|
# Unarchive an upsell path
|
|
10359
|
-
# Brings the path back into the default list.
|
|
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.
|
|
10360
11065
|
# @param storefront_oid [Integer]
|
|
10361
11066
|
# @param upsell_path_oid [Integer]
|
|
10362
11067
|
# @param [Hash] opts the optional parameters
|
|
@@ -10367,7 +11072,7 @@ module UltracartClient
|
|
|
10367
11072
|
end
|
|
10368
11073
|
|
|
10369
11074
|
# Unarchive an upsell path
|
|
10370
|
-
# Brings the path back into the default list.
|
|
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.
|
|
10371
11076
|
# @param storefront_oid [Integer]
|
|
10372
11077
|
# @param upsell_path_oid [Integer]
|
|
10373
11078
|
# @param [Hash] opts the optional parameters
|
|
@@ -10803,6 +11508,84 @@ module UltracartClient
|
|
|
10803
11508
|
return data, status_code, headers
|
|
10804
11509
|
end
|
|
10805
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'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'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
|
+
|
|
10806
11589
|
# Update a library entry's draft
|
|
10807
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.
|
|
10808
11591
|
# @param storefront_oid [Integer]
|
|
@@ -10980,7 +11763,7 @@ module UltracartClient
|
|
|
10980
11763
|
end
|
|
10981
11764
|
|
|
10982
11765
|
# Update an upsell offer
|
|
10983
|
-
# 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,
|
|
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.
|
|
10984
11767
|
# @param storefront_oid [Integer]
|
|
10985
11768
|
# @param upsell_offer_oid [Integer]
|
|
10986
11769
|
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
@@ -10993,7 +11776,7 @@ module UltracartClient
|
|
|
10993
11776
|
end
|
|
10994
11777
|
|
|
10995
11778
|
# Update an upsell offer
|
|
10996
|
-
# 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,
|
|
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's screenshots, are kept.
|
|
10997
11780
|
# @param storefront_oid [Integer]
|
|
10998
11781
|
# @param upsell_offer_oid [Integer]
|
|
10999
11782
|
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
@@ -11068,7 +11851,7 @@ module UltracartClient
|
|
|
11068
11851
|
end
|
|
11069
11852
|
|
|
11070
11853
|
# Update an upsell path
|
|
11071
|
-
# 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
|
|
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.
|
|
11072
11855
|
# @param storefront_oid [Integer]
|
|
11073
11856
|
# @param upsell_path_oid [Integer]
|
|
11074
11857
|
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
@@ -11081,7 +11864,7 @@ module UltracartClient
|
|
|
11081
11864
|
end
|
|
11082
11865
|
|
|
11083
11866
|
# Update an upsell path
|
|
11084
|
-
# 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
|
|
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.
|
|
11085
11868
|
# @param storefront_oid [Integer]
|
|
11086
11869
|
# @param upsell_path_oid [Integer]
|
|
11087
11870
|
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|