ultracart_api 4.1.169 → 4.1.171

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -2
  3. data/docs/SfvbApi.md +1786 -591
  4. data/docs/SfvbItemAttribute.md +34 -0
  5. data/docs/SfvbItemAttributeUpdate.md +22 -0
  6. data/docs/SfvbItemAttributeUpdateRequest.md +18 -0
  7. data/docs/SfvbItemContentRequest.md +20 -0
  8. data/docs/SfvbItemMultimedia.md +34 -0
  9. data/docs/SfvbItemMultimediaRequest.md +24 -0
  10. data/docs/SfvbItemResponse.md +32 -0
  11. data/docs/SfvbItemSeo.md +34 -0
  12. data/docs/SfvbItemSeoRequest.md +22 -0
  13. data/docs/SfvbPageResponse.md +2 -0
  14. data/docs/SfvbUpsellItemLogic.md +24 -0
  15. data/docs/SfvbUpsellItemLogicItem.md +22 -0
  16. data/docs/SfvbUpsellOffer.md +118 -8
  17. data/docs/SfvbUpsellPath.md +48 -0
  18. data/docs/SfvbUpsellPathDuplicateRequest.md +18 -0
  19. data/docs/SfvbUpsellPathMoveRequest.md +18 -0
  20. data/docs/SfvbUpsellPathsResponse.md +28 -0
  21. data/docs/SfvbUpsellStats.md +54 -0
  22. data/docs/SfvbUpsellStep.md +22 -0
  23. data/docs/SfvbUpsellStepOffer.md +32 -0
  24. data/docs/SfvbUpsellTowerData.md +20 -0
  25. data/docs/SfvbUpsellVariation.md +22 -0
  26. data/lib/ultracart_api/api/sfvb_api.rb +1731 -83
  27. data/lib/ultracart_api/models/sfvb_item_attribute.rb +336 -0
  28. data/lib/ultracart_api/models/sfvb_item_attribute_update.rb +274 -0
  29. data/lib/ultracart_api/models/sfvb_item_attribute_update_request.rb +222 -0
  30. data/lib/ultracart_api/models/sfvb_item_content_request.rb +230 -0
  31. data/lib/ultracart_api/models/sfvb_item_multimedia.rb +334 -0
  32. data/lib/ultracart_api/models/sfvb_item_multimedia_request.rb +250 -0
  33. data/lib/ultracart_api/models/sfvb_item_response.rb +295 -0
  34. data/lib/ultracart_api/models/sfvb_item_seo.rb +358 -0
  35. data/lib/ultracart_api/models/sfvb_item_seo_request.rb +240 -0
  36. data/lib/ultracart_api/models/sfvb_page_response.rb +11 -1
  37. data/lib/ultracart_api/models/sfvb_upsell_item_logic.rb +252 -0
  38. data/lib/ultracart_api/models/sfvb_upsell_item_logic_item.rb +240 -0
  39. data/lib/ultracart_api/models/sfvb_upsell_offer.rb +598 -9
  40. data/lib/ultracart_api/models/sfvb_upsell_path.rb +373 -0
  41. data/lib/ultracart_api/models/sfvb_upsell_path_duplicate_request.rb +220 -0
  42. data/lib/ultracart_api/models/sfvb_upsell_path_move_request.rb +220 -0
  43. data/lib/ultracart_api/models/sfvb_upsell_paths_response.rb +272 -0
  44. data/lib/ultracart_api/models/sfvb_upsell_stats.rb +400 -0
  45. data/lib/ultracart_api/models/sfvb_upsell_step.rb +241 -0
  46. data/lib/ultracart_api/models/sfvb_upsell_step_offer.rb +288 -0
  47. data/lib/ultracart_api/models/sfvb_upsell_tower_data.rb +234 -0
  48. data/lib/ultracart_api/models/sfvb_upsell_variation.rb +241 -0
  49. data/lib/ultracart_api/version.rb +1 -1
  50. data/lib/ultracart_api.rb +20 -0
  51. metadata +42 -2
@@ -196,6 +196,76 @@ module UltracartClient
196
196
  return data, status_code, headers
197
197
  end
198
198
 
199
+ # Archive an upsell path
200
+ # Files the path out of the default list. An archived path does not run. Archiving one that is switched on is a live change and needs sfvb_publish.
201
+ # @param storefront_oid [Integer]
202
+ # @param upsell_path_oid [Integer]
203
+ # @param [Hash] opts the optional parameters
204
+ # @return [SfvbUpsellPath]
205
+ def archive_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
206
+ data, _status_code, _headers = archive_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
207
+ data
208
+ end
209
+
210
+ # Archive an upsell path
211
+ # Files the path out of the default list. An archived path does not run. Archiving one that is switched on is a live change and needs sfvb_publish.
212
+ # @param storefront_oid [Integer]
213
+ # @param upsell_path_oid [Integer]
214
+ # @param [Hash] opts the optional parameters
215
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
216
+ def archive_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug 'Calling API: SfvbApi.archive_sfvb_upsell_path ...'
219
+ end
220
+ # verify the required parameter 'storefront_oid' is set
221
+ if @api_client.config.client_side_validation && storefront_oid.nil?
222
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.archive_sfvb_upsell_path"
223
+ end
224
+ # verify the required parameter 'upsell_path_oid' is set
225
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
226
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.archive_sfvb_upsell_path"
227
+ end
228
+ # resource path
229
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/archive'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
230
+
231
+ # query parameters
232
+ query_params = opts[:query_params] || {}
233
+
234
+ # header parameters
235
+ header_params = opts[:header_params] || {}
236
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
237
+ # HTTP header 'Accept' (if needed)
238
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
+
240
+ # form parameters
241
+ form_params = opts[:form_params] || {}
242
+
243
+ # http body (model)
244
+ post_body = opts[:debug_body]
245
+
246
+ # return_type
247
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
248
+
249
+ # auth_names
250
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
251
+
252
+ new_options = opts.merge(
253
+ :operation => :"SfvbApi.archive_sfvb_upsell_path",
254
+ :header_params => header_params,
255
+ :query_params => query_params,
256
+ :form_params => form_params,
257
+ :body => post_body,
258
+ :auth_names => auth_names,
259
+ :return_type => return_type
260
+ )
261
+
262
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug "API called: SfvbApi#archive_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
265
+ end
266
+ return data, status_code, headers
267
+ end
268
+
199
269
  # Compile CJSON to Velocity
200
270
  # Compiles a container document to Velocity without storing anything. Supply theme_oid to compile with the theme's inherit groups applied; omit it to compile standalone.
201
271
  # @param compile_request [SfvbCompileRequest] CJSON to compile
@@ -474,6 +544,159 @@ module UltracartClient
474
544
  return data, status_code, headers
475
545
  end
476
546
 
547
+ # Delete an attribute from an item
548
+ # Removes one attribute that no template on the item's pages declares - a test name, a misspelling, one a retired template used. A declared attribute is refused, because the template would list it again, empty; send an empty value through the attributes update to clear one of those instead.
549
+ # @param storefront_oid [Integer]
550
+ # @param name [String] The attribute name, matched without regard to case
551
+ # @param [Hash] opts the optional parameters
552
+ # @option opts [String] :merchant_item_id
553
+ # @option opts [Integer] :merchant_item_oid
554
+ # @return [SfvbItemResponse]
555
+ def delete_sfvb_item_attribute(storefront_oid, name, opts = {})
556
+ data, _status_code, _headers = delete_sfvb_item_attribute_with_http_info(storefront_oid, name, opts)
557
+ data
558
+ end
559
+
560
+ # Delete an attribute from an item
561
+ # Removes one attribute that no template on the item&#39;s pages declares - a test name, a misspelling, one a retired template used. A declared attribute is refused, because the template would list it again, empty; send an empty value through the attributes update to clear one of those instead.
562
+ # @param storefront_oid [Integer]
563
+ # @param name [String] The attribute name, matched without regard to case
564
+ # @param [Hash] opts the optional parameters
565
+ # @option opts [String] :merchant_item_id
566
+ # @option opts [Integer] :merchant_item_oid
567
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
568
+ def delete_sfvb_item_attribute_with_http_info(storefront_oid, name, opts = {})
569
+ if @api_client.config.debugging
570
+ @api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_item_attribute ...'
571
+ end
572
+ # verify the required parameter 'storefront_oid' is set
573
+ if @api_client.config.client_side_validation && storefront_oid.nil?
574
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_item_attribute"
575
+ end
576
+ # verify the required parameter 'name' is set
577
+ if @api_client.config.client_side_validation && name.nil?
578
+ fail ArgumentError, "Missing the required parameter 'name' when calling SfvbApi.delete_sfvb_item_attribute"
579
+ end
580
+ # resource path
581
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
582
+
583
+ # query parameters
584
+ query_params = opts[:query_params] || {}
585
+ query_params[:'name'] = name
586
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
587
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
588
+
589
+ # header parameters
590
+ header_params = opts[:header_params] || {}
591
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
592
+ # HTTP header 'Accept' (if needed)
593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body]
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"SfvbApi.delete_sfvb_item_attribute",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_item_attribute\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
624
+ # Detach an image from an item
625
+ # 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.
626
+ # @param storefront_oid [Integer]
627
+ # @param [Hash] opts the optional parameters
628
+ # @option opts [String] :merchant_item_id
629
+ # @option opts [Integer] :merchant_item_oid
630
+ # @option opts [String] :code The image code to detach
631
+ # @option opts [Boolean] :default Detach the default image instead of a coded one
632
+ # @return [SfvbItemResponse]
633
+ def delete_sfvb_item_multimedia(storefront_oid, opts = {})
634
+ data, _status_code, _headers = delete_sfvb_item_multimedia_with_http_info(storefront_oid, opts)
635
+ data
636
+ end
637
+
638
+ # Detach an image from an item
639
+ # Removes the item&#39;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.
640
+ # @param storefront_oid [Integer]
641
+ # @param [Hash] opts the optional parameters
642
+ # @option opts [String] :merchant_item_id
643
+ # @option opts [Integer] :merchant_item_oid
644
+ # @option opts [String] :code The image code to detach
645
+ # @option opts [Boolean] :default Detach the default image instead of a coded one
646
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
647
+ def delete_sfvb_item_multimedia_with_http_info(storefront_oid, opts = {})
648
+ if @api_client.config.debugging
649
+ @api_client.config.logger.debug 'Calling API: SfvbApi.delete_sfvb_item_multimedia ...'
650
+ end
651
+ # verify the required parameter 'storefront_oid' is set
652
+ if @api_client.config.client_side_validation && storefront_oid.nil?
653
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.delete_sfvb_item_multimedia"
654
+ end
655
+ # resource path
656
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
657
+
658
+ # query parameters
659
+ query_params = opts[:query_params] || {}
660
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
661
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
662
+ query_params[:'code'] = opts[:'code'] if !opts[:'code'].nil?
663
+ query_params[:'default'] = opts[:'default'] if !opts[:'default'].nil?
664
+
665
+ # header parameters
666
+ header_params = opts[:header_params] || {}
667
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
668
+ # HTTP header 'Accept' (if needed)
669
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
670
+
671
+ # form parameters
672
+ form_params = opts[:form_params] || {}
673
+
674
+ # http body (model)
675
+ post_body = opts[:debug_body]
676
+
677
+ # return_type
678
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
679
+
680
+ # auth_names
681
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
682
+
683
+ new_options = opts.merge(
684
+ :operation => :"SfvbApi.delete_sfvb_item_multimedia",
685
+ :header_params => header_params,
686
+ :query_params => query_params,
687
+ :form_params => form_params,
688
+ :body => post_body,
689
+ :auth_names => auth_names,
690
+ :return_type => return_type
691
+ )
692
+
693
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
694
+ if @api_client.config.debugging
695
+ @api_client.config.logger.debug "API called: SfvbApi#delete_sfvb_item_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
696
+ end
697
+ return data, status_code, headers
698
+ end
699
+
477
700
  # Detach an image from a page
