ultracart_api 4.1.202 → 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 +16 -2
- data/docs/SfvbApi.md +321 -1
- data/docs/SfvbEvent.md +2 -2
- 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/sfvb_api.rb +379 -2
- data/lib/ultracart_api/models/sfvb_event.rb +2 -2
- 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 +7 -0
- metadata +16 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# UltracartClient::SfvbSecretRequestsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **requests** | [**Array<SfvbSecretRequest>**](SfvbSecretRequest.md) | This sign-in's secret requests from the last 24 hours, newest first, at most 50, without their handles. | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ultracart_api'
|
|
13
|
+
|
|
14
|
+
instance = UltracartClient::SfvbSecretRequestsResponse.new(
|
|
15
|
+
requests: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UltracartClient::SfvbSecretSink
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | The sink id. | [optional] |
|
|
8
|
+
| **kind** | **String** | The kind of value it holds. | [optional] |
|
|
9
|
+
| **requires_totp** | **Boolean** | True when the person must enter a code from their authenticator app, and the request must name its target. | [optional] |
|
|
10
|
+
| **target_type** | **String** | What a request names as its target_id or keys. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ultracart_api'
|
|
16
|
+
|
|
17
|
+
instance = UltracartClient::SfvbSecretSink.new(
|
|
18
|
+
id: null,
|
|
19
|
+
kind: null,
|
|
20
|
+
requires_totp: null,
|
|
21
|
+
target_type: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -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]
|
|
@@ -10878,6 +11191,70 @@ module UltracartClient
|
|
|
10878
11191
|
return data, status_code, headers
|
|
10879
11192
|
end
|
|
10880
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
|
+
|
|
10881
11258
|
# Search storefront files
|
|
10882
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.
|
|
10883
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.
|