ultracart_api 4.1.259 → 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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -2
  3. data/docs/FraudApi.md +2 -2
  4. data/docs/OrderApi.md +191 -0
  5. data/docs/OrderCancelRequest.md +22 -0
  6. data/docs/OrderProcessPaymentRequest.md +3 -1
  7. data/docs/SfvbApi.md +224 -0
  8. data/docs/SfvbApprovalCreateRequest.md +2 -0
  9. data/docs/SfvbItemTranslation.md +28 -0
  10. data/docs/SfvbItemTranslationBatchRequest.md +20 -0
  11. data/docs/SfvbItemTranslationBatchResponse.md +46 -0
  12. data/docs/SfvbItemTranslationBatchRow.md +28 -0
  13. data/docs/SfvbItemTranslationBatchRowResult.md +34 -0
  14. data/docs/SfvbItemTranslationField.md +22 -0
  15. data/docs/SfvbItemTranslationWriteRequest.md +26 -0
  16. data/docs/SfvbItemTranslationsResponse.md +26 -0
  17. data/lib/ultracart_api/api/fraud_api.rb +4 -4
  18. data/lib/ultracart_api/api/order_api.rb +139 -0
  19. data/lib/ultracart_api/api/sfvb_api.rb +308 -0
  20. data/lib/ultracart_api/models/order_cancel_request.rb +240 -0
  21. data/lib/ultracart_api/models/order_process_payment_request.rb +14 -4
  22. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +15 -3
  23. data/lib/ultracart_api/models/sfvb_item_translation.rb +316 -0
  24. data/lib/ultracart_api/models/sfvb_item_translation_batch_request.rb +232 -0
  25. data/lib/ultracart_api/models/sfvb_item_translation_batch_response.rb +366 -0
  26. data/lib/ultracart_api/models/sfvb_item_translation_batch_row.rb +304 -0
  27. data/lib/ultracart_api/models/sfvb_item_translation_batch_row_result.rb +346 -0
  28. data/lib/ultracart_api/models/sfvb_item_translation_field.rb +276 -0
  29. data/lib/ultracart_api/models/sfvb_item_translation_write_request.rb +294 -0
  30. data/lib/ultracart_api/models/sfvb_item_translations_response.rb +264 -0
  31. data/lib/ultracart_api/version.rb +1 -1
  32. data/lib/ultracart_api.rb +9 -0
  33. metadata +20 -2
@@ -395,6 +395,81 @@ module UltracartClient
395
395
  return data, status_code, headers
396
396
  end
397
397
 
398
+ # Cancel an order with options
399
+ # Cancel an order on the UltraCart account, with the options in the request body. If the success flag is false, then consult the error message for why it failed. An empty request body behaves the same as cancelOrder.
400
+ # @param order_id [String] The order id to cancel.
401
+ # @param cancel_request [OrderCancelRequest] Cancel order options
402
+ # @param [Hash] opts the optional parameters
403
+ # @return [BaseResponse]
404
+ def cancel_order_with_options(order_id, cancel_request, opts = {})
405
+ data, _status_code, _headers = cancel_order_with_options_with_http_info(order_id, cancel_request, opts)
406
+ data
407
+ end
408
+
409
+ # Cancel an order with options
410
+ # Cancel an order on the UltraCart account, with the options in the request body. If the success flag is false, then consult the error message for why it failed. An empty request body behaves the same as cancelOrder.
411
+ # @param order_id [String] The order id to cancel.
412
+ # @param cancel_request [OrderCancelRequest] Cancel order options
413
+ # @param [Hash] opts the optional parameters
414
+ # @return [Array<(BaseResponse, Integer, Hash)>] BaseResponse data, response status code and response headers
415
+ def cancel_order_with_options_with_http_info(order_id, cancel_request, opts = {})
416
+ if @api_client.config.debugging
417
+ @api_client.config.logger.debug 'Calling API: OrderApi.cancel_order_with_options ...'
418
+ end
419
+ # verify the required parameter 'order_id' is set
420
+ if @api_client.config.client_side_validation && order_id.nil?
421
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.cancel_order_with_options"
422
+ end
423
+ # verify the required parameter 'cancel_request' is set
424
+ if @api_client.config.client_side_validation && cancel_request.nil?
425
+ fail ArgumentError, "Missing the required parameter 'cancel_request' when calling OrderApi.cancel_order_with_options"
426
+ end
427
+ # resource path
428
+ local_var_path = '/order/orders/{order_id}/cancel_with_options'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
429
+
430
+ # query parameters
431
+ query_params = opts[:query_params] || {}
432
+
433
+ # header parameters
434
+ header_params = opts[:header_params] || {}
435
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
436
+ # HTTP header 'Accept' (if needed)
437
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
438
+ # HTTP header 'Content-Type'
439
+ content_type = @api_client.select_header_content_type(['application/json'])
440
+ if !content_type.nil?
441
+ header_params['Content-Type'] = content_type
442
+ end
443
+
444
+ # form parameters
445
+ form_params = opts[:form_params] || {}
446
+
447
+ # http body (model)
448
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(cancel_request)
449
+
450
+ # return_type
451
+ return_type = opts[:debug_return_type] || 'BaseResponse'
452
+
453
+ # auth_names
454
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
455
+
456
+ new_options = opts.merge(
457
+ :operation => :"OrderApi.cancel_order_with_options",
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => return_type
464
+ )
465
+
466
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug "API called: OrderApi#cancel_order_with_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
+ end
470
+ return data, status_code, headers
471
+ end
472
+
398
473
  # Delete an order