478
701
  # 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
702
  # @param storefront_oid [Integer]
@@ -621,6 +844,146 @@ module UltracartClient
621
844
  return data, status_code, headers
622
845
  end
623
846
 
847
+ # Disable an upsell offer
848
+ # Switches the offer off. Disabling one that is switched on is a live change and needs sfvb_publish. An offer that is already off is returned unchanged. There is no delete.
849
+ # @param storefront_oid [Integer]
850
+ # @param upsell_offer_oid [Integer]
851
+ # @param [Hash] opts the optional parameters
852
+ # @return [SfvbUpsellOffer]
853
+ def disable_sfvb_upsell_offer(storefront_oid, upsell_offer_oid, opts = {})
854
+ data, _status_code, _headers = disable_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts)
855
+ data
856
+ end
857
+
858
+ # Disable an upsell offer
859
+ # Switches the offer off. Disabling one that is switched on is a live change and needs sfvb_publish. An offer that is already off is returned unchanged. There is no delete.
860
+ # @param storefront_oid [Integer]
861
+ # @param upsell_offer_oid [Integer]
862
+ # @param [Hash] opts the optional parameters
863
+ # @return [Array<(SfvbUpsellOffer, Integer, Hash)>] SfvbUpsellOffer data, response status code and response headers
864
+ def disable_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts = {})
865
+ if @api_client.config.debugging
866
+ @api_client.config.logger.debug 'Calling API: SfvbApi.disable_sfvb_upsell_offer ...'
867
+ end
868
+ # verify the required parameter 'storefront_oid' is set
869
+ if @api_client.config.client_side_validation && storefront_oid.nil?
870
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.disable_sfvb_upsell_offer"
871
+ end
872
+ # verify the required parameter 'upsell_offer_oid' is set
873
+ if @api_client.config.client_side_validation && upsell_offer_oid.nil?
874
+ fail ArgumentError, "Missing the required parameter 'upsell_offer_oid' when calling SfvbApi.disable_sfvb_upsell_offer"
875
+ end
876
+ # resource path
877
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers/{upsell_offer_oid}/disable'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_offer_oid' + '}', CGI.escape(upsell_offer_oid.to_s))
878
+
879
+ # query parameters
880
+ query_params = opts[:query_params] || {}
881
+
882
+ # header parameters
883
+ header_params = opts[:header_params] || {}
884
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
885
+ # HTTP header 'Accept' (if needed)
886
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
887
+
888
+ # form parameters
889
+ form_params = opts[:form_params] || {}
890
+
891
+ # http body (model)
892
+ post_body = opts[:debug_body]
893
+
894
+ # return_type
895
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffer'
896
+
897
+ # auth_names
898
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
899
+
900
+ new_options = opts.merge(
901
+ :operation => :"SfvbApi.disable_sfvb_upsell_offer",
902
+ :header_params => header_params,
903
+ :query_params => query_params,
904
+ :form_params => form_params,
905
+ :body => post_body,
906
+ :auth_names => auth_names,
907
+ :return_type => return_type
908
+ )
909
+
910
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
911
+ if @api_client.config.debugging
912
+ @api_client.config.logger.debug "API called: SfvbApi#disable_sfvb_upsell_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
913
+ end
914
+ return data, status_code, headers
915
+ end
916
+
917
+ # Disable an upsell path
918
+ # Switches the path off. Disabling a running path is a live change and needs sfvb_publish. A path that is already off is returned unchanged. There is no delete.
919
+ # @param storefront_oid [Integer]
920
+ # @param upsell_path_oid [Integer]
921
+ # @param [Hash] opts the optional parameters
922
+ # @return [SfvbUpsellPath]
923
+ def disable_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
924
+ data, _status_code, _headers = disable_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
925
+ data
926
+ end
927
+
928
+ # Disable an upsell path
929
+ # Switches the path off. Disabling a running path is a live change and needs sfvb_publish. A path that is already off is returned unchanged. There is no delete.
930
+ # @param storefront_oid [Integer]
931
+ # @param upsell_path_oid [Integer]
932
+ # @param [Hash] opts the optional parameters
933
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
934
+ def disable_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
935
+ if @api_client.config.debugging
936
+ @api_client.config.logger.debug 'Calling API: SfvbApi.disable_sfvb_upsell_path ...'
937
+ end
938
+ # verify the required parameter 'storefront_oid' is set
939
+ if @api_client.config.client_side_validation && storefront_oid.nil?
940
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.disable_sfvb_upsell_path"
941
+ end
942
+ # verify the required parameter 'upsell_path_oid' is set
943
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
944
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.disable_sfvb_upsell_path"
945
+ end
946
+ # resource path
947
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/disable'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
948
+
949
+ # query parameters
950
+ query_params = opts[:query_params] || {}
951
+
952
+ # header parameters
953
+ header_params = opts[:header_params] || {}
954
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
955
+ # HTTP header 'Accept' (if needed)
956
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
957
+
958
+ # form parameters
959
+ form_params = opts[:form_params] || {}
960
+
961
+ # http body (model)
962
+ post_body = opts[:debug_body]
963
+
964
+ # return_type
965
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
966
+
967
+ # auth_names
968
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
969
+
970
+ new_options = opts.merge(
971
+ :operation => :"SfvbApi.disable_sfvb_upsell_path",
972
+ :header_params => header_params,
973
+ :query_params => query_params,
974
+ :form_params => form_params,
975
+ :body => post_body,
976
+ :auth_names => auth_names,
977
+ :return_type => return_type
978
+ )
979
+
980
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
981
+ if @api_client.config.debugging
982
+ @api_client.config.logger.debug "API called: SfvbApi#disable_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
983
+ end
984
+ return data, status_code, headers
985
+ end
986
+
624
987
  # Read a storefront file's raw bytes
625
988
  # Returns the file itself rather than a JSON envelope, for any type including binaries that files/content refuses. Use this to verify what you uploaded, and note it is the only way to read a file inside a theme that is not active - such a file is served to nobody until the theme is promoted, so it has no public URL to fetch instead. On success the body is the file; on failure it is the usual JSON error object, so do not assume the content type without checking the status.
626
989
  # @param storefront_oid [Integer]
@@ -844,7 +1207,154 @@ module UltracartClient
844
1207
  return data, status_code, headers
845
1208
  end
846
1209
 
847
- # End an experiment
1210
+ # Duplicate an upsell offer
1211
+ # A copy named Copy of, switched off, with its own copy of the container. Put it on a path with a path update to have it shown.
1212
+ # @param storefront_oid [Integer]
1213
+ # @param upsell_offer_oid [Integer]
1214
+ # @param [Hash] opts the optional parameters
1215
+ # @return [SfvbUpsellOffer]
1216
+ def duplicate_sfvb_upsell_offer(storefront_oid, upsell_offer_oid, opts = {})
1217
+ data, _status_code, _headers = duplicate_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts)
1218
+ data
1219
+ end
1220
+
1221
+ # Duplicate an upsell offer
1222
+ # A copy named Copy of, switched off, with its own copy of the container. Put it on a path with a path update to have it shown.
1223
+ # @param storefront_oid [Integer]
1224
+ # @param upsell_offer_oid [Integer]
1225
+ # @param [Hash] opts the optional parameters
1226
+ # @return [Array<(SfvbUpsellOffer, Integer, Hash)>] SfvbUpsellOffer data, response status code and response headers
1227
+ def duplicate_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts = {})
1228
+ if @api_client.config.debugging
1229
+ @api_client.config.logger.debug 'Calling API: SfvbApi.duplicate_sfvb_upsell_offer ...'
1230
+ end
1231
+ # verify the required parameter 'storefront_oid' is set
1232
+ if @api_client.config.client_side_validation && storefront_oid.nil?
1233
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.duplicate_sfvb_upsell_offer"
1234
+ end
1235
+ # verify the required parameter 'upsell_offer_oid' is set
1236
+ if @api_client.config.client_side_validation && upsell_offer_oid.nil?
1237
+ fail ArgumentError, "Missing the required parameter 'upsell_offer_oid' when calling SfvbApi.duplicate_sfvb_upsell_offer"
1238
+ end
1239
+ # resource path
1240
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers/{upsell_offer_oid}/duplicate'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_offer_oid' + '}', CGI.escape(upsell_offer_oid.to_s))
1241
+
1242
+ # query parameters
1243
+ query_params = opts[:query_params] || {}
1244
+
1245
+ # header parameters
1246
+ header_params = opts[:header_params] || {}
1247
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1248
+ # HTTP header 'Accept' (if needed)
1249
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1250
+
1251
+ # form parameters
1252
+ form_params = opts[:form_params] || {}
1253
+
1254
+ # http body (model)
1255
+ post_body = opts[:debug_body]
1256
+
1257
+ # return_type
1258
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffer'
1259
+
1260
+ # auth_names
1261
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1262
+
1263
+ new_options = opts.merge(
1264
+ :operation => :"SfvbApi.duplicate_sfvb_upsell_offer",
1265
+ :header_params => header_params,
1266
+ :query_params => query_params,
1267
+ :form_params => form_params,
1268
+ :body => post_body,
1269
+ :auth_names => auth_names,
1270
+ :return_type => return_type
1271
+ )
1272
+
1273
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1274
+ if @api_client.config.debugging
1275
+ @api_client.config.logger.debug "API called: SfvbApi#duplicate_sfvb_upsell_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1276
+ end
1277
+ return data, status_code, headers
1278
+ end
1279
+
1280
+ # Duplicate an upsell path or one of its variations
1281
+ # Without a variation, copies the whole path right after it, switched off. With a variation, appends a copy of that variation to the same path, which needs sfvb_publish when the path is running. Every offer the copy uses is copied too and switched off. Within this storefront only.
1282
+ # @param storefront_oid [Integer]
1283
+ # @param upsell_path_oid [Integer]
1284
+ # @param [Hash] opts the optional parameters
1285
+ # @option opts [SfvbUpsellPathDuplicateRequest] :duplicate_request What to duplicate
1286
+ # @return [SfvbUpsellPath]
1287
+ def duplicate_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
1288
+ data, _status_code, _headers = duplicate_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
1289
+ data
1290
+ end
1291
+
1292
+ # Duplicate an upsell path or one of its variations
1293
+ # Without a variation, copies the whole path right after it, switched off. With a variation, appends a copy of that variation to the same path, which needs sfvb_publish when the path is running. Every offer the copy uses is copied too and switched off. Within this storefront only.
1294
+ # @param storefront_oid [Integer]
1295
+ # @param upsell_path_oid [Integer]
1296
+ # @param [Hash] opts the optional parameters
1297
+ # @option opts [SfvbUpsellPathDuplicateRequest] :duplicate_request What to duplicate
1298
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
1299
+ def duplicate_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
1300
+ if @api_client.config.debugging
1301
+ @api_client.config.logger.debug 'Calling API: SfvbApi.duplicate_sfvb_upsell_path ...'
1302
+ end
1303
+ # verify the required parameter 'storefront_oid' is set
1304
+ if @api_client.config.client_side_validation && storefront_oid.nil?
1305
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.duplicate_sfvb_upsell_path"
1306
+ end
1307
+ # verify the required parameter 'upsell_path_oid' is set
1308
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
1309
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.duplicate_sfvb_upsell_path"
1310
+ end
1311
+ # resource path
1312
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/duplicate'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
1313
+
1314
+ # query parameters
1315
+ query_params = opts[:query_params] || {}
1316
+
1317
+ # header parameters
1318
+ header_params = opts[:header_params] || {}
1319
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1320
+ # HTTP header 'Accept' (if needed)
1321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1322
+ # HTTP header 'Content-Type'
1323
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1324
+ if !content_type.nil?
1325
+ header_params['Content-Type'] = content_type
1326
+ end
1327
+
1328
+ # form parameters
1329
+ form_params = opts[:form_params] || {}
1330
+
1331
+ # http body (model)
1332
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'duplicate_request'])
1333
+
1334
+ # return_type
1335
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
1336
+
1337
+ # auth_names
1338
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1339
+
1340
+ new_options = opts.merge(
1341
+ :operation => :"SfvbApi.duplicate_sfvb_upsell_path",
1342
+ :header_params => header_params,
1343
+ :query_params => query_params,
1344
+ :form_params => form_params,
1345
+ :body => post_body,
1346
+ :auth_names => auth_names,
1347
+ :return_type => return_type
1348
+ )
1349
+
1350
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1351
+ if @api_client.config.debugging
1352
+ @api_client.config.logger.debug "API called: SfvbApi#duplicate_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1353
+ end
1354
+ return data, status_code, headers
1355
+ end
1356
+
1357
+ # End an experiment
848
1358
  # Ends a running experiment. With winner_variation_number the winner gets all new visitors, and a page experiment's winning content is promoted into the page by the completion job on its next run, which also emails the merchant. Without a winner a page experiment's id is cleared from its page body so the page shows variation 0, and a url experiment sends everyone to variation 0. Visitors already assigned to a url experiment keep their page for up to 30 days. Always needs sfvb_publish.
