ultracart_api 4.1.169 → 4.1.170
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 +18 -2
- data/docs/SfvbApi.md +342 -0
- data/docs/SfvbItemAttribute.md +34 -0
- data/docs/SfvbItemAttributeUpdate.md +22 -0
- data/docs/SfvbItemAttributeUpdateRequest.md +18 -0
- data/docs/SfvbItemContentRequest.md +20 -0
- data/docs/SfvbItemMultimedia.md +34 -0
- data/docs/SfvbItemMultimediaRequest.md +24 -0
- data/docs/SfvbItemResponse.md +32 -0
- data/docs/SfvbItemSeo.md +34 -0
- data/docs/SfvbItemSeoRequest.md +22 -0
- data/lib/ultracart_api/api/sfvb_api.rb +470 -0
- data/lib/ultracart_api/models/sfvb_item_attribute.rb +336 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_update.rb +274 -0
- data/lib/ultracart_api/models/sfvb_item_attribute_update_request.rb +222 -0
- data/lib/ultracart_api/models/sfvb_item_content_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_item_multimedia.rb +334 -0
- data/lib/ultracart_api/models/sfvb_item_multimedia_request.rb +250 -0
- data/lib/ultracart_api/models/sfvb_item_response.rb +295 -0
- data/lib/ultracart_api/models/sfvb_item_seo.rb +358 -0
- data/lib/ultracart_api/models/sfvb_item_seo_request.rb +240 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +9 -0
- metadata +19 -1
data/docs/SfvbItemSeo.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# UltracartClient::SfvbItemSeo
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **description** | **String** | storefrontSEODescription as stored on this item. Empty when it has never been set. | [optional] |
|
|
8
|
+
| **description_source** | **String** | Where effective_description comes from. | [optional] |
|
|
9
|
+
| **effective_description** | **String** | What the meta description renders as, after the item to page to site fallback. | [optional] |
|
|
10
|
+
| **effective_keywords** | **String** | What the meta keywords render as, after the item to page to site fallback. | [optional] |
|
|
11
|
+
| **effective_title** | **String** | What the document title renders as. | [optional] |
|
|
12
|
+
| **keywords** | **String** | storefrontSEOKeywords as stored on this item. Empty when it has never been set. | [optional] |
|
|
13
|
+
| **keywords_source** | **String** | Where effective_keywords comes from. | [optional] |
|
|
14
|
+
| **title** | **String** | storefrontSEOTitle as stored on this item. Empty when it has never been set. | [optional] |
|
|
15
|
+
| **title_source** | **String** | Where effective_title comes from. item_description means nothing is set here and the item's own description is being used. | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'ultracart_api'
|
|
21
|
+
|
|
22
|
+
instance = UltracartClient::SfvbItemSeo.new(
|
|
23
|
+
description: null,
|
|
24
|
+
description_source: null,
|
|
25
|
+
effective_description: null,
|
|
26
|
+
effective_keywords: null,
|
|
27
|
+
effective_title: null,
|
|
28
|
+
keywords: null,
|
|
29
|
+
keywords_source: null,
|
|
30
|
+
title: null,
|
|
31
|
+
title_source: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UltracartClient::SfvbItemSeoRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **description** | **String** | The meta description. Cleared, the page falls back to its group's value and then to the site's. | [optional] |
|
|
8
|
+
| **keywords** | **String** | The meta keywords. Cleared, the page falls back to its group's value and then to the site's. | [optional] |
|
|
9
|
+
| **title** | **String** | The document title for this item's page. Cleared, the page falls back to the item's own description. This does not reach og:title or twitter:title, which render the item description either way. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'ultracart_api'
|
|
15
|
+
|
|
16
|
+
instance = UltracartClient::SfvbItemSeoRequest.new(
|
|
17
|
+
description: null,
|
|
18
|
+
keywords: null,
|
|
19
|
+
title: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -474,6 +474,82 @@ module UltracartClient
|
|
|
474
474
|
return data, status_code, headers
|
|
475
475
|
end
|
|
476
476
|
|
|
477
|
+
# Detach an image from an item
|
|
478
|
+
# Removes the item's copy of the image in one slot. The file you uploaded is left where it is, so the same source can be attached again or used elsewhere.
|
|
479
|
+
# @param storefront_oid [Integer]
|
|
480
|
+
# @param [Hash] opts the optional parameters
|
|
481
|
+
# @option opts [String] :merchant_item_id
|
|
482
|
+
# @option opts [Integer] :merchant_item_oid
|
|
483
|
+
# @option opts [String] :code The image code to detach
|
|
484
|
+
# @option opts [Boolean] :default Detach the default image instead of a coded one
|
|
485
|
+
# @return [SfvbItemResponse]
|
|
486
|
+
def delete_sfvb_item_multimedia(storefront_oid, opts = {})
|
|
487
|
+
data, _status_code, _headers = delete_sfvb_item_multimedia_with_http_info(storefront_oid, opts)
|
|
488
|
+
data
|
|
489
|
+
end
|
|
490
|
+
|
|
491
|
+
# Detach an image from an item
|
|
492
|
+
# Removes the item's copy of the image in one slot. The file you uploaded is left where it is, so the same source can be attached again or used elsewhere.
|
|
493
|
+
# @param storefront_oid [Integer]
|
|
494
|
+
# @param [Hash] opts the optional parameters
|
|
495
|
+
# @option opts [String] :merchant_item_id
|
|
496
|
+
# @option opts [Integer] :merchant_item_oid
|
|
497
|
+
# @option opts [String] :code The image code to detach
|
|
498
|
+
# @option opts [Boolean] :default Detach the default image instead of a coded one
|
|
499
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
500
|
+
def delete_sfvb_item_multimedia_with_http_info(storefront_oid, opts = {})
|
|
501
|
+
if @api_client.config.debugging
|
|
502
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_item_multimedia ...'
|
|
503
|
+
end
|
|
504
|
+
# verify the required parameter 'storefront_oid' is set
|
|
505
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
506
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_item_multimedia"
|
|
507
|
+
end
|
|
508
|
+
# resource path
|
|
509
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
510
|
+
|
|
511
|
+
# query parameters
|
|
512
|
+
query_params = opts[:query_params] || {}
|
|
513
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
514
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
515
|
+
query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
|
|
516
|
+
query_params[:'default'] = opts[:'default'] if !opts[:'default'].nil?
|
|
517
|
+
|
|
518
|
+
# header parameters
|
|
519
|
+
header_params = opts[:header_params] || {}
|
|
520
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
521
|
+
# HTTP header 'Accept' (if needed)
|
|
522
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
523
|
+
|
|
524
|
+
# form parameters
|
|
525
|
+
form_params = opts[:form_params] || {}
|
|
526
|
+
|
|
527
|
+
# http body (model)
|
|
528
|
+
post_body = opts[:debug_body]
|
|
529
|
+
|
|
530
|
+
# return_type
|
|
531
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
532
|
+
|
|
533
|
+
# auth_names
|
|
534
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
535
|
+
|
|
536
|
+
new_options = opts.merge(
|
|
537
|
+
:operation => :"SfvbApi.delete_sfvb_item_multimedia",
|
|
538
|
+
:header_params => header_params,
|
|
539
|
+
:query_params => query_params,
|
|
540
|
+
:form_params => form_params,
|
|
541
|
+
:body => post_body,
|
|
542
|
+
:auth_names => auth_names,
|
|
543
|
+
:return_type => return_type
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
547
|
+
if @api_client.config.debugging
|
|
548
|
+
@api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_item_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
549
|
+
end
|
|
550
|
+
return data, status_code, headers
|
|
551
|
+
end
|
|
552
|
+
|
|
477
553
|
# Detach an image from a page
|
|
478
554
|
# Name exactly one of code or default. Removes the page's copy of the image; the source file in the page folder is left alone. Always needs sfvb_publish.
|
|
479
555
|
# @param storefront_oid [Integer]
|
|
@@ -1487,6 +1563,76 @@ module UltracartClient
|
|
|
1487
1563
|
return data, status_code, headers
|
|
1488
1564
|
end
|
|
1489
1565
|
|
|
1566
|
+
# Read an item's storefront facing content
|
|
1567
|
+
# The attributes, images, title, description and search metadata a StoreFront element can render, reconciled against the templates behind the pages this item sits on. An attribute a template declares but nothing has set comes back present with an empty value, which is how you discover what the page is asking for. Pricing, shipping, inventory, tax, variants and kit structure are not here because no element reads them; use the item API for those. Address by merchant_item_id, the value data-context-item-id carries, or by merchant_item_oid.
|
|
1568
|
+
# @param storefront_oid [Integer]
|
|
1569
|
+
# @param [Hash] opts the optional parameters
|
|
1570
|
+
# @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
|
|
1571
|
+
# @option opts [Integer] :merchant_item_oid The item oid. Send this or merchant_item_id, not both
|
|
1572
|
+
# @return [SfvbItemResponse]
|
|
1573
|
+
def get_sfvb_item(storefront_oid, opts = {})
|
|
1574
|
+
data, _status_code, _headers = get_sfvb_item_with_http_info(storefront_oid, opts)
|
|
1575
|
+
data
|
|
1576
|
+
end
|
|
1577
|
+
|
|
1578
|
+
# Read an item's storefront facing content
|
|
1579
|
+
# The attributes, images, title, description and search metadata a StoreFront element can render, reconciled against the templates behind the pages this item sits on. An attribute a template declares but nothing has set comes back present with an empty value, which is how you discover what the page is asking for. Pricing, shipping, inventory, tax, variants and kit structure are not here because no element reads them; use the item API for those. Address by merchant_item_id, the value data-context-item-id carries, or by merchant_item_oid.
|
|
1580
|
+
# @param storefront_oid [Integer]
|
|
1581
|
+
# @param [Hash] opts the optional parameters
|
|
1582
|
+
# @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
|
|
1583
|
+
# @option opts [Integer] :merchant_item_oid The item oid. Send this or merchant_item_id, not both
|
|
1584
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
1585
|
+
def get_sfvb_item_with_http_info(storefront_oid, opts = {})
|
|
1586
|
+
if @api_client.config.debugging
|
|
1587
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item ...'
|
|
1588
|
+
end
|
|
1589
|
+
# verify the required parameter 'storefront_oid' is set
|
|
1590
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
1591
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item"
|
|
1592
|
+
end
|
|
1593
|
+
# resource path
|
|
1594
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
1595
|
+
|
|
1596
|
+
# query parameters
|
|
1597
|
+
query_params = opts[:query_params] || {}
|
|
1598
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
1599
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
1600
|
+
|
|
1601
|
+
# header parameters
|
|
1602
|
+
header_params = opts[:header_params] || {}
|
|
1603
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1604
|
+
# HTTP header 'Accept' (if needed)
|
|
1605
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1606
|
+
|
|
1607
|
+
# form parameters
|
|
1608
|
+
form_params = opts[:form_params] || {}
|
|
1609
|
+
|
|
1610
|
+
# http body (model)
|
|
1611
|
+
post_body = opts[:debug_body]
|
|
1612
|
+
|
|
1613
|
+
# return_type
|
|
1614
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
1615
|
+
|
|
1616
|
+
# auth_names
|
|
1617
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1618
|
+
|
|
1619
|
+
new_options = opts.merge(
|
|
1620
|
+
:operation => :"SfvbApi.get_sfvb_item",
|
|
1621
|
+
:header_params => header_params,
|
|
1622
|
+
:query_params => query_params,
|
|
1623
|
+
:form_params => form_params,
|
|
1624
|
+
:body => post_body,
|
|
1625
|
+
:auth_names => auth_names,
|
|
1626
|
+
:return_type => return_type
|
|
1627
|
+
)
|
|
1628
|
+
|
|
1629
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1630
|
+
if @api_client.config.debugging
|
|
1631
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1632
|
+
end
|
|
1633
|
+
return data, status_code, headers
|
|
1634
|
+
end
|
|
1635
|
+
|
|
1490
1636
|
# Read one library entry including its CJSON
|
|
1491
1637
|
# Returns the fragment as authored. If it references images or other storefront files those paths will not resolve on this storefront until the entry is installed, so use install rather than this when the intent is to place the fragment.
|
|
1492
1638
|
# @param storefront_oid [Integer]
|
|
@@ -3667,6 +3813,330 @@ module UltracartClient
|
|
|
3667
3813
|
return data, status_code, headers
|
|
3668
3814
|
end
|
|
3669
3815
|
|
|
3816
|
+
# Change some of an item's attributes
|
|
3817
|
+
# Partial - only the attributes named change, and an empty value clears one. Every entry is validated before any is written, so a refusal leaves the item untouched. The list types are checked against the shape their renderer actually parses, which matters more than it sounds: a definition list is a bare array with one letter keys, a video list is a wrapper object with keys spelled out, and an item set is comma separated text rather than JSON. A shape the renderer cannot read is not reported at render time - it renders exactly like an attribute nobody ever set.
|
|
3818
|
+
# @param storefront_oid [Integer]
|
|
3819
|
+
# @param item_attribute_update_request [SfvbItemAttributeUpdateRequest] Attributes to change
|
|
3820
|
+
# @param [Hash] opts the optional parameters
|
|
3821
|
+
# @option opts [String] :merchant_item_id
|
|
3822
|
+
# @option opts [Integer] :merchant_item_oid
|
|
3823
|
+
# @return [SfvbItemResponse]
|
|
3824
|
+
def put_sfvb_item_attributes(storefront_oid, item_attribute_update_request, opts = {})
|
|
3825
|
+
data, _status_code, _headers = put_sfvb_item_attributes_with_http_info(storefront_oid, item_attribute_update_request, opts)
|
|
3826
|
+
data
|
|
3827
|
+
end
|
|
3828
|
+
|
|
3829
|
+
# Change some of an item's attributes
|
|
3830
|
+
# Partial - only the attributes named change, and an empty value clears one. Every entry is validated before any is written, so a refusal leaves the item untouched. The list types are checked against the shape their renderer actually parses, which matters more than it sounds: a definition list is a bare array with one letter keys, a video list is a wrapper object with keys spelled out, and an item set is comma separated text rather than JSON. A shape the renderer cannot read is not reported at render time - it renders exactly like an attribute nobody ever set.
|
|
3831
|
+
# @param storefront_oid [Integer]
|
|
3832
|
+
# @param item_attribute_update_request [SfvbItemAttributeUpdateRequest] Attributes to change
|
|
3833
|
+
# @param [Hash] opts the optional parameters
|
|
3834
|
+
# @option opts [String] :merchant_item_id
|
|
3835
|
+
# @option opts [Integer] :merchant_item_oid
|
|
3836
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
3837
|
+
def put_sfvb_item_attributes_with_http_info(storefront_oid, item_attribute_update_request, opts = {})
|
|
3838
|
+
if @api_client.config.debugging
|
|
3839
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_attributes ...'
|
|
3840
|
+
end
|
|
3841
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3842
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3843
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_attributes"
|
|
3844
|
+
end
|
|
3845
|
+
# verify the required parameter 'item_attribute_update_request' is set
|
|
3846
|
+
if @api_client.config.client_side_validation && item_attribute_update_request.nil?
|
|
3847
|
+
fail ArgumentError, "Missing the required parameter 'item_attribute_update_request' when calling SfvbApi.put_sfvb_item_attributes"
|
|
3848
|
+
end
|
|
3849
|
+
# resource path
|
|
3850
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3851
|
+
|
|
3852
|
+
# query parameters
|
|
3853
|
+
query_params = opts[:query_params] || {}
|
|
3854
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
3855
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
3856
|
+
|
|
3857
|
+
# header parameters
|
|
3858
|
+
header_params = opts[:header_params] || {}
|
|
3859
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3860
|
+
# HTTP header 'Accept' (if needed)
|
|
3861
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3862
|
+
# HTTP header 'Content-Type'
|
|
3863
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3864
|
+
if !content_type.nil?
|
|
3865
|
+
header_params['Content-Type'] = content_type
|
|
3866
|
+
end
|
|
3867
|
+
|
|
3868
|
+
# form parameters
|
|
3869
|
+
form_params = opts[:form_params] || {}
|
|
3870
|
+
|
|
3871
|
+
# http body (model)
|
|
3872
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_attribute_update_request)
|
|
3873
|
+
|
|
3874
|
+
# return_type
|
|
3875
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
3876
|
+
|
|
3877
|
+
# auth_names
|
|
3878
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3879
|
+
|
|
3880
|
+
new_options = opts.merge(
|
|
3881
|
+
:operation => :"SfvbApi.put_sfvb_item_attributes",
|
|
3882
|
+
:header_params => header_params,
|
|
3883
|
+
:query_params => query_params,
|
|
3884
|
+
:form_params => form_params,
|
|
3885
|
+
:body => post_body,
|
|
3886
|
+
:auth_names => auth_names,
|
|
3887
|
+
:return_type => return_type
|
|
3888
|
+
)
|
|
3889
|
+
|
|
3890
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3891
|
+
if @api_client.config.debugging
|
|
3892
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3893
|
+
end
|
|
3894
|
+
return data, status_code, headers
|
|
3895
|
+
end
|
|
3896
|
+
|
|
3897
|
+
# Change an item's title or long description
|
|
3898
|
+
# Partial - a field left out is untouched, a field sent empty is cleared, and those are different things. These are what itemtitle and itemdescription render. Writing the matching config keys into a container does nothing, because they are dialog buffers bound to the item and the render never reads them. Both are the catalog's own fields, so a change here reaches the item everywhere, not only on this storefront.
|
|
3899
|
+
# @param storefront_oid [Integer]
|
|
3900
|
+
# @param item_content_request [SfvbItemContentRequest] Title and description to change
|
|
3901
|
+
# @param [Hash] opts the optional parameters
|
|
3902
|
+
# @option opts [String] :merchant_item_id
|
|
3903
|
+
# @option opts [Integer] :merchant_item_oid
|
|
3904
|
+
# @return [SfvbItemResponse]
|
|
3905
|
+
def put_sfvb_item_content(storefront_oid, item_content_request, opts = {})
|
|
3906
|
+
data, _status_code, _headers = put_sfvb_item_content_with_http_info(storefront_oid, item_content_request, opts)
|
|
3907
|
+
data
|
|
3908
|
+
end
|
|
3909
|
+
|
|
3910
|
+
# Change an item's title or long description
|
|
3911
|
+
# Partial - a field left out is untouched, a field sent empty is cleared, and those are different things. These are what itemtitle and itemdescription render. Writing the matching config keys into a container does nothing, because they are dialog buffers bound to the item and the render never reads them. Both are the catalog's own fields, so a change here reaches the item everywhere, not only on this storefront.
|
|
3912
|
+
# @param storefront_oid [Integer]
|
|
3913
|
+
# @param item_content_request [SfvbItemContentRequest] Title and description to change
|
|
3914
|
+
# @param [Hash] opts the optional parameters
|
|
3915
|
+
# @option opts [String] :merchant_item_id
|
|
3916
|
+
# @option opts [Integer] :merchant_item_oid
|
|
3917
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
3918
|
+
def put_sfvb_item_content_with_http_info(storefront_oid, item_content_request, opts = {})
|
|
3919
|
+
if @api_client.config.debugging
|
|
3920
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_content ...'
|
|
3921
|
+
end
|
|
3922
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3923
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3924
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_content"
|
|
3925
|
+
end
|
|
3926
|
+
# verify the required parameter 'item_content_request' is set
|
|
3927
|
+
if @api_client.config.client_side_validation && item_content_request.nil?
|
|
3928
|
+
fail ArgumentError, "Missing the required parameter 'item_content_request' when calling SfvbApi.put_sfvb_item_content"
|
|
3929
|
+
end
|
|
3930
|
+
# resource path
|
|
3931
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
3932
|
+
|
|
3933
|
+
# query parameters
|
|
3934
|
+
query_params = opts[:query_params] || {}
|
|
3935
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
3936
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
3937
|
+
|
|
3938
|
+
# header parameters
|
|
3939
|
+
header_params = opts[:header_params] || {}
|
|
3940
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3941
|
+
# HTTP header 'Accept' (if needed)
|
|
3942
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3943
|
+
# HTTP header 'Content-Type'
|
|
3944
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
3945
|
+
if !content_type.nil?
|
|
3946
|
+
header_params['Content-Type'] = content_type
|
|
3947
|
+
end
|
|
3948
|
+
|
|
3949
|
+
# form parameters
|
|
3950
|
+
form_params = opts[:form_params] || {}
|
|
3951
|
+
|
|
3952
|
+
# http body (model)
|
|
3953
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_content_request)
|
|
3954
|
+
|
|
3955
|
+
# return_type
|
|
3956
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
3957
|
+
|
|
3958
|
+
# auth_names
|
|
3959
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3960
|
+
|
|
3961
|
+
new_options = opts.merge(
|
|
3962
|
+
:operation => :"SfvbApi.put_sfvb_item_content",
|
|
3963
|
+
:header_params => header_params,
|
|
3964
|
+
:query_params => query_params,
|
|
3965
|
+
:form_params => form_params,
|
|
3966
|
+
:body => post_body,
|
|
3967
|
+
:auth_names => auth_names,
|
|
3968
|
+
:return_type => return_type
|
|
3969
|
+
)
|
|
3970
|
+
|
|
3971
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
3972
|
+
if @api_client.config.debugging
|
|
3973
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3974
|
+
end
|
|
3975
|
+
return data, status_code, headers
|
|
3976
|
+
end
|
|
3977
|
+
|
|
3978
|
+
# Attach an image to an item
|
|
3979
|
+
# One slot at a time - the default image or one code - and every other image on the item is left alone. That is the difference from the item API, where images are reachable only through a full item update whose multimedia array is reconciled destructively, so adding one means resending the rest or losing them. Upload the file with files/upload first and name its storefront path here; unlike a page image it does not have to live in any particular folder, because the bytes are copied into the item's own storage on attach.
|
|
3980
|
+
# @param storefront_oid [Integer]
|
|
3981
|
+
# @param item_multimedia_request [SfvbItemMultimediaRequest] Image to attach
|
|
3982
|
+
# @param [Hash] opts the optional parameters
|
|
3983
|
+
# @option opts [String] :merchant_item_id
|
|
3984
|
+
# @option opts [Integer] :merchant_item_oid
|
|
3985
|
+
# @return [SfvbItemResponse]
|
|
3986
|
+
def put_sfvb_item_multimedia(storefront_oid, item_multimedia_request, opts = {})
|
|
3987
|
+
data, _status_code, _headers = put_sfvb_item_multimedia_with_http_info(storefront_oid, item_multimedia_request, opts)
|
|
3988
|
+
data
|
|
3989
|
+
end
|
|
3990
|
+
|
|
3991
|
+
# Attach an image to an item
|
|
3992
|
+
# One slot at a time - the default image or one code - and every other image on the item is left alone. That is the difference from the item API, where images are reachable only through a full item update whose multimedia array is reconciled destructively, so adding one means resending the rest or losing them. Upload the file with files/upload first and name its storefront path here; unlike a page image it does not have to live in any particular folder, because the bytes are copied into the item's own storage on attach.
|
|
3993
|
+
# @param storefront_oid [Integer]
|
|
3994
|
+
# @param item_multimedia_request [SfvbItemMultimediaRequest] Image to attach
|
|
3995
|
+
# @param [Hash] opts the optional parameters
|
|
3996
|
+
# @option opts [String] :merchant_item_id
|
|
3997
|
+
# @option opts [Integer] :merchant_item_oid
|
|
3998
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
3999
|
+
def put_sfvb_item_multimedia_with_http_info(storefront_oid, item_multimedia_request, opts = {})
|
|
4000
|
+
if @api_client.config.debugging
|
|
4001
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_multimedia ...'
|
|
4002
|
+
end
|
|
4003
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4004
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4005
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_multimedia"
|
|
4006
|
+
end
|
|
4007
|
+
# verify the required parameter 'item_multimedia_request' is set
|
|
4008
|
+
if @api_client.config.client_side_validation && item_multimedia_request.nil?
|
|
4009
|
+
fail ArgumentError, "Missing the required parameter 'item_multimedia_request' when calling SfvbApi.put_sfvb_item_multimedia"
|
|
4010
|
+
end
|
|
4011
|
+
# resource path
|
|
4012
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4013
|
+
|
|
4014
|
+
# query parameters
|
|
4015
|
+
query_params = opts[:query_params] || {}
|
|
4016
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
4017
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
4018
|
+
|
|
4019
|
+
# header parameters
|
|
4020
|
+
header_params = opts[:header_params] || {}
|
|
4021
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4022
|
+
# HTTP header 'Accept' (if needed)
|
|
4023
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4024
|
+
# HTTP header 'Content-Type'
|
|
4025
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4026
|
+
if !content_type.nil?
|
|
4027
|
+
header_params['Content-Type'] = content_type
|
|
4028
|
+
end
|
|
4029
|
+
|
|
4030
|
+
# form parameters
|
|
4031
|
+
form_params = opts[:form_params] || {}
|
|
4032
|
+
|
|
4033
|
+
# http body (model)
|
|
4034
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_multimedia_request)
|
|
4035
|
+
|
|
4036
|
+
# return_type
|
|
4037
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
4038
|
+
|
|
4039
|
+
# auth_names
|
|
4040
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4041
|
+
|
|
4042
|
+
new_options = opts.merge(
|
|
4043
|
+
:operation => :"SfvbApi.put_sfvb_item_multimedia",
|
|
4044
|
+
:header_params => header_params,
|
|
4045
|
+
:query_params => query_params,
|
|
4046
|
+
:form_params => form_params,
|
|
4047
|
+
:body => post_body,
|
|
4048
|
+
:auth_names => auth_names,
|
|
4049
|
+
:return_type => return_type
|
|
4050
|
+
)
|
|
4051
|
+
|
|
4052
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
4053
|
+
if @api_client.config.debugging
|
|
4054
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4055
|
+
end
|
|
4056
|
+
return data, status_code, headers
|
|
4057
|
+
end
|
|
4058
|
+
|
|
4059
|
+
# Change an item's search metadata
|
|
4060
|
+
# Partial - a field left out is untouched, a field sent empty is cleared and the page falls back to what it fell back to before. Underneath these are three item attributes with reserved names, so this and the attributes endpoint reach the same storage; it exists separately because the names are not discoverable from the templates. Two things worth knowing. A title set here changes the document title only - og:title and twitter:title render the item's description either way. And there is no canonical or noindex field, because both are site wide switches rather than per item values.
|
|
4061
|
+
# @param storefront_oid [Integer]
|
|
4062
|
+
# @param item_seo_request [SfvbItemSeoRequest] Search metadata to change
|
|
4063
|
+
# @param [Hash] opts the optional parameters
|
|
4064
|
+
# @option opts [String] :merchant_item_id
|
|
4065
|
+
# @option opts [Integer] :merchant_item_oid
|
|
4066
|
+
# @return [SfvbItemResponse]
|
|
4067
|
+
def put_sfvb_item_seo(storefront_oid, item_seo_request, opts = {})
|
|
4068
|
+
data, _status_code, _headers = put_sfvb_item_seo_with_http_info(storefront_oid, item_seo_request, opts)
|
|
4069
|
+
data
|
|
4070
|
+
end
|
|
4071
|
+
|
|
4072
|
+
# Change an item's search metadata
|
|
4073
|
+
# Partial - a field left out is untouched, a field sent empty is cleared and the page falls back to what it fell back to before. Underneath these are three item attributes with reserved names, so this and the attributes endpoint reach the same storage; it exists separately because the names are not discoverable from the templates. Two things worth knowing. A title set here changes the document title only - og:title and twitter:title render the item's description either way. And there is no canonical or noindex field, because both are site wide switches rather than per item values.
|
|
4074
|
+
# @param storefront_oid [Integer]
|
|
4075
|
+
# @param item_seo_request [SfvbItemSeoRequest] Search metadata to change
|
|
4076
|
+
# @param [Hash] opts the optional parameters
|
|
4077
|
+
# @option opts [String] :merchant_item_id
|
|
4078
|
+
# @option opts [Integer] :merchant_item_oid
|
|
4079
|
+
# @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
|
|
4080
|
+
def put_sfvb_item_seo_with_http_info(storefront_oid, item_seo_request, opts = {})
|
|
4081
|
+
if @api_client.config.debugging
|
|
4082
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_seo ...'
|
|
4083
|
+
end
|
|
4084
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4085
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4086
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_seo"
|
|
4087
|
+
end
|
|
4088
|
+
# verify the required parameter 'item_seo_request' is set
|
|
4089
|
+
if @api_client.config.client_side_validation && item_seo_request.nil?
|
|
4090
|
+
fail ArgumentError, "Missing the required parameter 'item_seo_request' when calling SfvbApi.put_sfvb_item_seo"
|
|
4091
|
+
end
|
|
4092
|
+
# resource path
|
|
4093
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/items/seo'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
4094
|
+
|
|
4095
|
+
# query parameters
|
|
4096
|
+
query_params = opts[:query_params] || {}
|
|
4097
|
+
query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
|
|
4098
|
+
query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
|
|
4099
|
+
|
|
4100
|
+
# header parameters
|
|
4101
|
+
header_params = opts[:header_params] || {}
|
|
4102
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4103
|
+
# HTTP header 'Accept' (if needed)
|
|
4104
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4105
|
+
# HTTP header 'Content-Type'
|
|
4106
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4107
|
+
if !content_type.nil?
|
|
4108
|
+
header_params['Content-Type'] = content_type
|
|
4109
|
+
end
|
|
4110
|
+
|
|
4111
|
+
# form parameters
|
|
4112
|
+
form_params = opts[:form_params] || {}
|
|
4113
|
+
|
|
4114
|
+
# http body (model)
|
|
4115
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(item_seo_request)
|
|
4116
|
+
|
|
4117
|
+
# return_type
|
|
4118
|
+
return_type = opts[:debug_return_type] || 'SfvbItemResponse'
|
|
4119
|
+
|
|
4120
|
+
# auth_names
|
|
4121
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4122
|
+
|
|
4123
|
+
new_options = opts.merge(
|
|
4124
|
+
:operation => :"SfvbApi.put_sfvb_item_seo",
|
|
4125
|
+
:header_params => header_params,
|
|
4126
|
+
:query_params => query_params,
|
|
4127
|
+
:form_params => form_params,
|
|
4128
|
+
:body => post_body,
|
|
4129
|
+
:auth_names => auth_names,
|
|
4130
|
+
:return_type => return_type
|
|
4131
|
+
)
|
|
4132
|
+
|
|
4133
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
4134
|
+
if @api_client.config.debugging
|
|
4135
|
+
@api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_seo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4136
|
+
end
|
|
4137
|
+
return data, status_code, headers
|
|
4138
|
+
end
|
|
4139
|
+
|
|
3670
4140
|
# Replace a store menu's entries
|
|
3671
4141
|
# A whole menu replace, not a merge - what you send is what the menu holds afterwards, so read it, change the tree and send it back. Omitting items changes only the title; sending an empty array empties the menu. Writing a code that does not exist creates it. Every entry is checked before any of it is written, including that a merchant_item_id and a page_path actually resolve, so a tree with one bad entry changes nothing. Always needs sfvb_publish, because a menu is shared by every theme and there is no dormant copy to change instead.
|
|
3672
4142
|
# @param storefront_oid [Integer]
|