ultracart_api 4.1.201 → 4.1.203
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 +19 -2
- data/docs/OauthApi.md +1 -1
- data/docs/SfvbApi.md +378 -1
- data/docs/SfvbEvent.md +2 -2
- data/docs/SfvbItemMultimedia.md +9 -1
- data/docs/SfvbItemMultimediaDescriptionRequest.md +26 -0
- data/docs/SfvbSecretHandle.md +32 -0
- data/docs/SfvbSecretKind.md +30 -0
- data/docs/SfvbSecretKindsResponse.md +20 -0
- data/docs/SfvbSecretRequest.md +54 -0
- data/docs/SfvbSecretRequestCreate.md +30 -0
- data/docs/SfvbSecretRequestsResponse.md +18 -0
- data/docs/SfvbSecretSink.md +24 -0
- data/lib/ultracart_api/api/oauth_api.rb +2 -2
- data/lib/ultracart_api/api/sfvb_api.rb +460 -2
- data/lib/ultracart_api/models/sfvb_event.rb +2 -2
- data/lib/ultracart_api/models/sfvb_item_multimedia.rb +54 -2
- data/lib/ultracart_api/models/sfvb_item_multimedia_description_request.rb +260 -0
- data/lib/ultracart_api/models/sfvb_secret_handle.rb +324 -0
- data/lib/ultracart_api/models/sfvb_secret_kind.rb +280 -0
- data/lib/ultracart_api/models/sfvb_secret_kinds_response.rb +234 -0
- data/lib/ultracart_api/models/sfvb_secret_request.rb +440 -0
- data/lib/ultracart_api/models/sfvb_secret_request_create.rb +284 -0
- data/lib/ultracart_api/models/sfvb_secret_requests_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_secret_sink.rb +250 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
|
@@ -644,7 +644,7 @@ module UltracartClient
|
|
|
644
644
|
end
|
|
645
645
|
|
|
646
646
|
# One time link that opens a preview in a browser with no UltraCart login
|
|
647
|
-
# The preview URL only works in a browser already signed in to UltraCart on the storefront's own host, and an agent's built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use.
|
|
647
|
+
# The preview URL only works in a browser already signed in to UltraCart on the storefront's own host, and an agent's built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. With a preview session, pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Without one, the pages are the live content and carry no X-UltraCart-Preview header. Requires a token that resolves to a user, so use the device authorization flow.
|
|
648
648
|
# @param storefront_oid [Integer]
|
|
649
649
|
# @param [Hash] opts the optional parameters
|
|
650
650
|
# @option opts [SfvbPreviewAccessRequest] :preview_access What the browser should see
|
|
@@ -655,7 +655,7 @@ module UltracartClient
|
|
|
655
655
|
end
|
|
656
656
|
|
|
657
657
|
# One time link that opens a preview in a browser with no UltraCart login
|
|
658
|
-
# The preview URL only works in a browser already signed in to UltraCart on the storefront's own host, and an agent's built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use.
|
|
658
|
+
# The preview URL only works in a browser already signed in to UltraCart on the storefront's own host, and an agent's built in browser never is. This returns a single use access_url on the storefront host instead. Opening it gets past the storefront lock, shows the requested theme and applies the requested preview session for the rest of that browser session, then redirects to path. It expires two minutes after issue or on first use. With a preview session, pages opened afterwards carry an X-UltraCart-Preview header of applied or not-applied. Without one, the pages are the live content and carry no X-UltraCart-Preview header. Requires a token that resolves to a user, so use the device authorization flow.
|
|
659
659
|
# @param storefront_oid [Integer]
|
|
660
660
|
# @param [Hash] opts the optional parameters
|
|
661
661
|
# @option opts [SfvbPreviewAccessRequest] :preview_access What the browser should see
|
|
@@ -1524,6 +1524,70 @@ module UltracartClient
|
|
|
1524
1524
|
return data, status_code, headers
|
|
1525
1525
|
end
|
|
1526
1526
|
|
|
1527
|
+
# Cancel a pending secret request
|
|
1528
|
+
# Withdraws a request nobody has filled in yet, with its handles, which frees one of the five pending slots a sign-in has. A fulfilled request cannot be cancelled; revoke its handles instead.
|
|
1529
|
+
# @param request_id [String]
|
|
1530
|
+
# @param [Hash] opts the optional parameters
|
|
1531
|
+
# @return [SfvbSecretRequest]
|
|
1532
|
+
def delete_sfvb_secret_request(request_id, opts = {})
|
|
1533
|
+
data, _status_code, _headers = delete_sfvb_secret_request_with_http_info(request_id, opts)
|
|
1534
|
+
data
|
|
1535
|
+
end
|
|
1536
|
+
|
|
1537
|
+
# Cancel a pending secret request
|
|
1538
|
+
# Withdraws a request nobody has filled in yet, with its handles, which frees one of the five pending slots a sign-in has. A fulfilled request cannot be cancelled; revoke its handles instead.
|
|
1539
|
+
# @param request_id [String]
|
|
1540
|
+
# @param [Hash] opts the optional parameters
|
|
1541
|
+
# @return [Array<(SfvbSecretRequest, Integer, Hash)>] SfvbSecretRequest data, response status code and response headers
|
|
1542
|
+
def delete_sfvb_secret_request_with_http_info(request_id, opts = {})
|
|
1543
|
+
if @api_client.config.debugging
|
|
1544
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_secret_request ...'
|
|
1545
|
+
end
|
|
1546
|
+
# verify the required parameter 'request_id' is set
|
|
1547
|
+
if @api_client.config.client_side_validation && request_id.nil?
|
|
1548
|
+
fail ArgumentError, "Missing the required parameter 'request_id' when calling SfvbApi.delete_sfvb_secret_request"
|
|
1549
|
+
end
|
|
1550
|
+
# resource path
|
|
1551
|
+
local_var_path = '/sfvb/secrets/{request_id}'.sub('{' + 'request_id' + '}', CGI.escape(request_id.to_s))
|
|
1552
|
+
|
|
1553
|
+
# query parameters
|
|
1554
|
+
query_params = opts[:query_params] || {}
|
|
1555
|
+
|
|
1556
|
+
# header parameters
|
|
1557
|
+
header_params = opts[:header_params] || {}
|
|
1558
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1559
|
+
# HTTP header 'Accept' (if needed)
|
|
1560
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1561
|
+
|
|
1562
|
+
# form parameters
|
|
1563
|
+
form_params = opts[:form_params] || {}
|
|
1564
|
+
|
|
1565
|
+
# http body (model)
|
|
1566
|
+
post_body = opts[:debug_body]
|
|
1567
|
+
|
|
1568
|
+
# return_type
|
|
1569
|
+
return_type = opts[:debug_return_type] || 'SfvbSecretRequest'
|
|
1570
|
+
|
|
1571
|
+
# auth_names
|
|
1572
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1573
|
+
|
|
1574
|
+
new_options = opts.merge(
|
|
1575
|
+
:operation => :"SfvbApi.delete_sfvb_secret_request",
|
|
1576
|
+
:header_params => header_params,
|
|
1577
|
+
:query_params => query_params,
|
|
1578
|
+
:form_params => form_params,
|
|
1579
|
+
:body => post_body,
|
|
1580
|
+
:auth_names => auth_names,
|
|
1581
|
+
:return_type => return_type
|
|
1582
|
+
)
|
|
1583
|
+
|
|
1584
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1585
|
+
if @api_client.config.debugging
|
|
1586
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_secret_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1587
|
+
end
|
|
1588
|
+
return data, status_code, headers
|
|
1589
|
+
end
|
|
1590
|
+
|
|
1527
1591
|
# Detach an image from a blog post
|
|
1528
1592
|
# 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.
|
|
1529
1593
|
# @param storefront_oid [Integer]
|
|
@@ -5658,6 +5722,186 @@ module UltracartClient
|
|
|
5658
5722
|
return data, status_code, headers
|
|
5659
5723
|
end
|
|
5660
5724
|
|
|
5725
|
+
# List the secrets this server collects
|
|
5726
|
+
# The kinds of secret value, with what each looks like, and the secret fields (sinks) a handle can be written to. Request a handle for a sink with POST secrets.
|
|
5727
|
+
# @param [Hash] opts the optional parameters
|
|
5728
|
+
# @return [SfvbSecretKindsResponse]
|
|
5729
|
+
def get_sfvb_secret_kinds(opts = {})
|
|
5730
|
+
data, _status_code, _headers = get_sfvb_secret_kinds_with_http_info(opts)
|
|
5731
|
+
data
|
|
5732
|
+
end
|
|
5733
|
+
|
|
5734
|
+
# List the secrets this server collects
|
|
5735
|
+
# The kinds of secret value, with what each looks like, and the secret fields (sinks) a handle can be written to. Request a handle for a sink with POST secrets.
|
|
5736
|
+
# @param [Hash] opts the optional parameters
|
|
5737
|
+
# @return [Array<(SfvbSecretKindsResponse, Integer, Hash)>] SfvbSecretKindsResponse data, response status code and response headers
|
|
5738
|
+
def get_sfvb_secret_kinds_with_http_info(opts = {})
|
|
5739
|
+
if @api_client.config.debugging
|
|
5740
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_secret_kinds ...'
|
|
5741
|
+
end
|
|
5742
|
+
# resource path
|
|
5743
|
+
local_var_path = '/sfvb/secrets/kinds'
|
|
5744
|
+
|
|
5745
|
+
# query parameters
|
|
5746
|
+
query_params = opts[:query_params] || {}
|
|
5747
|
+
|
|
5748
|
+
# header parameters
|
|
5749
|
+
header_params = opts[:header_params] || {}
|
|
5750
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
5751
|
+
# HTTP header 'Accept' (if needed)
|
|
5752
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
5753
|
+
|
|
5754
|
+
# form parameters
|
|
5755
|
+
form_params = opts[:form_params] || {}
|
|
5756
|
+
|
|
5757
|
+
# http body (model)
|
|
5758
|
+
post_body = opts[:debug_body]
|
|
5759
|
+
|
|
5760
|
+
# return_type
|
|
5761
|
+
return_type = opts[:debug_return_type] || 'SfvbSecretKindsResponse'
|
|
5762
|
+
|
|
5763
|
+
# auth_names
|
|
5764
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
5765
|
+
|
|
5766
|
+
new_options = opts.merge(
|
|
5767
|
+
:operation => :"SfvbApi.get_sfvb_secret_kinds",
|
|
5768
|
+
:header_params => header_params,
|
|
5769
|
+
:query_params => query_params,
|
|
5770
|
+
:form_params => form_params,
|
|
5771
|
+
:body => post_body,
|
|
5772
|
+
:auth_names => auth_names,
|
|
5773
|
+
:return_type => return_type
|
|
5774
|
+
)
|
|
5775
|
+
|
|
5776
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
5777
|
+
if @api_client.config.debugging
|
|
5778
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_secret_kinds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5779
|
+
end
|
|
5780
|
+
return data, status_code, headers
|
|
5781
|
+
end
|
|
5782
|
+
|
|
5783
|
+
# Read one secret request
|
|
5784
|
+
# Poll this every interval_seconds after making a request. status is pending until a person enters the values, then fulfilled, and expired if nobody does within 24 hours. handles lists each handle with its own status, and a fingerprint (the last few characters as a mask shows them) once its value is entered. Never a value.
|
|
5785
|
+
# @param request_id [String]
|
|
5786
|
+
# @param [Hash] opts the optional parameters
|
|
5787
|
+
# @return [SfvbSecretRequest]
|
|
5788
|
+
def get_sfvb_secret_request(request_id, opts = {})
|
|
5789
|
+
data, _status_code, _headers = get_sfvb_secret_request_with_http_info(request_id, opts)
|
|
5790
|
+
data
|
|
5791
|
+
end
|
|
5792
|
+
|
|
5793
|
+
# Read one secret request
|
|
5794
|
+
# Poll this every interval_seconds after making a request. status is pending until a person enters the values, then fulfilled, and expired if nobody does within 24 hours. handles lists each handle with its own status, and a fingerprint (the last few characters as a mask shows them) once its value is entered. Never a value.
|
|
5795
|
+
# @param request_id [String]
|
|
5796
|
+
# @param [Hash] opts the optional parameters
|
|
5797
|
+
# @return [Array<(SfvbSecretRequest, Integer, Hash)>] SfvbSecretRequest data, response status code and response headers
|
|
5798
|
+
def get_sfvb_secret_request_with_http_info(request_id, opts = {})
|
|
5799
|
+
if @api_client.config.debugging
|
|
5800
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_secret_request ...'
|
|
5801
|
+
end
|
|
5802
|
+
# verify the required parameter 'request_id' is set
|
|
5803
|
+
if @api_client.config.client_side_validation && request_id.nil?
|
|
5804
|
+
fail ArgumentError, "Missing the required parameter 'request_id' when calling SfvbApi.get_sfvb_secret_request"
|
|
5805
|
+
end
|
|
5806
|
+
# resource path
|
|
5807
|
+
local_var_path = '/sfvb/secrets/{request_id}'.sub('{' + 'request_id' + '}', CGI.escape(request_id.to_s))
|
|
5808
|
+
|
|
5809
|
+
# query parameters
|
|
5810
|
+
query_params = opts[:query_params] || {}
|
|
5811
|
+
|
|
5812
|
+
# header parameters
|
|
5813
|
+
header_params = opts[:header_params] || {}
|
|
5814
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
5815
|
+
# HTTP header 'Accept' (if needed)
|
|
5816
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
5817
|
+
|
|
5818
|
+
# form parameters
|
|
5819
|
+
form_params = opts[:form_params] || {}
|
|
5820
|
+
|
|
5821
|
+
# http body (model)
|
|
5822
|
+
post_body = opts[:debug_body]
|
|
5823
|
+
|
|
5824
|
+
# return_type
|
|
5825
|
+
return_type = opts[:debug_return_type] || 'SfvbSecretRequest'
|
|
5826
|
+
|
|
5827
|
+
# auth_names
|
|
5828
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
5829
|
+
|
|
5830
|
+
new_options = opts.merge(
|
|
5831
|
+
:operation => :"SfvbApi.get_sfvb_secret_request",
|
|
5832
|
+
:header_params => header_params,
|
|
5833
|
+
:query_params => query_params,
|
|
5834
|
+
:form_params => form_params,
|
|
5835
|
+
:body => post_body,
|
|
5836
|
+
:auth_names => auth_names,
|
|
5837
|
+
:return_type => return_type
|
|
5838
|
+
)
|
|
5839
|
+
|
|
5840
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
5841
|
+
if @api_client.config.debugging
|
|
5842
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_secret_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5843
|
+
end
|
|
5844
|
+
return data, status_code, headers
|
|
5845
|
+
end
|
|
5846
|
+
|
|
5847
|
+
# List this sign-in's secret requests
|
|
5848
|
+
# Requests made with this sign-in in the last 24 hours, newest first, at most 50, without their handles. Read one request for its handles.
|
|
5849
|
+
# @param [Hash] opts the optional parameters
|
|
5850
|
+
# @return [SfvbSecretRequestsResponse]
|
|
5851
|
+
def get_sfvb_secret_requests(opts = {})
|
|
5852
|
+
data, _status_code, _headers = get_sfvb_secret_requests_with_http_info(opts)
|
|
5853
|
+
data
|
|
5854
|
+
end
|
|
5855
|
+
|
|
5856
|
+
# List this sign-in's secret requests
|
|
5857
|
+
# Requests made with this sign-in in the last 24 hours, newest first, at most 50, without their handles. Read one request for its handles.
|
|
5858
|
+
# @param [Hash] opts the optional parameters
|
|
5859
|
+
# @return [Array<(SfvbSecretRequestsResponse, Integer, Hash)>] SfvbSecretRequestsResponse data, response status code and response headers
|
|
5860
|
+
def get_sfvb_secret_requests_with_http_info(opts = {})
|
|
5861
|
+
if @api_client.config.debugging
|
|
5862
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_secret_requests ...'
|
|
5863
|
+
end
|
|
5864
|
+
# resource path
|
|
5865
|
+
local_var_path = '/sfvb/secrets'
|
|
5866
|
+
|
|
5867
|
+
# query parameters
|
|
5868
|
+
query_params = opts[:query_params] || {}
|
|
5869
|
+
|
|
5870
|
+
# header parameters
|
|
5871
|
+
header_params = opts[:header_params] || {}
|
|
5872
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
5873
|
+
# HTTP header 'Accept' (if needed)
|
|
5874
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
5875
|
+
|
|
5876
|
+
# form parameters
|
|
5877
|
+
form_params = opts[:form_params] || {}
|
|
5878
|
+
|
|
5879
|
+
# http body (model)
|
|
5880
|
+
post_body = opts[:debug_body]
|
|
5881
|
+
|
|
5882
|
+
# return_type
|
|
5883
|
+
return_type = opts[:debug_return_type] || 'SfvbSecretRequestsResponse'
|
|
5884
|
+
|
|
5885
|
+
# auth_names
|
|
5886
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
5887
|
+
|
|
5888
|
+
new_options = opts.merge(
|
|
5889
|
+
:operation => :"SfvbApi.get_sfvb_secret_requests",
|
|
5890
|
+
:header_params => header_params,
|
|
5891
|
+
:query_params => query_params,
|
|
5892
|
+
:form_params => form_params,
|
|
5893
|
+
:body => post_body,
|
|
5894
|
+
:auth_names => auth_names,
|
|
5895
|
+
:return_type => return_type
|
|
5896
|
+
)
|
|
5897
|
+
|
|
5898
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
5899
|
+
if @api_client.config.debugging
|
|
5900
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_secret_requests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5901
|
+
end
|
|
5902
|
+
return data, status_code, headers
|
|
5903
|
+
end
|
|
5904
|
+
|
|
5661
5905
|
# Get one storefront render log
|
|
5662
5906
|
# One render's server log with its lines, each with a level, a category such as VELOCITY or FLOW, and the message. log_id comes from the list, or from the X-UltraCart-Storefront-Log-Id header a page sends inside an SFVB preview session. min_level is debug, info, warn or error, default debug.
|
|
5663
5907
|
# @param storefront_oid [Integer]
|
|
@@ -6798,6 +7042,75 @@ module UltracartClient
|
|
|
6798
7042
|
return data, status_code, headers
|
|
6799
7043
|
end
|
|
6800
7044
|
|
|
7045
|
+
# Ask a person to enter secret values
|
|
7046
|
+
# Never ask for a credential in the conversation. This makes a handle for each sink (and each key, for a bulk request) at once, pending until a person enters the values on request_url. Show the person request_url and user_code and never open or fill in the page yourself. Poll GET secrets/{request_id} every interval_seconds until status is fulfilled, then send each handle in its secret field. The server writes the value in its place. A handle works only for this sign-in, its sink and its target, for ttl_seconds and uses writes. A request lapses after 24 hours, and shares the five pending requests a sign-in has with approvals. Asking again for the same thing returns the pending request (200) rather than a new one (201). Requires a token that resolves to a user, so use the device authorization flow. A secret request is never an approval.
|
|
7047
|
+
# @param secret_request [SfvbSecretRequestCreate] The request
|
|
7048
|
+
# @param [Hash] opts the optional parameters
|
|
7049
|
+
# @return [SfvbSecretRequest]
|
|
7050
|
+
def insert_sfvb_secret_request(secret_request, opts = {})
|
|
7051
|
+
data, _status_code, _headers = insert_sfvb_secret_request_with_http_info(secret_request, opts)
|
|
7052
|
+
data
|
|
7053
|
+
end
|
|
7054
|
+
|
|
7055
|
+
# Ask a person to enter secret values
|
|
7056
|
+
# Never ask for a credential in the conversation. This makes a handle for each sink (and each key, for a bulk request) at once, pending until a person enters the values on request_url. Show the person request_url and user_code and never open or fill in the page yourself. Poll GET secrets/{request_id} every interval_seconds until status is fulfilled, then send each handle in its secret field. The server writes the value in its place. A handle works only for this sign-in, its sink and its target, for ttl_seconds and uses writes. A request lapses after 24 hours, and shares the five pending requests a sign-in has with approvals. Asking again for the same thing returns the pending request (200) rather than a new one (201). Requires a token that resolves to a user, so use the device authorization flow. A secret request is never an approval.
|
|
7057
|
+
# @param secret_request [SfvbSecretRequestCreate] The request
|
|
7058
|
+
# @param [Hash] opts the optional parameters
|
|
7059
|
+
# @return [Array<(SfvbSecretRequest, Integer, Hash)>] SfvbSecretRequest data, response status code and response headers
|
|
7060
|
+
def insert_sfvb_secret_request_with_http_info(secret_request, opts = {})
|
|
7061
|
+
if @api_client.config.debugging
|
|
7062
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_secret_request ...'
|
|
7063
|
+
end
|
|
7064
|
+
# verify the required parameter 'secret_request' is set
|
|
7065
|
+
if @api_client.config.client_side_validation && secret_request.nil?
|
|
7066
|
+
fail ArgumentError, "Missing the required parameter 'secret_request' when calling SfvbApi.insert_sfvb_secret_request"
|
|
7067
|
+
end
|
|
7068
|
+
# resource path
|
|
7069
|
+
local_var_path = '/sfvb/secrets'
|
|
7070
|
+
|
|
7071
|
+
# query parameters
|
|
7072
|
+
query_params = opts[:query_params] || {}
|
|
7073
|
+
|
|
7074
|
+
# header parameters
|
|
7075
|
+
header_params = opts[:header_params] || {}
|
|
7076
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
7077
|
+
# HTTP header 'Accept' (if needed)
|
|
7078
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
7079
|
+
# HTTP header 'Content-Type'
|
|
7080
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
|
7081
|
+
if !content_type.nil?
|
|
7082
|
+
header_params['Content-Type'] = content_type
|
|
7083
|
+
end
|
|
7084
|
+
|
|
7085
|
+
# form parameters
|
|
7086
|
+
form_params = opts[:form_params] || {}
|
|
7087
|
+
|
|
7088
|
+
# http body (model)
|
|
7089
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(secret_request)
|
|
7090
|
+
|
|
7091
|
+
# return_type
|
|
7092
|
+
return_type = opts[:debug_return_type] || 'SfvbSecretRequest'
|
|
7093
|
+
|
|
7094
|
+
# auth_names
|
|
7095
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
7096
|
+
|
|
7097
|
+
new_options = opts.merge(
|
|
7098
|
+
:operation => :"SfvbApi.insert_sfvb_secret_request",
|
|
7099
|
+
:header_params => header_params,
|
|
7100
|
+
:query_params => query_params,
|
|
7101
|
+
:form_params => form_params,
|
|
7102
|
+
:body => post_body,
|
|
7103
|
+
:auth_names => auth_names,
|
|
7104
|
+
:return_type => return_type
|
|
7105
|
+
)
|
|
7106
|
+
|
|
7107
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
7108
|
+
if @api_client.config.debugging
|
|
7109
|
+
@api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_secret_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
7110
|
+
end
|
|
7111
|
+
return data, status_code, headers
|
|
7112
|
+
end
|
|
7113
|
+
|
|
6801
7114
|
# Create an upsell offer
|
|
6802
7115
|
# 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.
|
|
6803
7116
|
# @param storefront_oid [Integer]
|
|
@@ -9020,6 +9333,87 @@ module UltracartClient
|
|
|
9020
9333
|
return data, status_code, headers
|
|
9021
9334
|
end
|
|
9022
9335
|
|
|
9336
|
+
# Change an item image's description
|
|
9337
|
+
# Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
9338
|
+
# @param storefront_oid [Integer]
|
|
9339
|
+
# @param item_multimedia_description_request [SfvbItemMultimediaDescriptionRequest] The image and its new description
|
|
9340
|
+
# @param [Hash] opts the optional parameters
|
|
9341
|
+
# @option opts [String] :merchant_item_id
|
|
9342
|
+
# @option opts [Integer] :merchant_item_oid
|
|
9343
|
+
# @return [SfvbItemResponse]
|
|
9344
|
+
def put_sfvb_item_multimedia_description(storefront_oid, item_multimedia_description_request, opts = {})
|
|
9345
|
+
data, _status_code, _headers = put_sfvb_item_multimedia_description_with_http_info(storefront_oid, item_multimedia_description_request, opts)
|
|
9346
|
+
data
|
|
9347
|
+
end
|
|
9348
|
+
|
|
9349
|
+
# Change an item image's description
|
|
9350
|
+
# Changes the description (alt text) of one image already attached to the item, in place. The image is not touched. Name it by merchant_item_multimedia_oid, or by exactly one of code or default; gallery images often have no code. An empty description clears it, so the render falls back again. Send the description_sha256 you read as current_sha256 so a change made since is not overwritten. A description written here takes the place of the machine description, and image recognition never overwrites it.
|
|
9351
|
+
# @param storefront_oid [Integer]
|
|
9352
|
+
# @param item_multimedia_description_request [SfvbItemMultimediaDescriptionRequest] The image and its new description
|
|
9353
|
+
# @param [Hash] opts the optional parameters
|
|
9354
|
+
# @option opts [String] :merchant_item_id
|
|
9355
|
+
# @option opts [Integer] :merchant_item_oid
|
|
9356
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
9357
|
+
def put_sfvb_item_multimedia_description_with_http_info(storefront_oid, item_multimedia_description_request, opts = {})
|
|
9358
|
+
if @api_client.config.debugging
|
|
9359
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_multimedia_description ...'
|
|
9360
|
+
end
|
|
9361
|
+
# verify the required parameter 'storefront_oid' is set
|
|
9362
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
9363
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_multimedia_description"
|
|
9364
|
+
end
|
|
9365
|
+
# verify the required parameter 'item_multimedia_description_request' is set
|
|
9366
|
+
if @api_client.config.client_side_validation && item_multimedia_description_request.nil?
|
|
9367
|
+
fail ArgumentError, "Missing the required parameter 'item_multimedia_description_request' when calling SfvbApi.put_sfvb_item_multimedia_description"
|
|
9368
|
+
end
|
|
9369
|
+
# resource path
|
|
9370
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/multimedia/description'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
9371
|
+
|
|
9372
|
+
# query parameters
|
|
9373
|
+
query_params = opts[:query_params] || {}
|
|
9374
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
9375
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
9376
|
+
|
|
9377
|
+
# header parameters
|
|
9378
|
+
header_params = opts[:header_params] || {}
|
|
9379
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
9380
|
+
# HTTP header 'Accept' (if needed)
|
|
9381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
9382
|
+
# HTTP header 'Content-Type'
|
|
9383
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
9384
|
+
if !content_type.nil?
|
|
9385
|
+
header_params['Content-Type'] = content_type
|
|
9386
|
+
end
|
|
9387
|
+
|
|
9388
|
+
# form parameters
|
|
9389
|
+
form_params = opts[:form_params] || {}
|
|
9390
|
+
|
|
9391
|
+
# http body (model)
|
|
9392
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_multimedia_description_request)
|
|
9393
|
+
|
|
9394
|
+
# return_type
|
|
9395
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
9396
|
+
|
|
9397
|
+
# auth_names
|
|
9398
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
9399
|
+
|
|
9400
|
+
new_options = opts.merge(
|
|
9401
|
+
:operation => :"SfvbApi.put_sfvb_item_multimedia_description",
|
|
9402
|
+
:header_params => header_params,
|
|
9403
|
+
:query_params => query_params,
|
|
9404
|
+
:form_params => form_params,
|
|
9405
|
+
:body => post_body,
|
|
9406
|
+
:auth_names => auth_names,
|
|
9407
|
+
:return_type => return_type
|
|
9408
|
+
)
|
|
9409
|
+
|
|
9410
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
9411
|
+
if @api_client.config.debugging
|
|
9412
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_multimedia_description\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
9413
|
+
end
|
|
9414
|
+
return data, status_code, headers
|
|
9415
|
+
end
|
|
9416
|
+
|
|
9023
9417
|
# Change what an item charges
|
|
9024
9418
|
# 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.
|
|
9025
9419
|
# @param storefront_oid [Integer]
|
|
@@ -10797,6 +11191,70 @@ module UltracartClient
|
|
|
10797
11191
|
return data, status_code, headers
|
|
10798
11192
|
end
|
|
10799
11193
|
|
|
11194
|
+
# Revoke a fulfilled request's unused handles
|
|
11195
|
+
# Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
|
|
11196
|
+
# @param request_id [String]
|
|
11197
|
+
# @param [Hash] opts the optional parameters
|
|
11198
|
+
# @return [SfvbSecretRequest]
|
|
11199
|
+
def revoke_sfvb_secret_request(request_id, opts = {})
|
|
11200
|
+
data, _status_code, _headers = revoke_sfvb_secret_request_with_http_info(request_id, opts)
|
|
11201
|
+
data
|
|
11202
|
+
end
|
|
11203
|
+
|
|
11204
|
+
# Revoke a fulfilled request's unused handles
|
|
11205
|
+
# Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
|
|
11206
|
+
# @param request_id [String]
|
|
11207
|
+
# @param [Hash] opts the optional parameters
|
|
11208
|
+
# @return [Array<(SfvbSecretRequest, Integer, Hash)>] SfvbSecretRequest data, response status code and response headers
|
|
11209
|
+
def revoke_sfvb_secret_request_with_http_info(request_id, opts = {})
|
|
11210
|
+
if @api_client.config.debugging
|
|
11211
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.revoke_sfvb_secret_request ...'
|
|
11212
|
+
end
|
|
11213
|
+
# verify the required parameter 'request_id' is set
|
|
11214
|
+
if @api_client.config.client_side_validation && request_id.nil?
|
|
11215
|
+
fail ArgumentError, "Missing the required parameter 'request_id' when calling SfvbApi.revoke_sfvb_secret_request"
|
|
11216
|
+
end
|
|
11217
|
+
# resource path
|
|
11218
|
+
local_var_path = '/sfvb/secrets/{request_id}/revoke'.sub('{' + 'request_id' + '}', CGI.escape(request_id.to_s))
|
|
11219
|
+
|
|
11220
|
+
# query parameters
|
|
11221
|
+
query_params = opts[:query_params] || {}
|
|
11222
|
+
|
|
11223
|
+
# header parameters
|
|
11224
|
+
header_params = opts[:header_params] || {}
|
|
11225
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
11226
|
+
# HTTP header 'Accept' (if needed)
|
|
11227
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
11228
|
+
|
|
11229
|
+
# form parameters
|
|
11230
|
+
form_params = opts[:form_params] || {}
|
|
11231
|
+
|
|
11232
|
+
# http body (model)
|
|
11233
|
+
post_body = opts[:debug_body]
|
|
11234
|
+
|
|
11235
|
+
# return_type
|
|
11236
|
+
return_type = opts[:debug_return_type] || 'SfvbSecretRequest'
|
|
11237
|
+
|
|
11238
|
+
# auth_names
|
|
11239
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
11240
|
+
|
|
11241
|
+
new_options = opts.merge(
|
|
11242
|
+
:operation => :"SfvbApi.revoke_sfvb_secret_request",
|
|
11243
|
+
:header_params => header_params,
|
|
11244
|
+
:query_params => query_params,
|
|
11245
|
+
:form_params => form_params,
|
|
11246
|
+
:body => post_body,
|
|
11247
|
+
:auth_names => auth_names,
|
|
11248
|
+
:return_type => return_type
|
|
11249
|
+
)
|
|
11250
|
+
|
|
11251
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
11252
|
+
if @api_client.config.debugging
|
|
11253
|
+
@api_client.config.logger.debug "API called: SfvbApi#revoke_sfvb_secret_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
11254
|
+
end
|
|
11255
|
+
return data, status_code, headers
|
|
11256
|
+
end
|
|
11257
|
+
|
|
10800
11258
|
# Search storefront files
|
|
10801
11259
|
# Searches names and, when text is supplied, file contents. For a CLI with no local copy this is the only way to answer where something is defined without walking the whole tree. Results are capped and truncation is always reported.
|
|
10802
11260
|
# @param storefront_oid [Integer]
|
|
@@ -24,13 +24,13 @@ module UltracartClient
|
|
|
24
24
|
# The id of what changed, such as the approval_id.
|
|
25
25
|
attr_accessor :object_id
|
|
26
26
|
|
|
27
|
-
# What changed, such as approval.
|
|
27
|
+
# What changed, such as approval or secret_sink.
|
|
28
28
|
attr_accessor :object_type
|
|
29
29
|
|
|
30
30
|
# The storefront it concerns. Empty for merchant-level objects.
|
|
31
31
|
attr_accessor :storefront_oid
|
|
32
32
|
|
|
33
|
-
# approval.decided (approved, denied, cancelled or refused by the script review)
|
|
33
|
+
# approval.decided (approved, denied, cancelled or refused by the script review), approval.ready (the review finished and the person can decide) or secret_sink.completed (a person entered the values of a secret request; object_id is the request id).
|
|
34
34
|
attr_accessor :type
|
|
35
35
|
|
|
36
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -24,9 +24,15 @@ module UltracartClient
|
|
|
24
24
|
# True for the image an itemimage element with no code renders. Default is per media type, so an item may have one default image and one default PDF at the same time.
|
|
25
25
|
attr_accessor :default
|
|
26
26
|
|
|
27
|
-
#
|
|
27
|
+
# The merchant's description, stored with the image and rendered as its alt text. When it is empty the render falls back to rekognition_description or to text built from the item's title, depending on the element, so an empty value here is not an empty alt attribute.
|
|
28
28
|
attr_accessor :description
|
|
29
29
|
|
|
30
|
+
# SHA-256 of description (empty when there is none). Send it as current_sha256 when changing the description so a change made since you read it is not overwritten.
|
|
31
|
+
attr_accessor :description_sha256
|
|
32
|
+
|
|
33
|
+
# Where the alt text comes from now. merchant when description is set, rekognition when only rekognition_description is, none otherwise.
|
|
34
|
+
attr_accessor :description_source
|
|
35
|
+
|
|
30
36
|
# Width x height in pixels, when the storage measured the file.
|
|
31
37
|
attr_accessor :dimensions
|
|
32
38
|
|
|
@@ -36,6 +42,12 @@ module UltracartClient
|
|
|
36
42
|
# The stored file's name. Empty when the slot is declared and nothing is attached.
|
|
37
43
|
attr_accessor :filename
|
|
38
44
|
|
|
45
|
+
# The stored image's id. Name it to change this image's description when it has no code.
|
|
46
|
+
attr_accessor :merchant_item_multimedia_oid
|
|
47
|
+
|
|
48
|
+
# The machine description image recognition produced for the stored image, if any. It is used only while description is empty, and a description written here or in the admin always takes its place.
|
|
49
|
+
attr_accessor :rekognition_description
|
|
50
|
+
|
|
39
51
|
# The media type the storage recorded.
|
|
40
52
|
attr_accessor :type
|
|
41
53
|
|
|
@@ -71,9 +83,13 @@ module UltracartClient
|
|
|
71
83
|
:'declared' => :'declared',
|
|
72
84
|
:'default' => :'default',
|
|
73
85
|
:'description' => :'description',
|
|
86
|
+
:'description_sha256' => :'description_sha256',
|
|
87
|
+
:'description_source' => :'description_source',
|
|
74
88
|
:'dimensions' => :'dimensions',
|
|
75
89
|
:'exclude_from_gallery' => :'exclude_from_gallery',
|
|
76
90
|
:'filename' => :'filename',
|
|
91
|
+
:'merchant_item_multimedia_oid' => :'merchant_item_multimedia_oid',
|
|
92
|
+
:'rekognition_description' => :'rekognition_description',
|
|
77
93
|
:'type' => :'type',
|
|
78
94
|
:'view_url' => :'view_url'
|
|
79
95
|
}
|
|
@@ -91,9 +107,13 @@ module UltracartClient
|
|
|
91
107
|
:'declared' => :'Boolean',
|
|
92
108
|
:'default' => :'Boolean',
|
|
93
109
|
:'description' => :'String',
|
|
110
|
+
:'description_sha256' => :'String',
|
|
111
|
+
:'description_source' => :'String',
|
|
94
112
|
:'dimensions' => :'String',
|
|
95
113
|
:'exclude_from_gallery' => :'Boolean',
|
|
96
114
|
:'filename' => :'String',
|
|
115
|
+
:'merchant_item_multimedia_oid' => :'Integer',
|
|
116
|
+
:'rekognition_description' => :'String',
|
|
97
117
|
:'type' => :'String',
|
|
98
118
|
:'view_url' => :'String'
|
|
99
119
|
}
|
|
@@ -136,6 +156,14 @@ module UltracartClient
|
|
|
136
156
|
self.description = attributes[:'description']
|
|
137
157
|
end
|
|
138
158
|
|
|
159
|
+
if attributes.key?(:'description_sha256')
|
|
160
|
+
self.description_sha256 = attributes[:'description_sha256']
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'description_source')
|
|
164
|
+
self.description_source = attributes[:'description_source']
|
|
165
|
+
end
|
|
166
|
+
|
|
139
167
|
if attributes.key?(:'dimensions')
|
|
140
168
|
self.dimensions = attributes[:'dimensions']
|
|
141
169
|
end
|
|
@@ -148,6 +176,14 @@ module UltracartClient
|
|
|
148
176
|
self.filename = attributes[:'filename']
|
|
149
177
|
end
|
|
150
178
|
|
|
179
|
+
if attributes.key?(:'merchant_item_multimedia_oid')
|
|
180
|
+
self.merchant_item_multimedia_oid = attributes[:'merchant_item_multimedia_oid']
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'rekognition_description')
|
|
184
|
+
self.rekognition_description = attributes[:'rekognition_description']
|
|
185
|
+
end
|
|
186
|
+
|
|
151
187
|
if attributes.key?(:'type')
|
|
152
188
|
self.type = attributes[:'type']
|
|
153
189
|
end
|
|
@@ -167,11 +203,23 @@ module UltracartClient
|
|
|
167
203
|
# Check to see if the all the properties in the model are valid
|
|
168
204
|
# @return true if the model is valid
|
|
169
205
|
def valid?
|
|
206
|
+
description_source_validator = EnumAttributeValidator.new('String', ["merchant", "rekognition", "none"])
|
|
207
|
+
return false unless description_source_validator.valid?(@description_source)
|
|
170
208
|
type_validator = EnumAttributeValidator.new('String', ["Image", "Video", "PDF", "Text", "Unknown"])
|
|
171
209
|
return false unless type_validator.valid?(@type)
|
|
172
210
|
true
|
|
173
211
|
end
|
|
174
212
|
|
|
213
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
214
|
+
# @param [Object] description_source Object to be assigned
|
|
215
|
+
def description_source=(description_source)
|
|
216
|
+
validator = EnumAttributeValidator.new('String', ["merchant", "rekognition", "none"])
|
|
217
|
+
unless validator.valid?(description_source)
|
|
218
|
+
fail ArgumentError, "invalid value for \"description_source\", must be one of #{validator.allowable_values}."
|
|
219
|
+
end
|
|
220
|
+
@description_source = description_source
|
|
221
|
+
end
|
|
222
|
+
|
|
175
223
|
# Custom attribute writer method checking allowed values (enum).
|
|
176
224
|
# @param [Object] type Object to be assigned
|
|
177
225
|
def type=(type)
|
|
@@ -191,9 +239,13 @@ module UltracartClient
|
|
|
191
239
|
declared == o.declared &&
|
|
192
240
|
default == o.default &&
|
|
193
241
|
description == o.description &&
|
|
242
|
+
description_sha256 == o.description_sha256 &&
|
|
243
|
+
description_source == o.description_source &&
|
|
194
244
|
dimensions == o.dimensions &&
|
|
195
245
|
exclude_from_gallery == o.exclude_from_gallery &&
|
|
196
246
|
filename == o.filename &&
|
|
247
|
+
merchant_item_multimedia_oid == o.merchant_item_multimedia_oid &&
|
|
248
|
+
rekognition_description == o.rekognition_description &&
|
|
197
249
|
type == o.type &&
|
|
198
250
|
view_url == o.view_url
|
|
199
251
|
end
|
|
@@ -207,7 +259,7 @@ module UltracartClient
|
|
|
207
259
|
# Calculates hash code according to all attributes.
|
|
208
260
|
# @return [Integer] Hash code
|
|
209
261
|
def hash
|
|
210
|
-
[code, declared, default, description, dimensions, exclude_from_gallery, filename, type, view_url].hash
|
|
262
|
+
[code, declared, default, description, description_sha256, description_source, dimensions, exclude_from_gallery, filename, merchant_item_multimedia_oid, rekognition_description, type, view_url].hash
|
|
211
263
|
end
|
|
212
264
|
|
|
213
265
|
# Builds the object from hash
|