849
1359
  # @param storefront_oid [Integer]
850
1360
  # @param experiment_oid [Integer]
@@ -1487,6 +1997,76 @@ module UltracartClient
1487
1997
  return data, status_code, headers
1488
1998
  end
1489
1999
 
2000
+ # Read an item's storefront facing content
2001
+ # 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.
2002
+ # @param storefront_oid [Integer]
2003
+ # @param [Hash] opts the optional parameters
2004
+ # @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
2005
+ # @option opts [Integer] :merchant_item_oid The item oid. Send this or merchant_item_id, not both
2006
+ # @return [SfvbItemResponse]
2007
+ def get_sfvb_item(storefront_oid, opts = {})
2008
+ data, _status_code, _headers = get_sfvb_item_with_http_info(storefront_oid, opts)
2009
+ data
2010
+ end
2011
+
2012
+ # Read an item&#39;s storefront facing content
2013
+ # 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.
2014
+ # @param storefront_oid [Integer]
2015
+ # @param [Hash] opts the optional parameters
2016
+ # @option opts [String] :merchant_item_id The merchant item id, as a storefront carries it
2017
+ # @option opts [Integer] :merchant_item_oid The item oid. Send this or merchant_item_id, not both
2018
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
2019
+ def get_sfvb_item_with_http_info(storefront_oid, opts = {})
2020
+ if @api_client.config.debugging
2021
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item ...'
2022
+ end
2023
+ # verify the required parameter 'storefront_oid' is set
2024
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2025
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item"
2026
+ end
2027
+ # resource path
2028
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
2029
+
2030
+ # query parameters
2031
+ query_params = opts[:query_params] || {}
2032
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
2033
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
2034
+
2035
+ # header parameters
2036
+ header_params = opts[:header_params] || {}
2037
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2038
+ # HTTP header 'Accept' (if needed)
2039
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2040
+
2041
+ # form parameters
2042
+ form_params = opts[:form_params] || {}
2043
+
2044
+ # http body (model)
2045
+ post_body = opts[:debug_body]
2046
+
2047
+ # return_type
2048
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
2049
+
2050
+ # auth_names
2051
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2052
+
2053
+ new_options = opts.merge(
2054
+ :operation => :"SfvbApi.get_sfvb_item",
2055
+ :header_params => header_params,
2056
+ :query_params => query_params,
2057
+ :form_params => form_params,
2058
+ :body => post_body,
2059
+ :auth_names => auth_names,
2060
+ :return_type => return_type
2061
+ )
2062
+
2063
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2064
+ if @api_client.config.debugging
2065
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2066
+ end
2067
+ return data, status_code, headers
2068
+ end
2069
+
1490
2070
  # Read one library entry including its CJSON
1491
2071
  # 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
2072
  # @param storefront_oid [Integer]
@@ -2320,6 +2900,170 @@ module UltracartClient
2320
2900
  return data, status_code, headers
2321
2901
  end
2322
2902
 
2903
+ # Get an upsell offer
2904
+ # The whole offer, with the hash an update sends back in If-Match, which upsell items are out of stock now, and whether loyalty, TowerData and Everflow are set up. Stats as on the path list.
2905
+ # @param storefront_oid [Integer]
2906
+ # @param upsell_offer_oid [Integer]
2907
+ # @param [Hash] opts the optional parameters
2908
+ # @option opts [Boolean] :stats Include stats
2909
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
2910
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
2911
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
2912
+ # @return [SfvbUpsellOffer]
2913
+ def get_sfvb_upsell_offer(storefront_oid, upsell_offer_oid, opts = {})
2914
+ data, _status_code, _headers = get_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts)
2915
+ data
2916
+ end
2917
+
2918
+ # Get an upsell offer
2919
+ # The whole offer, with the hash an update sends back in If-Match, which upsell items are out of stock now, and whether loyalty, TowerData and Everflow are set up. Stats as on the path list.
2920
+ # @param storefront_oid [Integer]
2921
+ # @param upsell_offer_oid [Integer]
2922
+ # @param [Hash] opts the optional parameters
2923
+ # @option opts [Boolean] :stats Include stats
2924
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
2925
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
2926
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
2927
+ # @return [Array<(SfvbUpsellOffer, Integer, Hash)>] SfvbUpsellOffer data, response status code and response headers
2928
+ def get_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, opts = {})
2929
+ if @api_client.config.debugging
2930
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_upsell_offer ...'
2931
+ end
2932
+ # verify the required parameter 'storefront_oid' is set
2933
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2934
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_upsell_offer"
2935
+ end
2936
+ # verify the required parameter 'upsell_offer_oid' is set
2937
+ if @api_client.config.client_side_validation && upsell_offer_oid.nil?
2938
+ fail ArgumentError, "Missing the required parameter 'upsell_offer_oid' when calling SfvbApi.get_sfvb_upsell_offer"
2939
+ end
2940
+ # resource path
2941
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers/{upsell_offer_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_offer_oid' + '}', CGI.escape(upsell_offer_oid.to_s))
2942
+
2943
+ # query parameters
2944
+ query_params = opts[:query_params] || {}
2945
+ query_params[:'stats'] = opts[:'stats'] if !opts[:'stats'].nil?
2946
+ query_params[:'stats_start'] = opts[:'stats_start'] if !opts[:'stats_start'].nil?
2947
+ query_params[:'stats_end'] = opts[:'stats_end'] if !opts[:'stats_end'].nil?
2948
+ query_params[:'stats_weekdays'] = opts[:'stats_weekdays'] if !opts[:'stats_weekdays'].nil?
2949
+
2950
+ # header parameters
2951
+ header_params = opts[:header_params] || {}
2952
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2953
+ # HTTP header 'Accept' (if needed)
2954
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2955
+
2956
+ # form parameters
2957
+ form_params = opts[:form_params] || {}
2958
+
2959
+ # http body (model)
2960
+ post_body = opts[:debug_body]
2961
+
2962
+ # return_type
2963
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffer'
2964
+
2965
+ # auth_names
2966
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2967
+
2968
+ new_options = opts.merge(
2969
+ :operation => :"SfvbApi.get_sfvb_upsell_offer",
2970
+ :header_params => header_params,
2971
+ :query_params => query_params,
2972
+ :form_params => form_params,
2973
+ :body => post_body,
2974
+ :auth_names => auth_names,
2975
+ :return_type => return_type
2976
+ )
2977
+
2978
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2979
+ if @api_client.config.debugging
2980
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_upsell_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2981
+ end
2982
+ return data, status_code, headers
2983
+ end
2984
+
2985
+ # Get an upsell path
2986
+ # The whole path, with the hash an update sends back in If-Match. Stats as on the list.
2987
+ # @param storefront_oid [Integer]
2988
+ # @param upsell_path_oid [Integer]
2989
+ # @param [Hash] opts the optional parameters
2990
+ # @option opts [Boolean] :stats Include stats
2991
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
2992
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
2993
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
2994
+ # @return [SfvbUpsellPath]
2995
+ def get_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
2996
+ data, _status_code, _headers = get_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
2997
+ data
2998
+ end
2999
+
3000
+ # Get an upsell path
3001
+ # The whole path, with the hash an update sends back in If-Match. Stats as on the list.
3002
+ # @param storefront_oid [Integer]
3003
+ # @param upsell_path_oid [Integer]
3004
+ # @param [Hash] opts the optional parameters
3005
+ # @option opts [Boolean] :stats Include stats
3006
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
3007
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
3008
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
3009
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
3010
+ def get_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
3011
+ if @api_client.config.debugging
3012
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_upsell_path ...'
3013
+ end
3014
+ # verify the required parameter 'storefront_oid' is set
3015
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3016
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_upsell_path"
3017
+ end
3018
+ # verify the required parameter 'upsell_path_oid' is set
3019
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
3020
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.get_sfvb_upsell_path"
3021
+ end
3022
+ # resource path
3023
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
3024
+
3025
+ # query parameters
3026
+ query_params = opts[:query_params] || {}
3027
+ query_params[:'stats'] = opts[:'stats'] if !opts[:'stats'].nil?
3028
+ query_params[:'stats_start'] = opts[:'stats_start'] if !opts[:'stats_start'].nil?
3029
+ query_params[:'stats_end'] = opts[:'stats_end'] if !opts[:'stats_end'].nil?
3030
+ query_params[:'stats_weekdays'] = opts[:'stats_weekdays'] if !opts[:'stats_weekdays'].nil?
3031
+
3032
+ # header parameters
3033
+ header_params = opts[:header_params] || {}
3034
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3035
+ # HTTP header 'Accept' (if needed)
3036
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3037
+
3038
+ # form parameters
3039
+ form_params = opts[:form_params] || {}
3040
+
3041
+ # http body (model)
3042
+ post_body = opts[:debug_body]
3043
+
3044
+ # return_type
3045
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
3046
+
3047
+ # auth_names
3048
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3049
+
3050
+ new_options = opts.merge(
3051
+ :operation => :"SfvbApi.get_sfvb_upsell_path",
3052
+ :header_params => header_params,
3053
+ :query_params => query_params,
3054
+ :form_params => form_params,
3055
+ :body => post_body,
3056
+ :auth_names => auth_names,
3057
+ :return_type => return_type
3058
+ )
3059
+
3060
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3061
+ if @api_client.config.debugging
3062
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3063
+ end
3064
+ return data, status_code, headers
3065
+ end
3066
+
2323
3067
  # Compiler version for this merchant
2324
3068
  # The visual builder release channel is per merchant, so a CLI holding cached schema or element data should compare against this to know when it has gone stale.
2325
3069
  # @param [Hash] opts the optional parameters
@@ -2511,8 +3255,158 @@ module UltracartClient
2511
3255
  return data, status_code, headers
2512
3256
  end
2513
3257
 