399
474
  # Delete an order on the UltraCart account.
400
475
  # @param order_id [String] The order id to delete.
@@ -2755,6 +2830,70 @@ module UltracartClient
2755
2830
  return data, status_code, headers
2756
2831
  end
2757
2832
 
2833
+ # Send update billing email
2834
+ # Queues the update billing email to the customer on an order in Accounts Receivable, the same as the Send Billing Update button. The email is sent within a minute. The request is refused if the merchant has turned off the update billing notification, if a StoreFront communication flow handles unprocessed payments for the order, or if this method already sent the email for the order in the last 24 hours. While the order is less than 7 days old, a reminder is sent every 2 days.
2835
+ # @param order_id [String] The order id to send the update billing email for.
2836
+ # @param [Hash] opts the optional parameters
2837
+ # @return [BaseResponse]
2838
+ def send_update_billing_email(order_id, opts = {})
2839
+ data, _status_code, _headers = send_update_billing_email_with_http_info(order_id, opts)
2840
+ data
2841
+ end
2842
+
2843
+ # Send update billing email
2844
+ # Queues the update billing email to the customer on an order in Accounts Receivable, the same as the Send Billing Update button. The email is sent within a minute. The request is refused if the merchant has turned off the update billing notification, if a StoreFront communication flow handles unprocessed payments for the order, or if this method already sent the email for the order in the last 24 hours. While the order is less than 7 days old, a reminder is sent every 2 days.
2845
+ # @param order_id [String] The order id to send the update billing email for.
2846
+ # @param [Hash] opts the optional parameters
2847
+ # @return [Array<(BaseResponse, Integer, Hash)>] BaseResponse data, response status code and response headers
2848
+ def send_update_billing_email_with_http_info(order_id, opts = {})
2849
+ if @api_client.config.debugging
2850
+ @api_client.config.logger.debug 'Calling API: OrderApi.send_update_billing_email ...'
2851
+ end
2852
+ # verify the required parameter 'order_id' is set
2853
+ if @api_client.config.client_side_validation && order_id.nil?
2854
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.send_update_billing_email"
2855
+ end
2856
+ # resource path
2857
+ local_var_path = '/order/orders/{order_id}/send_update_billing_email'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
2858
+
2859
+ # query parameters
2860
+ query_params = opts[:query_params] || {}
2861
+
2862
+ # header parameters
2863
+ header_params = opts[:header_params] || {}
2864
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2865
+ # HTTP header 'Accept' (if needed)
2866
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2867
+
2868
+ # form parameters
2869
+ form_params = opts[:form_params] || {}
2870
+
2871
+ # http body (model)
2872
+ post_body = opts[:debug_body]
2873
+
2874
+ # return_type
2875
+ return_type = opts[:debug_return_type] || 'BaseResponse'
2876
+
2877
+ # auth_names
2878
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2879
+
2880
+ new_options = opts.merge(
2881
+ :operation => :"OrderApi.send_update_billing_email",
2882
+ :header_params => header_params,
2883
+ :query_params => query_params,
2884
+ :form_params => form_params,
2885
+ :body => post_body,
2886
+ :auth_names => auth_names,
2887
+ :return_type => return_type
2888
+ )
2889
+
2890
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2891
+ if @api_client.config.debugging
2892
+ @api_client.config.logger.debug "API called: OrderApi#send_update_billing_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2893
+ end
2894
+ return data, status_code, headers
2895
+ end
2896
+
2758
2897
  # Remove a refund block on an order
2759
2898
  # Removes a refund block on an order to prevent a user from performing a refund.
2760
2899
  # @param order_id [String] The order id to unblock a refund on.
@@ -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]