ultracart_api 4.1.237 → 4.1.238
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 +14 -2
- data/docs/SfvbApi.md +229 -0
- data/docs/SfvbApprovalCreateRequest.md +4 -0
- data/docs/SfvbItemPreorder.md +36 -0
- data/docs/SfvbItemPreorderChange.md +24 -0
- data/docs/SfvbItemPreorderChildRow.md +20 -0
- data/docs/SfvbItemPreorderChildrenRequest.md +24 -0
- data/docs/SfvbItemPreorderListResponse.md +20 -0
- data/docs/SfvbItemPreorderOption.md +20 -0
- data/docs/SfvbItemPreorderRequest.md +22 -0
- data/docs/SfvbWhoamiResponse.md +4 -0
- data/docs/TaxJarConfig.md +2 -0
- data/lib/ultracart_api/api/sfvb_api.rb +315 -0
- data/lib/ultracart_api/models/sfvb_approval_create_request.rb +21 -3
- data/lib/ultracart_api/models/sfvb_item_preorder.rb +347 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_change.rb +250 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_child_row.rb +230 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_children_request.rb +252 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_list_response.rb +231 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_option.rb +230 -0
- data/lib/ultracart_api/models/sfvb_item_preorder_request.rb +240 -0
- data/lib/ultracart_api/models/sfvb_whoami_response.rb +21 -1
- data/lib/ultracart_api/models/tax_jar_config.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +7 -0
- metadata +15 -1
|
@@ -7948,6 +7948,146 @@ module UltracartClient
|
|
|
7948
7948
|
return data, status_code, headers
|
|
7949
7949
|
end
|
|
7950
7950
|
|
|
7951
|
+
# Read an item's pre-order flag and ETA
|
|
7952
|
+
# Whether the item is on pre-order, its ETA, and what itempreorder shows shoppers because of them, with a hash_sha256 to send as If-Match when changing them. A variation is an item of its own and can be read here; read a parent's variations together with GET items/preorder/children. Address by merchant_item_id or merchant_item_oid.
|
|
7953
|
+
# @param storefront_oid [Integer]
|
|
7954
|
+
# @param [Hash] opts the optional parameters
|
|
7955
|
+
# @option opts [String] :merchant_item_id
|
|
7956
|
+
# @option opts [Integer] :merchant_item_oid
|
|
7957
|
+
# @return [SfvbItemPreorder]
|
|
7958
|
+
def get_sfvb_item_preorder(storefront_oid, opts = {})
|
|
7959
|
+
data, _status_code, _headers = get_sfvb_item_preorder_with_http_info(storefront_oid, opts)
|
|
7960
|
+
data
|
|
7961
|
+
end
|
|
7962
|
+
|
|
7963
|
+
# Read an item's pre-order flag and ETA
|
|
7964
|
+
# Whether the item is on pre-order, its ETA, and what itempreorder shows shoppers because of them, with a hash_sha256 to send as If-Match when changing them. A variation is an item of its own and can be read here; read a parent's variations together with GET items/preorder/children. Address by merchant_item_id or merchant_item_oid.
|
|
7965
|
+
# @param storefront_oid [Integer]
|
|
7966
|
+
# @param [Hash] opts the optional parameters
|
|
7967
|
+
# @option opts [String] :merchant_item_id
|
|
7968
|
+
# @option opts [Integer] :merchant_item_oid
|
|
7969
|
+
# @return [Array<(SfvbItemPreorder, Integer, Hash)>] SfvbItemPreorder data, response status code and response headers
|
|
7970
|
+
def get_sfvb_item_preorder_with_http_info(storefront_oid, opts = {})
|
|
7971
|
+
if @api_client.config.debugging
|
|
7972
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_preorder ...'
|
|
7973
|
+
end
|
|
7974
|
+
# verify the required parameter 'storefront_oid' is set
|
|
7975
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
7976
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_preorder"
|
|
7977
|
+
end
|
|
7978
|
+
# resource path
|
|
7979
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/preorder'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
7980
|
+
|
|
7981
|
+
# query parameters
|
|
7982
|
+
query_params = opts[:query_params] || {}
|
|
7983
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
7984
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
7985
|
+
|
|
7986
|
+
# header parameters
|
|
7987
|
+
header_params = opts[:header_params] || {}
|
|
7988
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
7989
|
+
# HTTP header 'Accept' (if needed)
|
|
7990
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
7991
|
+
|
|
7992
|
+
# form parameters
|
|
7993
|
+
form_params = opts[:form_params] || {}
|
|
7994
|
+
|
|
7995
|
+
# http body (model)
|
|
7996
|
+
post_body = opts[:debug_body]
|
|
7997
|
+
|
|
7998
|
+
# return_type
|
|
7999
|
+
return_type = opts[:debug_return_type] || 'SfvbItemPreorder'
|
|
8000
|
+
|
|
8001
|
+
# auth_names
|
|
8002
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8003
|
+
|
|
8004
|
+
new_options = opts.merge(
|
|
8005
|
+
:operation => :"SfvbApi.get_sfvb_item_preorder",
|
|
8006
|
+
:header_params => header_params,
|
|
8007
|
+
:query_params => query_params,
|
|
8008
|
+
:form_params => form_params,
|
|
8009
|
+
:body => post_body,
|
|
8010
|
+
:auth_names => auth_names,
|
|
8011
|
+
:return_type => return_type
|
|
8012
|
+
)
|
|
8013
|
+
|
|
8014
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8015
|
+
if @api_client.config.debugging
|
|
8016
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_preorder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8017
|
+
end
|
|
8018
|
+
return data, status_code, headers
|
|
8019
|
+
end
|
|
8020
|
+
|
|
8021
|
+
# Read the pre-order flag and ETA of a parent item's variations
|
|
8022
|
+
# The parent's own values and each variation's, with the option values that pick it (such as Size 2T) and its hash_sha256 to send when changing it. Read fresh, never from a cache. Address the parent by merchant_item_id or merchant_item_oid.
|
|
8023
|
+
# @param storefront_oid [Integer]
|
|
8024
|
+
# @param [Hash] opts the optional parameters
|
|
8025
|
+
# @option opts [String] :merchant_item_id
|
|
8026
|
+
# @option opts [Integer] :merchant_item_oid
|
|
8027
|
+
# @return [SfvbItemPreorderListResponse]
|
|
8028
|
+
def get_sfvb_item_preorder_children(storefront_oid, opts = {})
|
|
8029
|
+
data, _status_code, _headers = get_sfvb_item_preorder_children_with_http_info(storefront_oid, opts)
|
|
8030
|
+
data
|
|
8031
|
+
end
|
|
8032
|
+
|
|
8033
|
+
# Read the pre-order flag and ETA of a parent item's variations
|
|
8034
|
+
# The parent's own values and each variation's, with the option values that pick it (such as Size 2T) and its hash_sha256 to send when changing it. Read fresh, never from a cache. Address the parent by merchant_item_id or merchant_item_oid.
|
|
8035
|
+
# @param storefront_oid [Integer]
|
|
8036
|
+
# @param [Hash] opts the optional parameters
|
|
8037
|
+
# @option opts [String] :merchant_item_id
|
|
8038
|
+
# @option opts [Integer] :merchant_item_oid
|
|
8039
|
+
# @return [Array<(SfvbItemPreorderListResponse, Integer, Hash)>] SfvbItemPreorderListResponse data, response status code and response headers
|
|
8040
|
+
def get_sfvb_item_preorder_children_with_http_info(storefront_oid, opts = {})
|
|
8041
|
+
if @api_client.config.debugging
|
|
8042
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_preorder_children ...'
|
|
8043
|
+
end
|
|
8044
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8045
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8046
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_preorder_children"
|
|
8047
|
+
end
|
|
8048
|
+
# resource path
|
|
8049
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/preorder/children'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8050
|
+
|
|
8051
|
+
# query parameters
|
|
8052
|
+
query_params = opts[:query_params] || {}
|
|
8053
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
8054
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
8055
|
+
|
|
8056
|
+
# header parameters
|
|
8057
|
+
header_params = opts[:header_params] || {}
|
|
8058
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8059
|
+
# HTTP header 'Accept' (if needed)
|
|
8060
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8061
|
+
|
|
8062
|
+
# form parameters
|
|
8063
|
+
form_params = opts[:form_params] || {}
|
|
8064
|
+
|
|
8065
|
+
# http body (model)
|
|
8066
|
+
post_body = opts[:debug_body]
|
|
8067
|
+
|
|
8068
|
+
# return_type
|
|
8069
|
+
return_type = opts[:debug_return_type] || 'SfvbItemPreorderListResponse'
|
|
8070
|
+
|
|
8071
|
+
# auth_names
|
|
8072
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8073
|
+
|
|
8074
|
+
new_options = opts.merge(
|
|
8075
|
+
:operation => :"SfvbApi.get_sfvb_item_preorder_children",
|
|
8076
|
+
:header_params => header_params,
|
|
8077
|
+
:query_params => query_params,
|
|
8078
|
+
:form_params => form_params,
|
|
8079
|
+
:body => post_body,
|
|
8080
|
+
:auth_names => auth_names,
|
|
8081
|
+
:return_type => return_type
|
|
8082
|
+
)
|
|
8083
|
+
|
|
8084
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8085
|
+
if @api_client.config.debugging
|
|
8086
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_preorder_children\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8087
|
+
end
|
|
8088
|
+
return data, status_code, headers
|
|
8089
|
+
end
|
|
8090
|
+
|
|
7951
8091
|
# Read what an item charges
|
|
7952
8092
|
# 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.
|
|
7953
8093
|
# @param storefront_oid [Integer]
|
|
@@ -15734,6 +15874,181 @@ module UltracartClient
|
|
|
15734
15874
|
return data, status_code, headers
|
|
15735
15875
|
end
|
|
15736
15876
|
|
|
15877
|
+
# Change an item's pre-order flag or ETA
|
|
15878
|
+
# Partial - a field left out is untouched, and nothing else on the item changes. eta is YYYY-MM-DD; clear_eta removes it. Needs sfvb_publish when items are live and If-Match with the hash_sha256 from the read. Putting the item on or off pre-order also needs the approval of the person who signed in the CLI - an approved item.preorder request for this item and exactly this change - because a pre-order item can be ordered while out of stock and its orders go to the Pre-ordered stage. An ETA-only change needs no approval. A change that sets every field to what it already is returns the item unchanged. The answer has the values before and after, what shoppers now see, and warnings such as an ETA in the past.
|
|
15879
|
+
# @param storefront_oid [Integer]
|
|
15880
|
+
# @param if_match [String] hash_sha256 from the pre-order read. Required; 428 when absent, 412 when stale.
|
|
15881
|
+
# @param item_preorder_request [SfvbItemPreorderRequest] The change
|
|
15882
|
+
# @param [Hash] opts the optional parameters
|
|
15883
|
+
# @option opts [String] :merchant_item_id
|
|
15884
|
+
# @option opts [Integer] :merchant_item_oid
|
|
15885
|
+
# @option opts [String] :approval_id The approval_id of an approved item.preorder request for this item and change. Required when the change puts the item on or off pre-order. See POST /sfvb/approvals.
|
|
15886
|
+
# @return [SfvbItemPreorder]
|
|
15887
|
+
def put_sfvb_item_preorder(storefront_oid, if_match, item_preorder_request, opts = {})
|
|
15888
|
+
data, _status_code, _headers = put_sfvb_item_preorder_with_http_info(storefront_oid, if_match, item_preorder_request, opts)
|
|
15889
|
+
data
|
|
15890
|
+
end
|
|
15891
|
+
|
|
15892
|
+
# Change an item's pre-order flag or ETA
|
|
15893
|
+
# Partial - a field left out is untouched, and nothing else on the item changes. eta is YYYY-MM-DD; clear_eta removes it. Needs sfvb_publish when items are live and If-Match with the hash_sha256 from the read. Putting the item on or off pre-order also needs the approval of the person who signed in the CLI - an approved item.preorder request for this item and exactly this change - because a pre-order item can be ordered while out of stock and its orders go to the Pre-ordered stage. An ETA-only change needs no approval. A change that sets every field to what it already is returns the item unchanged. The answer has the values before and after, what shoppers now see, and warnings such as an ETA in the past.
|
|
15894
|
+
# @param storefront_oid [Integer]
|
|
15895
|
+
# @param if_match [String] hash_sha256 from the pre-order read. Required; 428 when absent, 412 when stale.
|
|
15896
|
+
# @param item_preorder_request [SfvbItemPreorderRequest] The change
|
|
15897
|
+
# @param [Hash] opts the optional parameters
|
|
15898
|
+
# @option opts [String] :merchant_item_id
|
|
15899
|
+
# @option opts [Integer] :merchant_item_oid
|
|
15900
|
+
# @option opts [String] :approval_id The approval_id of an approved item.preorder request for this item and change. Required when the change puts the item on or off pre-order. See POST /sfvb/approvals.
|
|
15901
|
+
# @return [Array<(SfvbItemPreorder, Integer, Hash)>] SfvbItemPreorder data, response status code and response headers
|
|
15902
|
+
def put_sfvb_item_preorder_with_http_info(storefront_oid, if_match, item_preorder_request, opts = {})
|
|
15903
|
+
if @api_client.config.debugging
|
|
15904
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_preorder ...'
|
|
15905
|
+
end
|
|
15906
|
+
# verify the required parameter 'storefront_oid' is set
|
|
15907
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
15908
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_preorder"
|
|
15909
|
+
end
|
|
15910
|
+
# verify the required parameter 'if_match' is set
|
|
15911
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
15912
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_item_preorder"
|
|
15913
|
+
end
|
|
15914
|
+
# verify the required parameter 'item_preorder_request' is set
|
|
15915
|
+
if @api_client.config.client_side_validation && item_preorder_request.nil?
|
|
15916
|
+
fail ArgumentError, "Missing the required parameter 'item_preorder_request' when calling SfvbApi.put_sfvb_item_preorder"
|
|
15917
|
+
end
|
|
15918
|
+
# resource path
|
|
15919
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/preorder'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
15920
|
+
|
|
15921
|
+
# query parameters
|
|
15922
|
+
query_params = opts[:query_params] || {}
|
|
15923
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
15924
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
15925
|
+
|
|
15926
|
+
# header parameters
|
|
15927
|
+
header_params = opts[:header_params] || {}
|
|
15928
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
15929
|
+
# HTTP header 'Accept' (if needed)
|
|
15930
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
15931
|
+
# HTTP header 'Content-Type'
|
|
15932
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
15933
|
+
if !content_type.nil?
|
|
15934
|
+
header_params['Content-Type'] = content_type
|
|
15935
|
+
end
|
|
15936
|
+
header_params[:'If-Match'] = if_match
|
|
15937
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
15938
|
+
|
|
15939
|
+
# form parameters
|
|
15940
|
+
form_params = opts[:form_params] || {}
|
|
15941
|
+
|
|
15942
|
+
# http body (model)
|
|
15943
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_preorder_request)
|
|
15944
|
+
|
|
15945
|
+
# return_type
|
|
15946
|
+
return_type = opts[:debug_return_type] || 'SfvbItemPreorder'
|
|
15947
|
+
|
|
15948
|
+
# auth_names
|
|
15949
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
15950
|
+
|
|
15951
|
+
new_options = opts.merge(
|
|
15952
|
+
:operation => :"SfvbApi.put_sfvb_item_preorder",
|
|
15953
|
+
:header_params => header_params,
|
|
15954
|
+
:query_params => query_params,
|
|
15955
|
+
:form_params => form_params,
|
|
15956
|
+
:body => post_body,
|
|
15957
|
+
:auth_names => auth_names,
|
|
15958
|
+
:return_type => return_type
|
|
15959
|
+
)
|
|
15960
|
+
|
|
15961
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
15962
|
+
if @api_client.config.debugging
|
|
15963
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_preorder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
15964
|
+
end
|
|
15965
|
+
return data, status_code, headers
|
|
15966
|
+
end
|
|
15967
|
+
|
|
15968
|
+
# Change the pre-order flag or ETA of several variations of one parent
|
|
15969
|
+
# The same change for each variation named, 1 to 100, by its merchant item id or by an option value only one variation has (such as 2T), each with the hash_sha256 from the children read. All or nothing - every row is checked before any variation is saved, and an unknown, ambiguous, repeated or stale row refuses the whole call. Putting any of them on or off pre-order needs one approved item.preorder request for the parent and exactly this change; an ETA-only change needs none. Needs sfvb_publish when items are live. Each variation is saved on its own, so if a save itself fails part way the error names the variations already saved.
|
|
15970
|
+
# @param storefront_oid [Integer]
|
|
15971
|
+
# @param item_preorder_children_request [SfvbItemPreorderChildrenRequest] The change and the variations
|
|
15972
|
+
# @param [Hash] opts the optional parameters
|
|
15973
|
+
# @option opts [String] :merchant_item_id
|
|
15974
|
+
# @option opts [Integer] :merchant_item_oid
|
|
15975
|
+
# @option opts [String] :approval_id The approval_id of an approved item.preorder request for the parent and this change. Required when the change puts any variation on or off pre-order. See POST /sfvb/approvals.
|
|
15976
|
+
# @return [SfvbItemPreorderListResponse]
|
|
15977
|
+
def put_sfvb_item_preorder_children(storefront_oid, item_preorder_children_request, opts = {})
|
|
15978
|
+
data, _status_code, _headers = put_sfvb_item_preorder_children_with_http_info(storefront_oid, item_preorder_children_request, opts)
|
|
15979
|
+
data
|
|
15980
|
+
end
|
|
15981
|
+
|
|
15982
|
+
# Change the pre-order flag or ETA of several variations of one parent
|
|
15983
|
+
# The same change for each variation named, 1 to 100, by its merchant item id or by an option value only one variation has (such as 2T), each with the hash_sha256 from the children read. All or nothing - every row is checked before any variation is saved, and an unknown, ambiguous, repeated or stale row refuses the whole call. Putting any of them on or off pre-order needs one approved item.preorder request for the parent and exactly this change; an ETA-only change needs none. Needs sfvb_publish when items are live. Each variation is saved on its own, so if a save itself fails part way the error names the variations already saved.
|
|
15984
|
+
# @param storefront_oid [Integer]
|
|
15985
|
+
# @param item_preorder_children_request [SfvbItemPreorderChildrenRequest] The change and the variations
|
|
15986
|
+
# @param [Hash] opts the optional parameters
|
|
15987
|
+
# @option opts [String] :merchant_item_id
|
|
15988
|
+
# @option opts [Integer] :merchant_item_oid
|
|
15989
|
+
# @option opts [String] :approval_id The approval_id of an approved item.preorder request for the parent and this change. Required when the change puts any variation on or off pre-order. See POST /sfvb/approvals.
|
|
15990
|
+
# @return [Array<(SfvbItemPreorderListResponse, Integer, Hash)>] SfvbItemPreorderListResponse data, response status code and response headers
|
|
15991
|
+
def put_sfvb_item_preorder_children_with_http_info(storefront_oid, item_preorder_children_request, opts = {})
|
|
15992
|
+
if @api_client.config.debugging
|
|
15993
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_preorder_children ...'
|
|
15994
|
+
end
|
|
15995
|
+
# verify the required parameter 'storefront_oid' is set
|
|
15996
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
15997
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_preorder_children"
|
|
15998
|
+
end
|
|
15999
|
+
# verify the required parameter 'item_preorder_children_request' is set
|
|
16000
|
+
if @api_client.config.client_side_validation && item_preorder_children_request.nil?
|
|
16001
|
+
fail ArgumentError, "Missing the required parameter 'item_preorder_children_request' when calling SfvbApi.put_sfvb_item_preorder_children"
|
|
16002
|
+
end
|
|
16003
|
+
# resource path
|
|
16004
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/preorder/children'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
16005
|
+
|
|
16006
|
+
# query parameters
|
|
16007
|
+
query_params = opts[:query_params] || {}
|
|
16008
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
16009
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
16010
|
+
|
|
16011
|
+
# header parameters
|
|
16012
|
+
header_params = opts[:header_params] || {}
|
|
16013
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
16014
|
+
# HTTP header 'Accept' (if needed)
|
|
16015
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
16016
|
+
# HTTP header 'Content-Type'
|
|
16017
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
16018
|
+
if !content_type.nil?
|
|
16019
|
+
header_params['Content-Type'] = content_type
|
|
16020
|
+
end
|
|
16021
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
16022
|
+
|
|
16023
|
+
# form parameters
|
|
16024
|
+
form_params = opts[:form_params] || {}
|
|
16025
|
+
|
|
16026
|
+
# http body (model)
|
|
16027
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_preorder_children_request)
|
|
16028
|
+
|
|
16029
|
+
# return_type
|
|
16030
|
+
return_type = opts[:debug_return_type] || 'SfvbItemPreorderListResponse'
|
|
16031
|
+
|
|
16032
|
+
# auth_names
|
|
16033
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
16034
|
+
|
|
16035
|
+
new_options = opts.merge(
|
|
16036
|
+
:operation => :"SfvbApi.put_sfvb_item_preorder_children",
|
|
16037
|
+
:header_params => header_params,
|
|
16038
|
+
:query_params => query_params,
|
|
16039
|
+
:form_params => form_params,
|
|
16040
|
+
:body => post_body,
|
|
16041
|
+
:auth_names => auth_names,
|
|
16042
|
+
:return_type => return_type
|
|
16043
|
+
)
|
|
16044
|
+
|
|
16045
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
16046
|
+
if @api_client.config.debugging
|
|
16047
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_preorder_children\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
16048
|
+
end
|
|
16049
|
+
return data, status_code, headers
|
|
16050
|
+
end
|
|
16051
|
+
|
|
15737
16052
|
# Change what an item charges
|
|
15738
16053
|
# 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.
|
|
15739
16054
|
# @param storefront_oid [Integer]
|
|
@@ -34,6 +34,10 @@ module UltracartClient
|
|
|
34
34
|
# For item.attribute_batch, exactly the rows the batch will send - the dry run's change rows, each with merchant_item_oid and current_sha256. UltraCart keeps only their hash.
|
|
35
35
|
attr_accessor :item_attribute_rows
|
|
36
36
|
|
|
37
|
+
attr_accessor :item_preorder
|
|
38
|
+
|
|
39
|
+
attr_accessor :item_preorder_children
|
|
40
|
+
|
|
37
41
|
attr_accessor :item_pricing
|
|
38
42
|
|
|
39
43
|
attr_accessor :params
|
|
@@ -89,6 +93,8 @@ module UltracartClient
|
|
|
89
93
|
:'experiment_start' => :'experiment_start',
|
|
90
94
|
:'flow_backfill' => :'flow_backfill',
|
|
91
95
|
:'item_attribute_rows' => :'item_attribute_rows',
|
|
96
|
+
:'item_preorder' => :'item_preorder',
|
|
97
|
+
:'item_preorder_children' => :'item_preorder_children',
|
|
92
98
|
:'item_pricing' => :'item_pricing',
|
|
93
99
|
:'params' => :'params',
|
|
94
100
|
:'postcard_test_mail' => :'postcard_test_mail',
|
|
@@ -118,6 +124,8 @@ module UltracartClient
|
|
|
118
124
|
:'experiment_start' => :'SfvbExperimentStartRequest',
|
|
119
125
|
:'flow_backfill' => :'SfvbFlowBackfillRequest',
|
|
120
126
|
:'item_attribute_rows' => :'Array<SfvbItemAttributeBatchRow>',
|
|
127
|
+
:'item_preorder' => :'SfvbItemPreorderRequest',
|
|
128
|
+
:'item_preorder_children' => :'SfvbItemPreorderChildrenRequest',
|
|
121
129
|
:'item_pricing' => :'SfvbItemPricingRequest',
|
|
122
130
|
:'params' => :'SfvbApprovalParams',
|
|
123
131
|
:'postcard_test_mail' => :'SfvbCommsTestPostcardRequest',
|
|
@@ -186,6 +194,14 @@ module UltracartClient
|
|
|
186
194
|
end
|
|
187
195
|
end
|
|
188
196
|
|
|
197
|
+
if attributes.key?(:'item_preorder')
|
|
198
|
+
self.item_preorder = attributes[:'item_preorder']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'item_preorder_children')
|
|
202
|
+
self.item_preorder_children = attributes[:'item_preorder_children']
|
|
203
|
+
end
|
|
204
|
+
|
|
189
205
|
if attributes.key?(:'item_pricing')
|
|
190
206
|
self.item_pricing = attributes[:'item_pricing']
|
|
191
207
|
end
|
|
@@ -239,7 +255,7 @@ module UltracartClient
|
|
|
239
255
|
# Check to see if the all the properties in the model are valid
|
|
240
256
|
# @return true if the model is valid
|
|
241
257
|
def valid?
|
|
242
|
-
action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
|
|
258
|
+
action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
|
|
243
259
|
return false unless action_validator.valid?(@action)
|
|
244
260
|
true
|
|
245
261
|
end
|
|
@@ -247,7 +263,7 @@ module UltracartClient
|
|
|
247
263
|
# Custom attribute writer method checking allowed values (enum).
|
|
248
264
|
# @param [Object] action Object to be assigned
|
|
249
265
|
def action=(action)
|
|
250
|
-
validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
|
|
266
|
+
validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
|
|
251
267
|
unless validator.valid?(action)
|
|
252
268
|
fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
|
|
253
269
|
end
|
|
@@ -267,6 +283,8 @@ module UltracartClient
|
|
|
267
283
|
experiment_start == o.experiment_start &&
|
|
268
284
|
flow_backfill == o.flow_backfill &&
|
|
269
285
|
item_attribute_rows == o.item_attribute_rows &&
|
|
286
|
+
item_preorder == o.item_preorder &&
|
|
287
|
+
item_preorder_children == o.item_preorder_children &&
|
|
270
288
|
item_pricing == o.item_pricing &&
|
|
271
289
|
params == o.params &&
|
|
272
290
|
postcard_test_mail == o.postcard_test_mail &&
|
|
@@ -288,7 +306,7 @@ module UltracartClient
|
|
|
288
306
|
# Calculates hash code according to all attributes.
|
|
289
307
|
# @return [Integer] Hash code
|
|
290
308
|
def hash
|
|
291
|
-
[action, affiliate_network, comms_list_import, comms_settings, content, experiment_start, flow_backfill, item_attribute_rows, item_pricing, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
|
|
309
|
+
[action, affiliate_network, comms_list_import, comms_settings, content, experiment_start, flow_backfill, item_attribute_rows, item_preorder, item_preorder_children, item_pricing, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
|
|
292
310
|
end
|
|
293
311
|
|
|
294
312
|
# Builds the object from hash
|