2514
- # Install a library entry into a storefront
2515
- # Copies the fragment's referenced assets into the storefront file system and returns the CJSON with its paths resolved, ready to place. This writes, which is why it is a POST rather than the GET the internal admin endpoint uses. It also requires sfvb_publish, because the assets land in the shared storefront file system, which is served to shoppers regardless of which theme is active, so no amount of working inside a duplicate theme isolates them.
3258
+ # Create an upsell offer
3259
+ # Every item it names must exist, and every shipping method, payment method and loyalty tier must be one the merchant has. Put it on a path with a path update to have it shown. Creating it switched on, or with upsell_item_id_javascript or offsite_content_url, needs sfvb_publish. Its page content is its container, written with the container endpoints and owner type upsell.
3260
+ # @param storefront_oid [Integer]
3261
+ # @param upsell_offer [SfvbUpsellOffer] The offer to create
3262
+ # @param [Hash] opts the optional parameters
3263
+ # @return [SfvbUpsellOffer]
3264
+ def insert_sfvb_upsell_offer(storefront_oid, upsell_offer, opts = {})
3265
+ data, _status_code, _headers = insert_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer, opts)
3266
+ data
3267
+ end
3268
+
3269
+ # Create an upsell offer
3270
+ # Every item it names must exist, and every shipping method, payment method and loyalty tier must be one the merchant has. Put it on a path with a path update to have it shown. Creating it switched on, or with upsell_item_id_javascript or offsite_content_url, needs sfvb_publish. Its page content is its container, written with the container endpoints and owner type upsell.
3271
+ # @param storefront_oid [Integer]
3272
+ # @param upsell_offer [SfvbUpsellOffer] The offer to create
3273
+ # @param [Hash] opts the optional parameters
3274
+ # @return [Array<(SfvbUpsellOffer, Integer, Hash)>] SfvbUpsellOffer data, response status code and response headers
3275
+ def insert_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer, opts = {})
3276
+ if @api_client.config.debugging
3277
+ @api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_upsell_offer ...'
3278
+ end
3279
+ # verify the required parameter 'storefront_oid' is set
3280
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3281
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.insert_sfvb_upsell_offer"
3282
+ end
3283
+ # verify the required parameter 'upsell_offer' is set
3284
+ if @api_client.config.client_side_validation && upsell_offer.nil?
3285
+ fail ArgumentError, "Missing the required parameter 'upsell_offer' when calling SfvbApi.insert_sfvb_upsell_offer"
3286
+ end
3287
+ # resource path
3288
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3289
+
3290
+ # query parameters
3291
+ query_params = opts[:query_params] || {}
3292
+
3293
+ # header parameters
3294
+ header_params = opts[:header_params] || {}
3295
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3296
+ # HTTP header 'Accept' (if needed)
3297
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3298
+ # HTTP header 'Content-Type'
3299
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
3300
+ if !content_type.nil?
3301
+ header_params['Content-Type'] = content_type
3302
+ end
3303
+
3304
+ # form parameters
3305
+ form_params = opts[:form_params] || {}
3306
+
3307
+ # http body (model)
3308
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(upsell_offer)
3309
+
3310
+ # return_type
3311
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffer'
3312
+
3313
+ # auth_names
3314
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3315
+
3316
+ new_options = opts.merge(
3317
+ :operation => :"SfvbApi.insert_sfvb_upsell_offer",
3318
+ :header_params => header_params,
3319
+ :query_params => query_params,
3320
+ :form_params => form_params,
3321
+ :body => post_body,
3322
+ :auth_names => auth_names,
3323
+ :return_type => return_type
3324
+ )
3325
+
3326
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3327
+ if @api_client.config.debugging
3328
+ @api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_upsell_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3329
+ end
3330
+ return data, status_code, headers
3331
+ end
3332
+
3333
+ # Create an upsell path
3334
+ # Placed last in path order. Every offer a step names must be an offer of this storefront, and every item in the item logic must exist. Creating it switched on needs sfvb_publish; create it with active false to build it without that scope.
3335
+ # @param storefront_oid [Integer]
3336
+ # @param upsell_path [SfvbUpsellPath] The path to create
3337
+ # @param [Hash] opts the optional parameters
3338
+ # @return [SfvbUpsellPath]
3339
+ def insert_sfvb_upsell_path(storefront_oid, upsell_path, opts = {})
3340
+ data, _status_code, _headers = insert_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path, opts)
3341
+ data
3342
+ end
3343
+
3344
+ # Create an upsell path
3345
+ # Placed last in path order. Every offer a step names must be an offer of this storefront, and every item in the item logic must exist. Creating it switched on needs sfvb_publish; create it with active false to build it without that scope.
3346
+ # @param storefront_oid [Integer]
3347
+ # @param upsell_path [SfvbUpsellPath] The path to create
3348
+ # @param [Hash] opts the optional parameters
3349
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
3350
+ def insert_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path, opts = {})
3351
+ if @api_client.config.debugging
3352
+ @api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_upsell_path ...'
3353
+ end
3354
+ # verify the required parameter 'storefront_oid' is set
3355
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3356
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.insert_sfvb_upsell_path"
3357
+ end
3358
+ # verify the required parameter 'upsell_path' is set
3359
+ if @api_client.config.client_side_validation && upsell_path.nil?
3360
+ fail ArgumentError, "Missing the required parameter 'upsell_path' when calling SfvbApi.insert_sfvb_upsell_path"
3361
+ end
3362
+ # resource path
3363
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3364
+
3365
+ # query parameters
3366
+ query_params = opts[:query_params] || {}
3367
+
3368
+ # header parameters
3369
+ header_params = opts[:header_params] || {}
3370
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3371
+ # HTTP header 'Accept' (if needed)
3372
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3373
+ # HTTP header 'Content-Type'
3374
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
3375
+ if !content_type.nil?
3376
+ header_params['Content-Type'] = content_type
3377
+ end
3378
+
3379
+ # form parameters
3380
+ form_params = opts[:form_params] || {}
3381
+
3382
+ # http body (model)
3383
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(upsell_path)
3384
+
3385
+ # return_type
3386
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
3387
+
3388
+ # auth_names
3389
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3390
+
3391
+ new_options = opts.merge(
3392
+ :operation => :"SfvbApi.insert_sfvb_upsell_path",
3393
+ :header_params => header_params,
3394
+ :query_params => query_params,
3395
+ :form_params => form_params,
3396
+ :body => post_body,
3397
+ :auth_names => auth_names,
3398
+ :return_type => return_type
3399
+ )
3400
+
3401
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3402
+ if @api_client.config.debugging
3403
+ @api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3404
+ end
3405
+ return data, status_code, headers
3406
+ end
3407
+
3408
+ # Install a library entry into a storefront
3409
+ # Copies the fragment's referenced assets into the storefront file system and returns the CJSON with its paths resolved, ready to place. This writes, which is why it is a POST rather than the GET the internal admin endpoint uses. It also requires sfvb_publish, because the assets land in the shared storefront file system, which is served to shoppers regardless of which theme is active, so no amount of working inside a duplicate theme isolates them.
2516
3410
  # @param storefront_oid [Integer]
2517
3411
  # @param library_oid [Integer]
2518
3412
  # @param [Hash] opts the optional parameters
@@ -3335,9 +4229,13 @@ module UltracartClient
3335
4229
  end
3336
4230
 
3337
4231
  # List upsell offers
3338
- # Without container JSON, so the funnel can be surveyed cheaply. A large container size alongside a small element count is the signature of markup pasted into a single html element.
4232
+ # Every offer on one of this storefront's paths that are not archived, the same list the admin shows, with each offer's full settings but not its container JSON. An offer on no path yet is still read by oid. A large container size alongside a small element count is the signature of markup pasted into a single html element. Stats as on the path list.
3339
4233
  # @param storefront_oid [Integer]
3340
4234
  # @param [Hash] opts the optional parameters
4235
+ # @option opts [Boolean] :stats Include stats
4236
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
4237
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
4238
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
3341
4239
  # @return [SfvbUpsellOffersResponse]
3342
4240
  def list_sfvb_upsell_offers(storefront_oid, opts = {})
3343
4241
  data, _status_code, _headers = list_sfvb_upsell_offers_with_http_info(storefront_oid, opts)
@@ -3345,9 +4243,13 @@ module UltracartClient
3345
4243
  end
3346
4244
 
3347
4245
  # List upsell offers
3348
- # Without container JSON, so the funnel can be surveyed cheaply. A large container size alongside a small element count is the signature of markup pasted into a single html element.
4246
+ # Every offer on one of this storefront&#39;s paths that are not archived, the same list the admin shows, with each offer&#39;s full settings but not its container JSON. An offer on no path yet is still read by oid. A large container size alongside a small element count is the signature of markup pasted into a single html element. Stats as on the path list.
3349
4247
  # @param storefront_oid [Integer]
3350
4248
  # @param [Hash] opts the optional parameters
4249
+ # @option opts [Boolean] :stats Include stats
4250
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
4251
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
4252
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
3351
4253
  # @return [Array<(SfvbUpsellOffersResponse, Integer, Hash)>] SfvbUpsellOffersResponse data, response status code and response headers
3352
4254
  def list_sfvb_upsell_offers_with_http_info(storefront_oid, opts = {})
3353
4255
  if @api_client.config.debugging
@@ -3362,6 +4264,10 @@ module UltracartClient
3362
4264
 
3363
4265
  # query parameters
3364
4266
  query_params = opts[:query_params] || {}
4267
+ query_params[:'stats'] = opts[:'stats'] if !opts[:'stats'].nil?
4268
+ query_params[:'stats_start'] = opts[:'stats_start'] if !opts[:'stats_start'].nil?
4269
+ query_params[:'stats_end'] = opts[:'stats_end'] if !opts[:'stats_end'].nil?
4270
+ query_params[:'stats_weekdays'] = opts[:'stats_weekdays'] if !opts[:'stats_weekdays'].nil?
3365
4271
 
3366
4272
  # header parameters
3367
4273
  header_params = opts[:header_params] || {}
@@ -3398,6 +4304,178 @@ module UltracartClient
3398
4304
  return data, status_code, headers
3399
4305
  end
3400
4306
 
