ultracart_api 4.1.260 → 4.1.261

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.
@@ -0,0 +1,34 @@
1
+ # UltracartClient::SfvbItemTranslationBatchRowResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **current_sha256** | **String** | The state of this field and language now. Send it back to apply. | [optional] |
8
+ | **current_source** | **String** | What shoppers see now in this language. | [optional] |
9
+ | **field** | **String** | The field, normalized. | [optional] |
10
+ | **language** | **String** | The language code. | [optional] |
11
+ | **merchant_item_id** | **String** | The item's merchant item id. | [optional] |
12
+ | **merchant_item_oid** | **Integer** | The item. Absent when not_found. | [optional] |
13
+ | **message** | **String** | Why a row is invalid, skipped, stale, error or deferred. | [optional] |
14
+ | **result** | **String** | change from a dry run, updated after an apply, skipped_hand (a hand translation is there and is never overwritten), stale (changed since the dry run), not_found, invalid, error when it could not be stored, or deferred when the apply ran out of time before reaching it (nothing changed, send it again). | [optional] |
15
+ | **row** | **Integer** | The row's position in the request, from 1. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'ultracart_api'
21
+
22
+ instance = UltracartClient::SfvbItemTranslationBatchRowResult.new(
23
+ current_sha256: null,
24
+ current_source: null,
25
+ field: null,
26
+ language: null,
27
+ merchant_item_id: null,
28
+ merchant_item_oid: null,
29
+ message: null,
30
+ result: null,
31
+ row: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,22 @@
1
+ # UltracartClient::SfvbItemTranslationField
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **english_text** | **String** | The item's English text for the field, the source of every translation. | [optional] |
8
+ | **field** | **String** | title or extended_description. | [optional] |
9
+ | **translations** | [**Array<SfvbItemTranslation>**](SfvbItemTranslation.md) | One entry per language, in the order of languages. | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::SfvbItemTranslationField.new(
17
+ english_text: null,
18
+ field: null,
19
+ translations: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::SfvbItemTranslationWriteRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **field** | **String** | title or extended_description. | [optional] |
8
+ | **language** | **String** | The language code, such as CHI, or its two-letter code. Must be enabled on the storefront. | [optional] |
9
+ | **merchant_item_id** | **String** | The item by its merchant item id. | [optional] |
10
+ | **merchant_item_oid** | **Integer** | The item. Send this or merchant_item_id, not both. | [optional] |
11
+ | **text** | **String** | The hand translation. An empty string removes the translation in both stores so machine translation fills it again. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::SfvbItemTranslationWriteRequest.new(
19
+ field: null,
20
+ language: null,
21
+ merchant_item_id: null,
22
+ merchant_item_oid: null,
23
+ text: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::SfvbItemTranslationsResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **fields** | [**Array<SfvbItemTranslationField>**](SfvbItemTranslationField.md) | title, then extended_description. | [optional] |
8
+ | **hash_sha256** | **String** | Over the English and every reported language of both fields. Send it as If-Match to change a translation. | [optional] |
9
+ | **languages** | **Array<String>** | The languages reported - the storefront's enabled languages other than English, or the one asked for. | [optional] |
10
+ | **merchant_item_id** | **String** | The item's merchant item id. | [optional] |
11
+ | **merchant_item_oid** | **Integer** | The item. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::SfvbItemTranslationsResponse.new(
19
+ fields: null,
20
+ hash_sha256: null,
21
+ languages: null,
22
+ merchant_item_id: null,
23
+ merchant_item_oid: null
24
+ )
25
+ ```
26
+
@@ -362,11 +362,11 @@ module UltracartClient
362
362
  end
363
363
 
364
364
  # Search fraud rules
365
- # Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case.
365
+ # Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case. Requests with an _offset of 10,000 or more return 400 Bad Request.
366
366
  # @param fraud_rule_search_request [FraudRuleSearchRequest] Fraud rule search request
367
367
  # @param [Hash] opts the optional parameters
368
368
  # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) (default to 100)
369
- # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
369
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. Must be less than 10,000. (default to 0)
370
370
  # @option opts [String] :_sort The sort order of the fraud rules. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
371
371
  # @return [FraudRulesResponse]
372
372
  def search_fraud_rules(fraud_rule_search_request, opts = {})
@@ -375,11 +375,11 @@ module UltracartClient
375
375
  end
376
376
 
377
377
  # Search fraud rules
378
- # Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case.
378
+ # Searches fraud rules for this merchant account using semantic filter fields. Pagination and sort are passed as query parameters (_limit, _offset, _sort). You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination. Results are capped at 10,000 records by ElasticSearch and the warning slot indicates when that cap was hit. Use more selective filters in that case. Requests with an _offset of 10,000 or more return 400 Bad Request.
379
379
  # @param fraud_rule_search_request [FraudRuleSearchRequest] Fraud rule search request
380
380
  # @param [Hash] opts the optional parameters
381
381
  # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) (default to 100)
382
- # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
382
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. Must be less than 10,000. (default to 0)
383
383
  # @option opts [String] :_sort The sort order of the fraud rules. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
384
384
  # @return [Array<(FraudRulesResponse, Integer, Hash)>] FraudRulesResponse data, response status code and response headers
385
385
  def search_fraud_rules_with_http_info(fraud_rule_search_request, opts = {})
@@ -3640,6 +3640,81 @@ module UltracartClient
3640
3640
  return data, status_code, headers
3641
3641
  end
3642
3642
 
3643
+ # Check hand translations across many items without storing them
3644
+ # Checks up to 100 rows on up to 25 items and answers each as change, skipped_hand (a hand translation is already there, in the store shoppers see or in the item editor's), not_found or invalid, with what shoppers see now and a current_sha256, plus a plan_hash over the change rows. Stores nothing. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled.
3645
+ # @param storefront_oid [Integer]
3646
+ # @param item_translation_batch_request [SfvbItemTranslationBatchRequest] The rows
3647
+ # @param [Hash] opts the optional parameters
3648
+ # @return [SfvbItemTranslationBatchResponse]
3649
+ def dry_run_sfvb_item_translation_batch(storefront_oid, item_translation_batch_request, opts = {})
3650
+ data, _status_code, _headers = dry_run_sfvb_item_translation_batch_with_http_info(storefront_oid, item_translation_batch_request, opts)
3651
+ data
3652
+ end
3653
+
3654
+ # Check hand translations across many items without storing them
3655
+ # Checks up to 100 rows on up to 25 items and answers each as change, skipped_hand (a hand translation is already there, in the store shoppers see or in the item editor&#39;s), not_found or invalid, with what shoppers see now and a current_sha256, plus a plan_hash over the change rows. Stores nothing. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled.
3656
+ # @param storefront_oid [Integer]
3657
+ # @param item_translation_batch_request [SfvbItemTranslationBatchRequest] The rows
3658
+ # @param [Hash] opts the optional parameters
3659
+ # @return [Array<(SfvbItemTranslationBatchResponse, Integer, Hash)>] SfvbItemTranslationBatchResponse data, response status code and response headers
3660
+ def dry_run_sfvb_item_translation_batch_with_http_info(storefront_oid, item_translation_batch_request, opts = {})
3661
+ if @api_client.config.debugging
3662
+ @api_client.config.logger.debug 'Calling API: SfvbApi.dry_run_sfvb_item_translation_batch ...'
3663
+ end
3664
+ # verify the required parameter 'storefront_oid' is set
3665
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3666
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.dry_run_sfvb_item_translation_batch"
3667
+ end
3668
+ # verify the required parameter 'item_translation_batch_request' is set
3669
+ if @api_client.config.client_side_validation && item_translation_batch_request.nil?
3670
+ fail ArgumentError, "Missing the required parameter 'item_translation_batch_request' when calling SfvbApi.dry_run_sfvb_item_translation_batch"
3671
+ end
3672
+ # resource path
3673
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/translations/batch/dry_run'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3674
+
3675
+ # query parameters
3676
+ query_params = opts[:query_params] || {}
3677
+
3678
+ # header parameters
3679
+ header_params = opts[:header_params] || {}
3680
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3681
+ # HTTP header 'Accept' (if needed)
3682
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3683
+ # HTTP header 'Content-Type'
3684
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
3685
+ if !content_type.nil?
3686
+ header_params['Content-Type'] = content_type
3687
+ end
3688
+
3689
+ # form parameters
3690
+ form_params = opts[:form_params] || {}
3691
+
3692
+ # http body (model)
3693
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_translation_batch_request)
3694
+
3695
+ # return_type
3696
+ return_type = opts[:debug_return_type] || 'SfvbItemTranslationBatchResponse'
3697
+
3698
+ # auth_names
3699
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3700
+
3701
+ new_options = opts.merge(
3702
+ :operation => :"SfvbApi.dry_run_sfvb_item_translation_batch",
3703
+ :header_params => header_params,
3704
+ :query_params => query_params,
3705
+ :form_params => form_params,
3706
+ :body => post_body,
3707
+ :auth_names => auth_names,
3708
+ :return_type => return_type
3709
+ )
3710
+
3711
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3712
+ if @api_client.config.debugging
3713
+ @api_client.config.logger.debug "API called: SfvbApi#dry_run_sfvb_item_translation_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3714
+ end
3715
+ return data, status_code, headers
3716
+ end
3717
+
3643
3718
  # Check a batch delete of redirect rules without writing it
3644
3719
  # Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
3645
3720
  # @param storefront_oid [Integer]
@@ -8579,6 +8654,79 @@ module UltracartClient
8579
8654
  return data, status_code, headers
8580
8655
  end
8581
8656
 
8657
+ # Read an item's title and extended description translations
8658
+ # For each of the two fields, the English and, per language enabled on the storefront (or the one asked for), what shoppers see (hand, machine, pending or none), what the item editor's translation dialog shows, and whether a hand translation is there, which a batch never overwrites. hash_sha256 is the If-Match for a change. Address by merchant_item_id or merchant_item_oid. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled.
8659
+ # @param storefront_oid [Integer]
8660
+ # @param [Hash] opts the optional parameters
8661
+ # @option opts [String] :merchant_item_id
8662
+ # @option opts [Integer] :merchant_item_oid
8663
+ # @option opts [String] :language
8664
+ # @return [SfvbItemTranslationsResponse]
8665
+ def get_sfvb_item_translations(storefront_oid, opts = {})
8666
+ data, _status_code, _headers = get_sfvb_item_translations_with_http_info(storefront_oid, opts)
8667
+ data
8668
+ end
8669
+
8670
+ # Read an item&#39;s title and extended description translations
8671
+ # For each of the two fields, the English and, per language enabled on the storefront (or the one asked for), what shoppers see (hand, machine, pending or none), what the item editor&#39;s translation dialog shows, and whether a hand translation is there, which a batch never overwrites. hash_sha256 is the If-Match for a change. Address by merchant_item_id or merchant_item_oid. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled.
8672
+ # @param storefront_oid [Integer]
8673
+ # @param [Hash] opts the optional parameters
8674
+ # @option opts [String] :merchant_item_id
8675
+ # @option opts [Integer] :merchant_item_oid
8676
+ # @option opts [String] :language
8677
+ # @return [Array<(SfvbItemTranslationsResponse, Integer, Hash)>] SfvbItemTranslationsResponse data, response status code and response headers
8678
+ def get_sfvb_item_translations_with_http_info(storefront_oid, opts = {})
8679
+ if @api_client.config.debugging
8680
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_translations ...'
8681
+ end
8682
+ # verify the required parameter 'storefront_oid' is set
8683
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8684
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_translations"
8685
+ end
8686
+ # resource path
8687
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/translations'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
8688
+
8689
+ # query parameters
8690
+ query_params = opts[:query_params] || {}
8691
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
8692
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
8693
+ query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil?
8694
+
8695
+ # header parameters
8696
+ header_params = opts[:header_params] || {}
8697
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8698
+ # HTTP header 'Accept' (if needed)
8699
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8700
+
8701
+ # form parameters
8702
+ form_params = opts[:form_params] || {}
8703
+
8704
+ # http body (model)
8705
+ post_body = opts[:debug_body]
8706
+
8707
+ # return_type
8708
+ return_type = opts[:debug_return_type] || 'SfvbItemTranslationsResponse'
8709
+
8710
+ # auth_names
8711
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
8712
+
8713
+ new_options = opts.merge(
8714
+ :operation => :"SfvbApi.get_sfvb_item_translations",
8715
+ :header_params => header_params,
8716
+ :query_params => query_params,
8717
+ :form_params => form_params,
8718
+ :body => post_body,
8719
+ :auth_names => auth_names,
8720
+ :return_type => return_type
8721
+ )
8722
+
8723
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
8724
+ if @api_client.config.debugging
8725
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_translations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8726
+ end
8727
+ return data, status_code, headers
8728
+ end
8729
+
8582
8730
  # Read an item's variations
8583
8731
  # The variation axes, such as Size, with their options in the order shoppers see them, and every filled combination with the child item it sells and its quantity. A combination not listed has no child, and storefronts show it as unavailable. hash_sha256 goes back as If-Match on the update. Address the parent by merchant_item_id or merchant_item_oid.
8584
8732
  # @param storefront_oid [Integer]
@@ -17225,6 +17373,88 @@ module UltracartClient
17225
17373
  return data, status_code, headers
17226
17374
  end
17227
17375
 
17376
+ # Set or remove one hand translation of an item's title or extended description
17377
+ # Stores the text as a hand translation in the given language, the same way the item editor's translation dialog saves, so the dialog shows it afterwards. An empty text removes the translation so machine translation fills it again. The language must be enabled on the storefront. The text gets the HTML safety check. Shoppers see it at once. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled. Needs Edit Items and sfvb_publish.
17378
+ # @param storefront_oid [Integer]
17379
+ # @param if_match [String] hash_sha256 from the last read of the item&#39;s translations. Required; 428 when absent, 412 when stale.
17380
+ # @param item_translation_write_request [SfvbItemTranslationWriteRequest] The translation
17381
+ # @param [Hash] opts the optional parameters
17382
+ # @return [SfvbItemTranslationsResponse]
17383
+ def put_sfvb_item_translation(storefront_oid, if_match, item_translation_write_request, opts = {})
17384
+ data, _status_code, _headers = put_sfvb_item_translation_with_http_info(storefront_oid, if_match, item_translation_write_request, opts)
17385
+ data
17386
+ end
17387
+
17388
+ # Set or remove one hand translation of an item&#39;s title or extended description
17389
+ # Stores the text as a hand translation in the given language, the same way the item editor&#39;s translation dialog saves, so the dialog shows it afterwards. An empty text removes the translation so machine translation fills it again. The language must be enabled on the storefront. The text gets the HTML safety check. Shoppers see it at once. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled. Needs Edit Items and sfvb_publish.
17390
+ # @param storefront_oid [Integer]
17391
+ # @param if_match [String] hash_sha256 from the last read of the item&#39;s translations. Required; 428 when absent, 412 when stale.
17392
+ # @param item_translation_write_request [SfvbItemTranslationWriteRequest] The translation
17393
+ # @param [Hash] opts the optional parameters
17394
+ # @return [Array<(SfvbItemTranslationsResponse, Integer, Hash)>] SfvbItemTranslationsResponse data, response status code and response headers
17395
+ def put_sfvb_item_translation_with_http_info(storefront_oid, if_match, item_translation_write_request, opts = {})
17396
+ if @api_client.config.debugging
17397
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_translation ...'
17398
+ end
17399
+ # verify the required parameter 'storefront_oid' is set
17400
+ if @api_client.config.client_side_validation && storefront_oid.nil?
17401
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_translation"
17402
+ end
17403
+ # verify the required parameter 'if_match' is set
17404
+ if @api_client.config.client_side_validation && if_match.nil?
17405
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_item_translation"
17406
+ end
17407
+ # verify the required parameter 'item_translation_write_request' is set
17408
+ if @api_client.config.client_side_validation && item_translation_write_request.nil?
17409
+ fail ArgumentError, "Missing the required parameter 'item_translation_write_request' when calling SfvbApi.put_sfvb_item_translation"
17410
+ end
17411
+ # resource path
17412
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/translations'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
17413
+
17414
+ # query parameters
17415
+ query_params = opts[:query_params] || {}
17416
+
17417
+ # header parameters
17418
+ header_params = opts[:header_params] || {}
17419
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
17420
+ # HTTP header 'Accept' (if needed)
17421
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
17422
+ # HTTP header 'Content-Type'
17423
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
17424
+ if !content_type.nil?
17425
+ header_params['Content-Type'] = content_type
17426
+ end
17427
+ header_params[:'If-Match'] = if_match
17428
+
17429
+ # form parameters
17430
+ form_params = opts[:form_params] || {}
17431
+
17432
+ # http body (model)
17433
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_translation_write_request)
17434
+
17435
+ # return_type
17436
+ return_type = opts[:debug_return_type] || 'SfvbItemTranslationsResponse'
17437
+
17438
+ # auth_names
17439
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
17440
+
17441
+ new_options = opts.merge(
17442
+ :operation => :"SfvbApi.put_sfvb_item_translation",
17443
+ :header_params => header_params,
17444
+ :query_params => query_params,
17445
+ :form_params => form_params,
17446
+ :body => post_body,
17447
+ :auth_names => auth_names,
17448
+ :return_type => return_type
17449
+ )
17450
+
17451
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
17452
+ if @api_client.config.debugging
17453
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_translation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
17454
+ end
17455
+ return data, status_code, headers
17456
+ end
17457
+
17228
17458
  # Change an item's variations
17229
17459
  # A list of changes applied in order - add_axis, remove_axis, rename_axis, add_option, remove_option, rename_option, reorder_options, set_default, set_default_text, set_option_multimedia and set_combination. Every change is checked before anything is saved, and nothing the list doesn't mention changes. Child items must already exist; create one with POST items/children. Needs sfvb_publish when items are live and If-Match with the hash_sha256 from the read. Removing an axis, removing an option whose combinations sell a child, or re-pointing or clearing a combination shoppers can buy today also needs the approval of the person who signed in the CLI - an approved item.variations request for this item and exactly this list. Adding never does. dry_run returns the planned variations, what each change does, and whether approval is needed.
17230
17460
  # @param storefront_oid [Integer]
@@ -21822,6 +22052,84 @@ module UltracartClient
21822
22052
  return data, status_code, headers
21823
22053
  end
21824
22054
 
22055
+ # Store hand translations across many items in one call
22056
+ # Stores exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256, the same way the item editor's translation dialog saves. A row whose field gained a hand translation since the dry run is skipped, never overwritten, and one that changed otherwise is skipped as stale. A row that cannot be stored does not stop the others. An apply stops starting new writes after about 40 seconds and answers the rows it did not reach as deferred, unchanged, to send again as a new batch. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled. Needs Edit Items, sfvb_publish and the approval of the person who signed in the CLI, an approved item.translation_batch request for exactly these rows in the Approval-Id header.
22057
+ # @param storefront_oid [Integer]
22058
+ # @param item_translation_batch_request [SfvbItemTranslationBatchRequest] The dry run&#39;s change rows and plan_hash
22059
+ # @param [Hash] opts the optional parameters
22060
+ # @option opts [String] :approval_id The approval_id of an approved item.translation_batch request for exactly these rows. Required. See POST /sfvb/approvals.
22061
+ # @return [SfvbItemTranslationBatchResponse]
22062
+ def update_sfvb_item_translation_batch(storefront_oid, item_translation_batch_request, opts = {})
22063
+ data, _status_code, _headers = update_sfvb_item_translation_batch_with_http_info(storefront_oid, item_translation_batch_request, opts)
22064
+ data
22065
+ end
22066
+
22067
+ # Store hand translations across many items in one call
22068
+ # Stores exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256, the same way the item editor&#39;s translation dialog saves. A row whose field gained a hand translation since the dry run is skipped, never overwritten, and one that changed otherwise is skipped as stale. A row that cannot be stored does not stop the others. An apply stops starting new writes after about 40 seconds and answers the rows it did not reach as deferred, unchanged, to send again as a new batch. A translation belongs to the item, so it shows on every storefront of the account that renders the item; the storefront in the path only decides which languages are enabled. Needs Edit Items, sfvb_publish and the approval of the person who signed in the CLI, an approved item.translation_batch request for exactly these rows in the Approval-Id header.
22069
+ # @param storefront_oid [Integer]
22070
+ # @param item_translation_batch_request [SfvbItemTranslationBatchRequest] The dry run&#39;s change rows and plan_hash
22071
+ # @param [Hash] opts the optional parameters
22072
+ # @option opts [String] :approval_id The approval_id of an approved item.translation_batch request for exactly these rows. Required. See POST /sfvb/approvals.
22073
+ # @return [Array<(SfvbItemTranslationBatchResponse, Integer, Hash)>] SfvbItemTranslationBatchResponse data, response status code and response headers
22074
+ def update_sfvb_item_translation_batch_with_http_info(storefront_oid, item_translation_batch_request, opts = {})
22075
+ if @api_client.config.debugging
22076
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_item_translation_batch ...'
22077
+ end
22078
+ # verify the required parameter 'storefront_oid' is set
22079
+ if @api_client.config.client_side_validation && storefront_oid.nil?
22080
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_item_translation_batch"
22081
+ end
22082
+ # verify the required parameter 'item_translation_batch_request' is set
22083
+ if @api_client.config.client_side_validation && item_translation_batch_request.nil?
22084
+ fail ArgumentError, "Missing the required parameter 'item_translation_batch_request' when calling SfvbApi.update_sfvb_item_translation_batch"
22085
+ end
22086
+ # resource path
22087
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/translations/batch'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
22088
+
22089
+ # query parameters
22090
+ query_params = opts[:query_params] || {}
22091
+
22092
+ # header parameters
22093
+ header_params = opts[:header_params] || {}
22094
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
22095
+ # HTTP header 'Accept' (if needed)
22096
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
22097
+ # HTTP header 'Content-Type'
22098
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
22099
+ if !content_type.nil?
22100
+ header_params['Content-Type'] = content_type
22101
+ end
22102
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
22103
+
22104
+ # form parameters
22105
+ form_params = opts[:form_params] || {}
22106
+
22107
+ # http body (model)
22108
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_translation_batch_request)
22109
+
22110
+ # return_type
22111
+ return_type = opts[:debug_return_type] || 'SfvbItemTranslationBatchResponse'
22112
+
22113
+ # auth_names
22114
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
22115
+
22116
+ new_options = opts.merge(
22117
+ :operation => :"SfvbApi.update_sfvb_item_translation_batch",
22118
+ :header_params => header_params,
22119
+ :query_params => query_params,
22120
+ :form_params => form_params,
22121
+ :body => post_body,
22122
+ :auth_names => auth_names,
22123
+ :return_type => return_type
22124
+ )
22125
+
22126
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
22127
+ if @api_client.config.debugging
22128
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_item_translation_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
22129
+ end
22130
+ return data, status_code, headers
22131
+ end
22132
+
21825
22133
  # Update a library entry's draft
21826
22134
  # A full replace of the draft's fields. Owner only. Send the hash_sha256 you read as If-Match. Every save increments revision_number; nothing other merchants see changes until the draft is published. A changed fragment is re-scanned and its images copied again, and screenshot_stale tells you to retake the screenshot.
21827
22135
  # @param storefront_oid [Integer]
@@ -46,6 +46,9 @@ module UltracartClient
46
46
 
47
47
  attr_accessor :item_pricing
48
48
 
49
+ # For item.translation_batch, exactly the rows the batch will send - the dry run's change rows, each with merchant_item_oid, field, language, text and current_sha256. UltraCart keeps only their hash.
50
+ attr_accessor :item_translation_rows
51
+
49
52
  attr_accessor :item_variations
50
53
 
51
54
  attr_accessor :params
@@ -106,6 +109,7 @@ module UltracartClient
106
109
  :'item_preorder' => :'item_preorder',
107
110
  :'item_preorder_children' => :'item_preorder_children',
108
111
  :'item_pricing' => :'item_pricing',
112
+ :'item_translation_rows' => :'item_translation_rows',
109
113
  :'item_variations' => :'item_variations',
110
114
  :'params' => :'params',
111
115
  :'postcard_test_mail' => :'postcard_test_mail',
@@ -140,6 +144,7 @@ module UltracartClient
140
144
  :'item_preorder' => :'SfvbItemPreorderRequest',
141
145
  :'item_preorder_children' => :'SfvbItemPreorderChildrenRequest',
142
146
  :'item_pricing' => :'SfvbItemPricingRequest',
147
+ :'item_translation_rows' => :'Array<SfvbItemTranslationBatchRow>',
143
148
  :'item_variations' => :'SfvbItemVariationsRequest',
144
149
  :'params' => :'SfvbApprovalParams',
145
150
  :'postcard_test_mail' => :'SfvbCommsTestPostcardRequest',
@@ -230,6 +235,12 @@ module UltracartClient
230
235
  self.item_pricing = attributes[:'item_pricing']
231
236
  end
232
237
 
238
+ if attributes.key?(:'item_translation_rows')
239
+ if (value = attributes[:'item_translation_rows']).is_a?(Array)
240
+ self.item_translation_rows = value
241
+ end
242
+ end
243
+
233
244
  if attributes.key?(:'item_variations')
234
245
  self.item_variations = attributes[:'item_variations']
235
246
  end
@@ -283,7 +294,7 @@ module UltracartClient
283
294
  # Check to see if the all the properties in the model are valid
284
295
  # @return true if the model is valid
285
296
  def valid?
286
- action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill", "page.move", "storefront_cache.flush", "cli.location"])
297
+ action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "item.translation_batch", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill", "page.move", "storefront_cache.flush", "cli.location"])
287
298
  return false unless action_validator.valid?(@action)
288
299
  true
289
300
  end
@@ -291,7 +302,7 @@ module UltracartClient
291
302
  # Custom attribute writer method checking allowed values (enum).
292
303
  # @param [Object] action Object to be assigned
293
304
  def action=(action)
294
- validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill", "page.move", "storefront_cache.flush", "cli.location"])
305
+ validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "file.put_template", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "item.translation_batch", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill", "page.move", "storefront_cache.flush", "cli.location"])
295
306
  unless validator.valid?(action)
296
307
  fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
297
308
  end
@@ -316,6 +327,7 @@ module UltracartClient
316
327
  item_preorder == o.item_preorder &&
317
328
  item_preorder_children == o.item_preorder_children &&
318
329
  item_pricing == o.item_pricing &&
330
+ item_translation_rows == o.item_translation_rows &&
319
331
  item_variations == o.item_variations &&
320
332
  params == o.params &&
321
333
  postcard_test_mail == o.postcard_test_mail &&
@@ -337,7 +349,7 @@ module UltracartClient
337
349
  # Calculates hash code according to all attributes.
338
350
  # @return [Integer] Hash code
339
351
  def hash
340
- [action, affiliate_network, comms_list_import, comms_settings, content, delegate_email, experiment_start, flow_backfill, item_attribute_rows, item_default_page_rows, item_preorder, item_preorder_children, item_pricing, item_variations, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
352
+ [action, affiliate_network, comms_list_import, comms_settings, content, delegate_email, experiment_start, flow_backfill, item_attribute_rows, item_default_page_rows, item_preorder, item_preorder_children, item_pricing, item_translation_rows, item_variations, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
341
353
  end
342
354
 
343
355
  # Builds the object from hash