4307
+ # List upsell paths
4308
+ # In path order, first to last. status current (the default) leaves out archived paths. Stats are computed only with stats=true, over stats_start to stats_end (YYYY-MM-DD, the last 30 days when both are omitted, at most 366 days), because they are the expensive part of the read.
4309
+ # @param storefront_oid [Integer]
4310
+ # @param [Hash] opts the optional parameters
4311
+ # @option opts [String] :status current, archived or all
4312
+ # @option opts [String] :location pre checkout or post checkout
4313
+ # @option opts [String] :search Only paths whose name contains this
4314
+ # @option opts [Boolean] :stats Include stats
4315
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
4316
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
4317
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
4318
+ # @option opts [Integer] :max_results Page size, 1 to 500, default 100
4319
+ # @option opts [Integer] :offset Offset of the first path returned
4320
+ # @return [SfvbUpsellPathsResponse]
4321
+ def list_sfvb_upsell_paths(storefront_oid, opts = {})
4322
+ data, _status_code, _headers = list_sfvb_upsell_paths_with_http_info(storefront_oid, opts)
4323
+ data
4324
+ end
4325
+
4326
+ # List upsell paths
4327
+ # In path order, first to last. status current (the default) leaves out archived paths. Stats are computed only with stats&#x3D;true, over stats_start to stats_end (YYYY-MM-DD, the last 30 days when both are omitted, at most 366 days), because they are the expensive part of the read.
4328
+ # @param storefront_oid [Integer]
4329
+ # @param [Hash] opts the optional parameters
4330
+ # @option opts [String] :status current, archived or all
4331
+ # @option opts [String] :location pre checkout or post checkout
4332
+ # @option opts [String] :search Only paths whose name contains this
4333
+ # @option opts [Boolean] :stats Include stats
4334
+ # @option opts [String] :stats_start Stats window start, YYYY-MM-DD
4335
+ # @option opts [String] :stats_end Stats window end, YYYY-MM-DD
4336
+ # @option opts [String] :stats_weekdays Only these weekdays, comma separated mon to sun
4337
+ # @option opts [Integer] :max_results Page size, 1 to 500, default 100
4338
+ # @option opts [Integer] :offset Offset of the first path returned
4339
+ # @return [Array<(SfvbUpsellPathsResponse, Integer, Hash)>] SfvbUpsellPathsResponse data, response status code and response headers
4340
+ def list_sfvb_upsell_paths_with_http_info(storefront_oid, opts = {})
4341
+ if @api_client.config.debugging
4342
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_upsell_paths ...'
4343
+ end
4344
+ # verify the required parameter 'storefront_oid' is set
4345
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4346
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_upsell_paths"
4347
+ end
4348
+ # resource path
4349
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4350
+
4351
+ # query parameters
4352
+ query_params = opts[:query_params] || {}
4353
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
4354
+ query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?
4355
+ query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
4356
+ query_params[:'stats'] = opts[:'stats'] if !opts[:'stats'].nil?
4357
+ query_params[:'stats_start'] = opts[:'stats_start'] if !opts[:'stats_start'].nil?
4358
+ query_params[:'stats_end'] = opts[:'stats_end'] if !opts[:'stats_end'].nil?
4359
+ query_params[:'stats_weekdays'] = opts[:'stats_weekdays'] if !opts[:'stats_weekdays'].nil?
4360
+ query_params[:'max_results'] = opts[:'max_results'] if !opts[:'max_results'].nil?
4361
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
4362
+
4363
+ # header parameters
4364
+ header_params = opts[:header_params] || {}
4365
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4366
+ # HTTP header 'Accept' (if needed)
4367
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4368
+
4369
+ # form parameters
4370
+ form_params = opts[:form_params] || {}
4371
+
4372
+ # http body (model)
4373
+ post_body = opts[:debug_body]
4374
+
4375
+ # return_type
4376
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPathsResponse'
4377
+
4378
+ # auth_names
4379
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4380
+
4381
+ new_options = opts.merge(
4382
+ :operation => :"SfvbApi.list_sfvb_upsell_paths",
4383
+ :header_params => header_params,
4384
+ :query_params => query_params,
4385
+ :form_params => form_params,
4386
+ :body => post_body,
4387
+ :auth_names => auth_names,
4388
+ :return_type => return_type
4389
+ )
4390
+
4391
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4392
+ if @api_client.config.debugging
4393
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_upsell_paths\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4394
+ end
4395
+ return data, status_code, headers
4396
+ end
4397
+
4398
+ # Move an upsell path
4399
+ # Up, down, to the top or to the bottom of the storefront's paths. Order decides which running path a shopper meets first, so moving a running path needs sfvb_publish.
4400
+ # @param storefront_oid [Integer]
4401
+ # @param upsell_path_oid [Integer]
4402
+ # @param move_request [SfvbUpsellPathMoveRequest] Where to move it
4403
+ # @param [Hash] opts the optional parameters
4404
+ # @return [SfvbUpsellPath]
4405
+ def move_sfvb_upsell_path(storefront_oid, upsell_path_oid, move_request, opts = {})
4406
+ data, _status_code, _headers = move_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, move_request, opts)
4407
+ data
4408
+ end
4409
+
4410
+ # Move an upsell path
4411
+ # Up, down, to the top or to the bottom of the storefront&#39;s paths. Order decides which running path a shopper meets first, so moving a running path needs sfvb_publish.
4412
+ # @param storefront_oid [Integer]
4413
+ # @param upsell_path_oid [Integer]
4414
+ # @param move_request [SfvbUpsellPathMoveRequest] Where to move it
4415
+ # @param [Hash] opts the optional parameters
4416
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
4417
+ def move_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, move_request, opts = {})
4418
+ if @api_client.config.debugging
4419
+ @api_client.config.logger.debug 'Calling API: SfvbApi.move_sfvb_upsell_path ...'
4420
+ end
4421
+ # verify the required parameter 'storefront_oid' is set
4422
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4423
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.move_sfvb_upsell_path"
4424
+ end
4425
+ # verify the required parameter 'upsell_path_oid' is set
4426
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
4427
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.move_sfvb_upsell_path"
4428
+ end
4429
+ # verify the required parameter 'move_request' is set
4430
+ if @api_client.config.client_side_validation && move_request.nil?
4431
+ fail ArgumentError, "Missing the required parameter 'move_request' when calling SfvbApi.move_sfvb_upsell_path"
4432
+ end
4433
+ # resource path
4434
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/move'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
4435
+
4436
+ # query parameters
4437
+ query_params = opts[:query_params] || {}
4438
+
4439
+ # header parameters
4440
+ header_params = opts[:header_params] || {}
4441
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4442
+ # HTTP header 'Accept' (if needed)
4443
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4444
+ # HTTP header 'Content-Type'
4445
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
4446
+ if !content_type.nil?
4447
+ header_params['Content-Type'] = content_type
4448
+ end
4449
+
4450
+ # form parameters
4451
+ form_params = opts[:form_params] || {}
4452
+
4453
+ # http body (model)
4454
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(move_request)
4455
+
4456
+ # return_type
4457
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
4458
+
4459
+ # auth_names
4460
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4461
+
4462
+ new_options = opts.merge(
4463
+ :operation => :"SfvbApi.move_sfvb_upsell_path",
4464
+ :header_params => header_params,
4465
+ :query_params => query_params,
4466
+ :form_params => form_params,
4467
+ :body => post_body,
4468
+ :auth_names => auth_names,
4469
+ :return_type => return_type
4470
+ )
4471
+
4472
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
4473
+ if @api_client.config.debugging
4474
+ @api_client.config.logger.debug "API called: SfvbApi#move_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4475
+ end
4476
+ return data, status_code, headers
4477
+ end
4478
+
3401
4479
  # Write a container stored outside the file system
3402
4480
  # Validation is mandatory and runs here regardless of whether the caller validated first. The previous value is snapshotted before the write, so the change can be reverted. Side effects the visual builder performs on save, such as upsell screenshot regeneration and email content review flagging, are applied too. owner_type also says how owner_object_id is read; send itemid to address an item container by merchant item id rather than by oid. Either way the history records the one canonical address, so a container written under one spelling is listed and reverted under the other.
3403
4481
  # @param storefront_oid [Integer]
@@ -3439,20 +4517,355 @@ module UltracartClient
3439
4517
  if @api_client.config.client_side_validation && owner_object_id.nil?
3440
4518
  fail ArgumentError, "Missing the required parameter 'owner_object_id' when calling SfvbApi.put_sfvb_container"
3441
4519
  end
3442
- # verify the required parameter 'if_match' is set
3443
- if @api_client.config.client_side_validation && if_match.nil?
3444
- fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_container"
4520
+ # verify the required parameter 'if_match' is set
4521
+ if @api_client.config.client_side_validation && if_match.nil?
4522
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_container"
4523
+ end
4524
+ # verify the required parameter 'container_write_request' is set
4525
+ if @api_client.config.client_side_validation && container_write_request.nil?
4526
+ fail ArgumentError, "Missing the required parameter 'container_write_request' when calling SfvbApi.put_sfvb_container"
4527
+ end
4528
+ # resource path
4529
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
4530
+
4531
+ # query parameters
4532
+ query_params = opts[:query_params] || {}
4533
+ query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
4534
+
4535
+ # header parameters
4536
+ header_params = opts[:header_params] || {}
4537
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4538
+ # HTTP header 'Accept' (if needed)
4539
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4540
+ # HTTP header 'Content-Type'
4541
+ content_type = @api_client.select_header_content_type(['application/json'])
4542
+ if !content_type.nil?
4543
+ header_params['Content-Type'] = content_type
4544
+ end
4545
+ header_params[:'If-Match'] = if_match
4546
+
4547
+ # form parameters
4548
+ form_params = opts[:form_params] || {}
4549
+
4550
+ # http body (model)
4551
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(container_write_request)
4552
+
4553
+ # return_type
4554
+ return_type = opts[:debug_return_type] || 'SfvbContainerResponse'
4555
+
4556
+ # auth_names
4557
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4558
+
4559
+ new_options = opts.merge(
4560
+ :operation => :"SfvbApi.put_sfvb_container",
4561
+ :header_params => header_params,
4562
+ :query_params => query_params,
4563
+ :form_params => form_params,
4564
+ :body => post_body,
4565
+ :auth_names => auth_names,
4566
+ :return_type => return_type
4567
+ )
4568
+
4569
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
4570
+ if @api_client.config.debugging
4571
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4572
+ end
4573
+ return data, status_code, headers
4574
+ end
4575
+
4576
+ # Pause or resume a variation
4577
+ # Stops or resumes sending new visitors to one variation of a running experiment. Visitors already assigned keep seeing it. Variation 0 cannot be paused, because the split falls back to it, and the last variation still receiving visitors cannot be paused. Always needs sfvb_publish.
4578
+ # @param storefront_oid [Integer]
4579
+ # @param experiment_oid [Integer]
4580
+ # @param variation_number [Integer]
4581
+ # @param experiment_variation_update_request [SfvbExperimentVariationUpdateRequest] Pause or resume
4582
+ # @param [Hash] opts the optional parameters
4583
+ # @return [SfvbExperiment]
4584
+ def put_sfvb_experiment_variation(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts = {})
4585
+ data, _status_code, _headers = put_sfvb_experiment_variation_with_http_info(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts)
4586
+ data
4587
+ end
4588
+
4589
+ # Pause or resume a variation
4590
+ # Stops or resumes sending new visitors to one variation of a running experiment. Visitors already assigned keep seeing it. Variation 0 cannot be paused, because the split falls back to it, and the last variation still receiving visitors cannot be paused. Always needs sfvb_publish.
4591
+ # @param storefront_oid [Integer]
4592
+ # @param experiment_oid [Integer]
4593
+ # @param variation_number [Integer]
4594
+ # @param experiment_variation_update_request [SfvbExperimentVariationUpdateRequest] Pause or resume
4595
+ # @param [Hash] opts the optional parameters
4596
+ # @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
4597
+ def put_sfvb_experiment_variation_with_http_info(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts = {})
4598
+ if @api_client.config.debugging
4599
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_experiment_variation ...'
4600
+ end
4601
+ # verify the required parameter 'storefront_oid' is set
4602
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4603
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_experiment_variation"
4604
+ end
4605
+ # verify the required parameter 'experiment_oid' is set
4606
+ if @api_client.config.client_side_validation && experiment_oid.nil?
4607
+ fail ArgumentError, "Missing the required parameter 'experiment_oid' when calling SfvbApi.put_sfvb_experiment_variation"
4608
+ end
4609
+ # verify the required parameter 'variation_number' is set
4610
+ if @api_client.config.client_side_validation && variation_number.nil?
4611
+ fail ArgumentError, "Missing the required parameter 'variation_number' when calling SfvbApi.put_sfvb_experiment_variation"
4612
+ end
4613
+ # verify the required parameter 'experiment_variation_update_request' is set
4614
+ if @api_client.config.client_side_validation && experiment_variation_update_request.nil?
4615
+ fail ArgumentError, "Missing the required parameter 'experiment_variation_update_request' when calling SfvbApi.put_sfvb_experiment_variation"
4616
+ end
4617
+ # resource path
4618
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}/variations/{variation_number}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'experiment_oid' + '}', CGI.escape(experiment_oid.to_s)).sub('{' + 'variation_number' + '}', CGI.escape(variation_number.to_s))
4619
+
4620
+ # query parameters
4621
+ query_params = opts[:query_params] || {}
4622
+
4623
+ # header parameters
4624
+ header_params = opts[:header_params] || {}
4625
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4626
+ # HTTP header 'Accept' (if needed)
4627
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4628
+ # HTTP header 'Content-Type'
4629
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
4630
+ if !content_type.nil?
4631
+ header_params['Content-Type'] = content_type
4632
+ end
4633
+
4634
+ # form parameters
4635
+ form_params = opts[:form_params] || {}
4636
+
4637
+ # http body (model)
4638
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_variation_update_request)
4639
+
4640
+ # return_type
4641
+ return_type = opts[:debug_return_type] || 'SfvbExperiment'
4642
+
4643
+ # auth_names
4644
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4645
+
4646
+ new_options = opts.merge(
4647
+ :operation => :"SfvbApi.put_sfvb_experiment_variation",
4648
+ :header_params => header_params,
4649
+ :query_params => query_params,
4650
+ :form_params => form_params,
4651
+ :body => post_body,
4652
+ :auth_names => auth_names,
4653
+ :return_type => return_type
4654
+ )
4655
+
4656
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
4657
+ if @api_client.config.debugging
4658
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_experiment_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4659
+ end
4660
+ return data, status_code, headers
4661
+ end
4662
+
4663
+ # Write a storefront file
4664
+ # Runs the template sandbox, Velocity validation and the internationalization check, records a version, and compiles the sibling .vm when the file is a .cjson under a theme. Send If-Match with the hash from the last read to avoid clobbering a concurrent change. Writing into the active theme requires sfvb_publish.
4665
+ # @param storefront_oid [Integer]
4666
+ # @param if_match [String] Content hash from the last read. Required; 428 when absent, 412 when stale.
4667
+ # @param file_write_request [SfvbFileWriteRequest] File content to write
4668
+ # @param [Hash] opts the optional parameters
4669
+ # @option opts [String] :path
4670
+ # @return [SfvbFileWriteResponse]
4671
+ def put_sfvb_file_content(storefront_oid, if_match, file_write_request, opts = {})
4672
+ data, _status_code, _headers = put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts)
4673
+ data
4674
+ end
4675
+
4676
+ # Write a storefront file
4677
+ # Runs the template sandbox, Velocity validation and the internationalization check, records a version, and compiles the sibling .vm when the file is a .cjson under a theme. Send If-Match with the hash from the last read to avoid clobbering a concurrent change. Writing into the active theme requires sfvb_publish.
4678
+ # @param storefront_oid [Integer]
4679
+ # @param if_match [String] Content hash from the last read. Required; 428 when absent, 412 when stale.
4680
+ # @param file_write_request [SfvbFileWriteRequest] File content to write
4681
+ # @param [Hash] opts the optional parameters
4682
+ # @option opts [String] :path
4683
+ # @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
4684
+ def put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts = {})
4685
+ if @api_client.config.debugging
4686
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_file_content ...'
4687
+ end
4688
+ # verify the required parameter 'storefront_oid' is set
4689
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4690
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_file_content"
4691
+ end
4692
+ # verify the required parameter 'if_match' is set
4693
+ if @api_client.config.client_side_validation && if_match.nil?
4694
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_file_content"
4695
+ end
4696
+ # verify the required parameter 'file_write_request' is set
4697
+ if @api_client.config.client_side_validation && file_write_request.nil?
4698
+ fail ArgumentError, "Missing the required parameter 'file_write_request' when calling SfvbApi.put_sfvb_file_content"
4699
+ end
4700
+ # resource path
4701
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/files/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4702
+
4703
+ # query parameters
4704
+ query_params = opts[:query_params] || {}
4705
+ query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
4706
+
4707
+ # header parameters
4708
+ header_params = opts[:header_params] || {}
4709
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4710
+ # HTTP header 'Accept' (if needed)
4711
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4712
+ # HTTP header 'Content-Type'
4713
+ content_type = @api_client.select_header_content_type(['application/json'])
4714
+ if !content_type.nil?
4715
+ header_params['Content-Type'] = content_type
4716
+ end
4717
+ header_params[:'If-Match'] = if_match
4718
+
4719
+ # form parameters
4720
+ form_params = opts[:form_params] || {}
4721
+
4722
+ # http body (model)
4723
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(file_write_request)
4724
+
4725
+ # return_type
4726
+ return_type = opts[:debug_return_type] || 'SfvbFileWriteResponse'
4727
+
4728
+ # auth_names
4729
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4730
+
4731
+ new_options = opts.merge(
4732
+ :operation => :"SfvbApi.put_sfvb_file_content",
4733
+ :header_params => header_params,
4734
+ :query_params => query_params,
4735
+ :form_params => form_params,
4736
+ :body => post_body,
4737
+ :auth_names => auth_names,
4738
+ :return_type => return_type
4739
+ )
4740
+
4741
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
4742
+ if @api_client.config.debugging
4743
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_file_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4744
+ end
4745
+ return data, status_code, headers
4746
+ end
4747
+
4748
+ # Change some of an item's attributes
4749
+ # Partial - only the attributes named change, and an empty value empties one but keeps it on the item. To remove an attribute no template declares, use the attribute DELETE. 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.
4750
+ # @param storefront_oid [Integer]
4751
+ # @param item_attribute_update_request [SfvbItemAttributeUpdateRequest] Attributes to change
4752
+ # @param [Hash] opts the optional parameters
4753
+ # @option opts [String] :merchant_item_id
4754
+ # @option opts [Integer] :merchant_item_oid
4755
+ # @return [SfvbItemResponse]
4756
+ def put_sfvb_item_attributes(storefront_oid, item_attribute_update_request, opts = {})
4757
+ data, _status_code, _headers = put_sfvb_item_attributes_with_http_info(storefront_oid, item_attribute_update_request, opts)
4758
+ data
4759
+ end
4760
+
4761
+ # Change some of an item&#39;s attributes
4762
+ # Partial - only the attributes named change, and an empty value empties one but keeps it on the item. To remove an attribute no template declares, use the attribute DELETE. 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.
4763
+ # @param storefront_oid [Integer]
4764
+ # @param item_attribute_update_request [SfvbItemAttributeUpdateRequest] Attributes to change
4765
+ # @param [Hash] opts the optional parameters
4766
+ # @option opts [String] :merchant_item_id
4767
+ # @option opts [Integer] :merchant_item_oid
4768
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
4769
+ def put_sfvb_item_attributes_with_http_info(storefront_oid, item_attribute_update_request, opts = {})
4770
+ if @api_client.config.debugging
4771
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_attributes ...'
4772
+ end
4773
+ # verify the required parameter 'storefront_oid' is set
4774
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4775
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_attributes"
4776
+ end
4777
+ # verify the required parameter 'item_attribute_update_request' is set
4778
+ if @api_client.config.client_side_validation && item_attribute_update_request.nil?
4779
+ fail ArgumentError, "Missing the required parameter 'item_attribute_update_request' when calling SfvbApi.put_sfvb_item_attributes"
4780
+ end
4781
+ # resource path
4782
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/attributes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4783
+
4784
+ # query parameters
4785
+ query_params = opts[:query_params] || {}
4786
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
4787
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
4788
+
4789
+ # header parameters
4790
+ header_params = opts[:header_params] || {}
4791
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4792
+ # HTTP header 'Accept' (if needed)
4793
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4794
+ # HTTP header 'Content-Type'
4795
+ content_type = @api_client.select_header_content_type(['application/json'])
4796
+ if !content_type.nil?
4797
+ header_params['Content-Type'] = content_type
4798
+ end
4799
+
4800
+ # form parameters
4801
+ form_params = opts[:form_params] || {}
4802
+
4803
+ # http body (model)
4804
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_attribute_update_request)
4805
+
4806
+ # return_type
4807
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
4808
+
4809
+ # auth_names
4810
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4811
+
4812
+ new_options = opts.merge(
4813
+ :operation => :"SfvbApi.put_sfvb_item_attributes",
4814
+ :header_params => header_params,
4815
+ :query_params => query_params,
4816
+ :form_params => form_params,
4817
+ :body => post_body,
4818
+ :auth_names => auth_names,
4819
+ :return_type => return_type
4820
+ )
4821
+
4822
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
4823
+ if @api_client.config.debugging
4824
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4825
+ end
4826
+ return data, status_code, headers
4827
+ end
4828
+
4829
+ # Change an item's title or long description
4830
+ # 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.
4831
+ # @param storefront_oid [Integer]
4832
+ # @param item_content_request [SfvbItemContentRequest] Title and description to change
4833
+ # @param [Hash] opts the optional parameters
4834
+ # @option opts [String] :merchant_item_id
4835
+ # @option opts [Integer] :merchant_item_oid
4836
+ # @return [SfvbItemResponse]
4837
+ def put_sfvb_item_content(storefront_oid, item_content_request, opts = {})
4838
+ data, _status_code, _headers = put_sfvb_item_content_with_http_info(storefront_oid, item_content_request, opts)
4839
+ data
4840
+ end
4841
+
4842
+ # Change an item&#39;s title or long description
4843
+ # 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&#39;s own fields, so a change here reaches the item everywhere, not only on this storefront.
4844
+ # @param storefront_oid [Integer]
4845
+ # @param item_content_request [SfvbItemContentRequest] Title and description to change
4846
+ # @param [Hash] opts the optional parameters
4847
+ # @option opts [String] :merchant_item_id
4848
+ # @option opts [Integer] :merchant_item_oid
4849
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
4850
+ def put_sfvb_item_content_with_http_info(storefront_oid, item_content_request, opts = {})
4851
+ if @api_client.config.debugging
4852
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_content ...'
4853
+ end
4854
+ # verify the required parameter 'storefront_oid' is set
4855
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4856
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_content"
3445
4857
  end
3446
- # verify the required parameter 'container_write_request' is set
3447
- if @api_client.config.client_side_validation && container_write_request.nil?
3448
- fail ArgumentError, "Missing the required parameter 'container_write_request' when calling SfvbApi.put_sfvb_container"
4858
+ # verify the required parameter 'item_content_request' is set
4859
+ if @api_client.config.client_side_validation && item_content_request.nil?
4860
+ fail ArgumentError, "Missing the required parameter 'item_content_request' when calling SfvbApi.put_sfvb_item_content"
3449
4861
  end
3450
4862
  # resource path
3451
- local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
4863
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3452
4864
 
3453
4865
  # query parameters
3454
4866
  query_params = opts[:query_params] || {}
3455
- query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
4867
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
4868
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
3456
4869
 
3457
4870
  # header parameters
3458
4871
  header_params = opts[:header_params] || {}
@@ -3464,22 +4877,21 @@ module UltracartClient
3464
4877
  if !content_type.nil?
3465
4878
  header_params['Content-Type'] = content_type
3466
4879
  end
3467
- header_params[:'If-Match'] = if_match
3468
4880
 
3469
4881
  # form parameters
3470
4882
  form_params = opts[:form_params] || {}
3471
4883
 
3472
4884
  # http body (model)
3473
- post_body = opts[:debug_body] || @api_client.object_to_http_body(container_write_request)
4885
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_content_request)
3474
4886
 
3475
4887
  # return_type
3476
- return_type = opts[:debug_return_type] || 'SfvbContainerResponse'
4888
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
3477
4889
 
3478
4890
  # auth_names
3479
4891
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3480
4892
 
3481
4893
  new_options = opts.merge(
3482
- :operation => :"SfvbApi.put_sfvb_container",
4894
+ :operation => :"SfvbApi.put_sfvb_item_content",
3483
4895
  :header_params => header_params,
3484
4896
  :query_params => query_params,
3485
4897
  :form_params => form_params,
@@ -3490,57 +4902,51 @@ module UltracartClient
3490
4902
 
3491
4903
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3492
4904
  if @api_client.config.debugging
3493
- @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4905
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3494
4906
  end
3495
4907
  return data, status_code, headers
3496
4908
  end
3497
4909
 
3498
- # Pause or resume a variation
3499
- # Stops or resumes sending new visitors to one variation of a running experiment. Visitors already assigned keep seeing it. Variation 0 cannot be paused, because the split falls back to it, and the last variation still receiving visitors cannot be paused. Always needs sfvb_publish.
4910
+ # Attach an image to an item
4911
+ # 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.
3500
4912
  # @param storefront_oid [Integer]
3501
- # @param experiment_oid [Integer]
3502
- # @param variation_number [Integer]
3503
- # @param experiment_variation_update_request [SfvbExperimentVariationUpdateRequest] Pause or resume
4913
+ # @param item_multimedia_request [SfvbItemMultimediaRequest] Image to attach
3504
4914
  # @param [Hash] opts the optional parameters
3505
- # @return [SfvbExperiment]
3506
- def put_sfvb_experiment_variation(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts = {})
3507
- data, _status_code, _headers = put_sfvb_experiment_variation_with_http_info(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts)
4915
+ # @option opts [String] :merchant_item_id
4916
+ # @option opts [Integer] :merchant_item_oid
4917
+ # @return [SfvbItemResponse]
4918
+ def put_sfvb_item_multimedia(storefront_oid, item_multimedia_request, opts = {})
4919
+ data, _status_code, _headers = put_sfvb_item_multimedia_with_http_info(storefront_oid, item_multimedia_request, opts)
3508
4920
  data
3509
4921
  end
3510
4922
 
3511
- # Pause or resume a variation
3512
- # Stops or resumes sending new visitors to one variation of a running experiment. Visitors already assigned keep seeing it. Variation 0 cannot be paused, because the split falls back to it, and the last variation still receiving visitors cannot be paused. Always needs sfvb_publish.
4923
+ # Attach an image to an item
4924
+ # 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&#39;s own storage on attach.
3513
4925
  # @param storefront_oid [Integer]
3514
- # @param experiment_oid [Integer]
3515
- # @param variation_number [Integer]
3516
- # @param experiment_variation_update_request [SfvbExperimentVariationUpdateRequest] Pause or resume
4926
+ # @param item_multimedia_request [SfvbItemMultimediaRequest] Image to attach
3517
4927
  # @param [Hash] opts the optional parameters
3518
- # @return [Array<(SfvbExperiment, Integer, Hash)>] SfvbExperiment data, response status code and response headers
3519
- def put_sfvb_experiment_variation_with_http_info(storefront_oid, experiment_oid, variation_number, experiment_variation_update_request, opts = {})
4928
+ # @option opts [String] :merchant_item_id
4929
+ # @option opts [Integer] :merchant_item_oid
4930
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
4931
+ def put_sfvb_item_multimedia_with_http_info(storefront_oid, item_multimedia_request, opts = {})
3520
4932
  if @api_client.config.debugging
3521
- @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_experiment_variation ...'
4933
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_multimedia ...'
3522
4934
  end
3523
4935
  # verify the required parameter 'storefront_oid' is set
3524
4936
  if @api_client.config.client_side_validation && storefront_oid.nil?
3525
- fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_experiment_variation"
3526
- end
3527
- # verify the required parameter 'experiment_oid' is set
3528
- if @api_client.config.client_side_validation && experiment_oid.nil?
3529
- fail ArgumentError, "Missing the required parameter 'experiment_oid' when calling SfvbApi.put_sfvb_experiment_variation"
3530
- end
3531
- # verify the required parameter 'variation_number' is set
3532
- if @api_client.config.client_side_validation && variation_number.nil?
3533
- fail ArgumentError, "Missing the required parameter 'variation_number' when calling SfvbApi.put_sfvb_experiment_variation"
4937
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_multimedia"
3534
4938
  end
3535
- # verify the required parameter 'experiment_variation_update_request' is set
3536
- if @api_client.config.client_side_validation && experiment_variation_update_request.nil?
3537
- fail ArgumentError, "Missing the required parameter 'experiment_variation_update_request' when calling SfvbApi.put_sfvb_experiment_variation"
4939
+ # verify the required parameter 'item_multimedia_request' is set
4940
+ if @api_client.config.client_side_validation && item_multimedia_request.nil?
4941
+ fail ArgumentError, "Missing the required parameter 'item_multimedia_request' when calling SfvbApi.put_sfvb_item_multimedia"
3538
4942
  end
3539
4943
  # resource path
3540
- local_var_path = '/sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid}/variations/{variation_number}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'experiment_oid' + '}', CGI.escape(experiment_oid.to_s)).sub('{' + 'variation_number' + '}', CGI.escape(variation_number.to_s))
4944
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/multimedia'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3541
4945
 
3542
4946
  # query parameters
3543
4947
  query_params = opts[:query_params] || {}
4948
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
4949
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
3544
4950
 
3545
4951
  # header parameters
3546
4952
  header_params = opts[:header_params] || {}
@@ -3548,7 +4954,7 @@ module UltracartClient
3548
4954
  # HTTP header 'Accept' (if needed)
3549
4955
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3550
4956
  # HTTP header 'Content-Type'
3551
- content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
4957
+ content_type = @api_client.select_header_content_type(['application/json'])
3552
4958
  if !content_type.nil?
3553
4959
  header_params['Content-Type'] = content_type
3554
4960
  end
@@ -3557,16 +4963,16 @@ module UltracartClient
3557
4963
  form_params = opts[:form_params] || {}
3558
4964
 
3559
4965
  # http body (model)
3560
- post_body = opts[:debug_body] || @api_client.object_to_http_body(experiment_variation_update_request)
4966
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_multimedia_request)
3561
4967
 
3562
4968
  # return_type
3563
- return_type = opts[:debug_return_type] || 'SfvbExperiment'
4969
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
3564
4970
 
3565
4971
  # auth_names
3566
4972
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3567
4973
 
3568
4974
  new_options = opts.merge(
3569
- :operation => :"SfvbApi.put_sfvb_experiment_variation",
4975
+ :operation => :"SfvbApi.put_sfvb_item_multimedia",
3570
4976
  :header_params => header_params,
3571
4977
  :query_params => query_params,
3572
4978
  :form_params => form_params,
@@ -3577,54 +4983,51 @@ module UltracartClient
3577
4983
 
3578
4984
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3579
4985
  if @api_client.config.debugging
3580
- @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_experiment_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4986
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_multimedia\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3581
4987
  end
3582
4988
  return data, status_code, headers
3583
4989
  end
3584
4990
 
3585
- # Write a storefront file
3586
- # Runs the template sandbox, Velocity validation and the internationalization check, records a version, and compiles the sibling .vm when the file is a .cjson under a theme. Send If-Match with the hash from the last read to avoid clobbering a concurrent change. Writing into the active theme requires sfvb_publish.
4991
+ # Change an item's search metadata
4992
+ # 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.
3587
4993
  # @param storefront_oid [Integer]
3588
- # @param if_match [String] Content hash from the last read. Required; 428 when absent, 412 when stale.
3589
- # @param file_write_request [SfvbFileWriteRequest] File content to write
4994
+ # @param item_seo_request [SfvbItemSeoRequest] Search metadata to change
3590
4995
  # @param [Hash] opts the optional parameters
3591
- # @option opts [String] :path
3592
- # @return [SfvbFileWriteResponse]
3593
- def put_sfvb_file_content(storefront_oid, if_match, file_write_request, opts = {})
3594
- data, _status_code, _headers = put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts)
4996
+ # @option opts [String] :merchant_item_id
4997
+ # @option opts [Integer] :merchant_item_oid
4998
+ # @return [SfvbItemResponse]
4999
+ def put_sfvb_item_seo(storefront_oid, item_seo_request, opts = {})
5000
+ data, _status_code, _headers = put_sfvb_item_seo_with_http_info(storefront_oid, item_seo_request, opts)
3595
5001
  data
3596
5002
  end
3597
5003
 
3598
- # Write a storefront file
3599
- # Runs the template sandbox, Velocity validation and the internationalization check, records a version, and compiles the sibling .vm when the file is a .cjson under a theme. Send If-Match with the hash from the last read to avoid clobbering a concurrent change. Writing into the active theme requires sfvb_publish.
5004
+ # Change an item&#39;s search metadata
5005
+ # 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&#39;s description either way. And there is no canonical or noindex field, because both are site wide switches rather than per item values.
3600
5006
  # @param storefront_oid [Integer]
3601
- # @param if_match [String] Content hash from the last read. Required; 428 when absent, 412 when stale.
3602
- # @param file_write_request [SfvbFileWriteRequest] File content to write
5007
+ # @param item_seo_request [SfvbItemSeoRequest] Search metadata to change
3603
5008
  # @param [Hash] opts the optional parameters
3604
- # @option opts [String] :path
3605
- # @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
3606
- def put_sfvb_file_content_with_http_info(storefront_oid, if_match, file_write_request, opts = {})
5009
+ # @option opts [String] :merchant_item_id
5010
+ # @option opts [Integer] :merchant_item_oid
5011
+ # @return [Array<(SfvbItemResponse, Integer, Hash)>] SfvbItemResponse data, response status code and response headers
5012
+ def put_sfvb_item_seo_with_http_info(storefront_oid, item_seo_request, opts = {})
3607
5013
  if @api_client.config.debugging
3608
- @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_file_content ...'
5014
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_seo ...'
3609
5015
  end
3610
5016
  # verify the required parameter 'storefront_oid' is set
3611
5017
  if @api_client.config.client_side_validation && storefront_oid.nil?
3612
- fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_file_content"
5018
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_seo"
3613
5019
  end
3614
- # verify the required parameter 'if_match' is set
3615
- if @api_client.config.client_side_validation && if_match.nil?
3616
- fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_file_content"
3617
- end
3618
- # verify the required parameter 'file_write_request' is set
3619
- if @api_client.config.client_side_validation && file_write_request.nil?
3620
- fail ArgumentError, "Missing the required parameter 'file_write_request' when calling SfvbApi.put_sfvb_file_content"
5020
+ # verify the required parameter 'item_seo_request' is set
5021
+ if @api_client.config.client_side_validation && item_seo_request.nil?
5022
+ fail ArgumentError, "Missing the required parameter 'item_seo_request' when calling SfvbApi.put_sfvb_item_seo"
3621
5023
  end
3622
5024
  # resource path
3623
- local_var_path = '/sfvb/storefronts/{storefront_oid}/files/content'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
5025
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/seo'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3624
5026
 
3625
5027
  # query parameters
3626
5028
  query_params = opts[:query_params] || {}
3627
- query_params[:'path'] = opts[:'path'] if !opts[:'path'].nil?
5029
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
5030
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
3628
5031
 
3629
5032
  # header parameters
3630
5033
  header_params = opts[:header_params] || {}
@@ -3636,22 +5039,21 @@ module UltracartClient
3636
5039
  if !content_type.nil?
3637
5040
  header_params['Content-Type'] = content_type
3638
5041
  end
3639
- header_params[:'If-Match'] = if_match
3640
5042
 
3641
5043
  # form parameters
3642
5044
  form_params = opts[:form_params] || {}
3643
5045
 
3644
5046
  # http body (model)
3645
- post_body = opts[:debug_body] || @api_client.object_to_http_body(file_write_request)
5047
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_seo_request)
3646
5048
 
3647
5049
  # return_type
3648
- return_type = opts[:debug_return_type] || 'SfvbFileWriteResponse'
5050
+ return_type = opts[:debug_return_type] || 'SfvbItemResponse'
3649
5051
 
3650
5052
  # auth_names
3651
5053
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3652
5054
 
3653
5055
  new_options = opts.merge(
3654
- :operation => :"SfvbApi.put_sfvb_file_content",
5056
+ :operation => :"SfvbApi.put_sfvb_item_seo",
3655
5057
  :header_params => header_params,
3656
5058
  :query_params => query_params,
3657
5059
  :form_params => form_params,
@@ -3662,7 +5064,7 @@ module UltracartClient
3662
5064
 
3663
5065
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3664
5066
  if @api_client.config.debugging
3665
- @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_file_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5067
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_seo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3666
5068
  end
3667
5069
  return data, status_code, headers
3668
5070
  end
@@ -5036,6 +6438,252 @@ module UltracartClient
5036
6438
  return data, status_code, headers
5037
6439
  end
5038
6440
 
6441
+ # Unarchive an upsell path
6442
+ # Brings the path back into the default list. Unarchiving one that is switched on starts it, so that needs sfvb_publish.
6443
+ # @param storefront_oid [Integer]
6444
+ # @param upsell_path_oid [Integer]
6445
+ # @param [Hash] opts the optional parameters
6446
+ # @return [SfvbUpsellPath]
6447
+ def unarchive_sfvb_upsell_path(storefront_oid, upsell_path_oid, opts = {})
6448
+ data, _status_code, _headers = unarchive_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts)
6449
+ data
6450
+ end
6451
+
6452
+ # Unarchive an upsell path
6453
+ # Brings the path back into the default list. Unarchiving one that is switched on starts it, so that needs sfvb_publish.
6454
+ # @param storefront_oid [Integer]
6455
+ # @param upsell_path_oid [Integer]
6456
+ # @param [Hash] opts the optional parameters
6457
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
6458
+ def unarchive_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, opts = {})
6459
+ if @api_client.config.debugging
6460
+ @api_client.config.logger.debug 'Calling API: SfvbApi.unarchive_sfvb_upsell_path ...'
6461
+ end
6462
+ # verify the required parameter 'storefront_oid' is set
6463
+ if @api_client.config.client_side_validation && storefront_oid.nil?
6464
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.unarchive_sfvb_upsell_path"
6465
+ end
6466
+ # verify the required parameter 'upsell_path_oid' is set
6467
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
6468
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.unarchive_sfvb_upsell_path"
6469
+ end
6470
+ # resource path
6471
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}/unarchive'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
6472
+
6473
+ # query parameters
6474
+ query_params = opts[:query_params] || {}
6475
+
6476
+ # header parameters
6477
+ header_params = opts[:header_params] || {}
6478
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
6479
+ # HTTP header 'Accept' (if needed)
6480
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
6481
+
6482
+ # form parameters
6483
+ form_params = opts[:form_params] || {}
6484
+
6485
+ # http body (model)
6486
+ post_body = opts[:debug_body]
6487
+
6488
+ # return_type
6489
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
6490
+
6491
+ # auth_names
6492
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
6493
+
6494
+ new_options = opts.merge(
6495
+ :operation => :"SfvbApi.unarchive_sfvb_upsell_path",
6496
+ :header_params => header_params,
6497
+ :query_params => query_params,
6498
+ :form_params => form_params,
6499
+ :body => post_body,
6500
+ :auth_names => auth_names,
6501
+ :return_type => return_type
6502
+ )
6503
+
6504
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
6505
+ if @api_client.config.debugging
6506
+ @api_client.config.logger.debug "API called: SfvbApi#unarchive_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
6507
+ end
6508
+ return data, status_code, headers
6509
+ end
6510
+
6511
+ # Update an upsell offer
6512
+ # A full replace. Send back the whole offer you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Changing an offer that is switched on, switching one on, or changing upsell_item_id_javascript or offsite_content_url needs sfvb_publish. Settings the API does not show, such as the offer's screenshots, are kept.
6513
+ # @param storefront_oid [Integer]
6514
+ # @param upsell_offer_oid [Integer]
6515
+ # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
6516
+ # @param upsell_offer [SfvbUpsellOffer] The whole offer
6517
+ # @param [Hash] opts the optional parameters
6518
+ # @return [SfvbUpsellOffer]
6519
+ def update_sfvb_upsell_offer(storefront_oid, upsell_offer_oid, if_match, upsell_offer, opts = {})
6520
+ data, _status_code, _headers = update_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, if_match, upsell_offer, opts)
6521
+ data
6522
+ end
6523
+
6524
+ # Update an upsell offer
6525
+ # A full replace. Send back the whole offer you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Changing an offer that is switched on, switching one on, or changing upsell_item_id_javascript or offsite_content_url needs sfvb_publish. Settings the API does not show, such as the offer&#39;s screenshots, are kept.
6526
+ # @param storefront_oid [Integer]
6527
+ # @param upsell_offer_oid [Integer]
6528
+ # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
6529
+ # @param upsell_offer [SfvbUpsellOffer] The whole offer
6530
+ # @param [Hash] opts the optional parameters
6531
+ # @return [Array<(SfvbUpsellOffer, Integer, Hash)>] SfvbUpsellOffer data, response status code and response headers
6532
+ def update_sfvb_upsell_offer_with_http_info(storefront_oid, upsell_offer_oid, if_match, upsell_offer, opts = {})
6533
+ if @api_client.config.debugging
6534
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_upsell_offer ...'
6535
+ end
6536
+ # verify the required parameter 'storefront_oid' is set
6537
+ if @api_client.config.client_side_validation && storefront_oid.nil?
6538
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_upsell_offer"
6539
+ end
6540
+ # verify the required parameter 'upsell_offer_oid' is set
6541
+ if @api_client.config.client_side_validation && upsell_offer_oid.nil?
6542
+ fail ArgumentError, "Missing the required parameter 'upsell_offer_oid' when calling SfvbApi.update_sfvb_upsell_offer"
6543
+ end
6544
+ # verify the required parameter 'if_match' is set
6545
+ if @api_client.config.client_side_validation && if_match.nil?
6546
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_upsell_offer"
6547
+ end
6548
+ # verify the required parameter 'upsell_offer' is set
6549
+ if @api_client.config.client_side_validation && upsell_offer.nil?
6550
+ fail ArgumentError, "Missing the required parameter 'upsell_offer' when calling SfvbApi.update_sfvb_upsell_offer"
6551
+ end
6552
+ # resource path
6553
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers/{upsell_offer_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_offer_oid' + '}', CGI.escape(upsell_offer_oid.to_s))
6554
+
6555
+ # query parameters
6556
+ query_params = opts[:query_params] || {}
6557
+
6558
+ # header parameters
6559
+ header_params = opts[:header_params] || {}
6560
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
6561
+ # HTTP header 'Accept' (if needed)
6562
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
6563
+ # HTTP header 'Content-Type'
6564
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
6565
+ if !content_type.nil?
6566
+ header_params['Content-Type'] = content_type
6567
+ end
6568
+ header_params[:'If-Match'] = if_match
6569
+
6570
+ # form parameters
6571
+ form_params = opts[:form_params] || {}
6572
+
6573
+ # http body (model)
6574
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(upsell_offer)
6575
+
6576
+ # return_type
6577
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffer'
6578
+
6579
+ # auth_names
6580
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
6581
+
6582
+ new_options = opts.merge(
6583
+ :operation => :"SfvbApi.update_sfvb_upsell_offer",
6584
+ :header_params => header_params,
6585
+ :query_params => query_params,
6586
+ :form_params => form_params,
6587
+ :body => post_body,
6588
+ :auth_names => auth_names,
6589
+ :return_type => return_type
6590
+ )
6591
+
6592
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
6593
+ if @api_client.config.debugging
6594
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_upsell_offer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
6595
+ end
6596
+ return data, status_code, headers
6597
+ end
6598
+
6599
+ # Update an upsell path
6600
+ # A full replace. Send back the whole path you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Order and archived keep their stored values; change them with the move, archive and unarchive calls. Changing a running path, or switching one on, needs sfvb_publish.
6601
+ # @param storefront_oid [Integer]
6602
+ # @param upsell_path_oid [Integer]
6603
+ # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
6604
+ # @param upsell_path [SfvbUpsellPath] The whole path
6605
+ # @param [Hash] opts the optional parameters
6606
+ # @return [SfvbUpsellPath]
6607
+ def update_sfvb_upsell_path(storefront_oid, upsell_path_oid, if_match, upsell_path, opts = {})
6608
+ data, _status_code, _headers = update_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, if_match, upsell_path, opts)
6609
+ data
6610
+ end
6611
+
6612
+ # Update an upsell path
6613
+ # A full replace. Send back the whole path you read, changed, with its hash_sha256 in If-Match. Read only fields are ignored and a writable field left out is cleared. Order and archived keep their stored values; change them with the move, archive and unarchive calls. Changing a running path, or switching one on, needs sfvb_publish.
6614
+ # @param storefront_oid [Integer]
6615
+ # @param upsell_path_oid [Integer]
6616
+ # @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
6617
+ # @param upsell_path [SfvbUpsellPath] The whole path
6618
+ # @param [Hash] opts the optional parameters
6619
+ # @return [Array<(SfvbUpsellPath, Integer, Hash)>] SfvbUpsellPath data, response status code and response headers
6620
+ def update_sfvb_upsell_path_with_http_info(storefront_oid, upsell_path_oid, if_match, upsell_path, opts = {})
6621
+ if @api_client.config.debugging
6622
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_upsell_path ...'
6623
+ end
6624
+ # verify the required parameter 'storefront_oid' is set
6625
+ if @api_client.config.client_side_validation && storefront_oid.nil?
6626
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_upsell_path"
6627
+ end
6628
+ # verify the required parameter 'upsell_path_oid' is set
6629
+ if @api_client.config.client_side_validation && upsell_path_oid.nil?
6630
+ fail ArgumentError, "Missing the required parameter 'upsell_path_oid' when calling SfvbApi.update_sfvb_upsell_path"
6631
+ end
6632
+ # verify the required parameter 'if_match' is set
6633
+ if @api_client.config.client_side_validation && if_match.nil?
6634
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_upsell_path"
6635
+ end
6636
+ # verify the required parameter 'upsell_path' is set
6637
+ if @api_client.config.client_side_validation && upsell_path.nil?
6638
+ fail ArgumentError, "Missing the required parameter 'upsell_path' when calling SfvbApi.update_sfvb_upsell_path"
6639
+ end
6640
+ # resource path
6641
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths/{upsell_path_oid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'upsell_path_oid' + '}', CGI.escape(upsell_path_oid.to_s))
6642
+
6643
+ # query parameters
6644
+ query_params = opts[:query_params] || {}
6645
+
6646
+ # header parameters
6647
+ header_params = opts[:header_params] || {}
6648
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
6649
+ # HTTP header 'Accept' (if needed)
6650
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
6651
+ # HTTP header 'Content-Type'
6652
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
6653
+ if !content_type.nil?
6654
+ header_params['Content-Type'] = content_type
6655
+ end
6656
+ header_params[:'If-Match'] = if_match
6657
+
6658
+ # form parameters
6659
+ form_params = opts[:form_params] || {}
6660
+
6661
+ # http body (model)
6662
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(upsell_path)
6663
+
6664
+ # return_type
6665
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
6666
+
6667
+ # auth_names
6668
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
6669
+
6670
+ new_options = opts.merge(
6671
+ :operation => :"SfvbApi.update_sfvb_upsell_path",
6672
+ :header_params => header_params,
6673
+ :query_params => query_params,
6674
+ :form_params => form_params,
6675
+ :body => post_body,
6676
+ :auth_names => auth_names,
6677
+ :return_type => return_type
6678
+ )
6679
+
6680
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
6681
+ if @api_client.config.debugging
6682
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
6683
+ end
6684
+ return data, status_code, headers
6685
+ end
6686
+
5039
6687
  # Store a binary asset that was already uploaded
5040
6688
  # The second half of the two step upload. The bytes are fetched from the key, checked against the extension they claim to be, and written exactly as a text write is - so the same If-Match precondition, the same read only refusal and the same publish gate apply. An SVG is sanitized before it is stored. Writing outside /themes/ requires sfvb_publish, because anything served off the storefront root is live by definition.
5041
6689
  # @param storefront_oid [Integer]