ultracart_api 4.1.170 → 4.1.172

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -2
  3. data/docs/SfvbApi.md +890 -37
  4. data/docs/SfvbPageResponse.md +2 -0
  5. data/docs/SfvbUpsellItemLogic.md +24 -0
  6. data/docs/SfvbUpsellItemLogicItem.md +22 -0
  7. data/docs/SfvbUpsellOffer.md +118 -8
  8. data/docs/SfvbUpsellPath.md +48 -0
  9. data/docs/SfvbUpsellPathDuplicateRequest.md +18 -0
  10. data/docs/SfvbUpsellPathMoveRequest.md +18 -0
  11. data/docs/SfvbUpsellPathsResponse.md +28 -0
  12. data/docs/SfvbUpsellStats.md +54 -0
  13. data/docs/SfvbUpsellStep.md +22 -0
  14. data/docs/SfvbUpsellStepOffer.md +32 -0
  15. data/docs/SfvbUpsellTowerData.md +20 -0
  16. data/docs/SfvbUpsellVariation.md +22 -0
  17. data/lib/ultracart_api/api/sfvb_api.rb +1256 -78
  18. data/lib/ultracart_api/models/sfvb_page_response.rb +11 -1
  19. data/lib/ultracart_api/models/sfvb_upsell_item_logic.rb +252 -0
  20. data/lib/ultracart_api/models/sfvb_upsell_item_logic_item.rb +240 -0
  21. data/lib/ultracart_api/models/sfvb_upsell_offer.rb +598 -9
  22. data/lib/ultracart_api/models/sfvb_upsell_path.rb +373 -0
  23. data/lib/ultracart_api/models/sfvb_upsell_path_duplicate_request.rb +220 -0
  24. data/lib/ultracart_api/models/sfvb_upsell_path_move_request.rb +220 -0
  25. data/lib/ultracart_api/models/sfvb_upsell_paths_response.rb +272 -0
  26. data/lib/ultracart_api/models/sfvb_upsell_stats.rb +400 -0
  27. data/lib/ultracart_api/models/sfvb_upsell_step.rb +241 -0
  28. data/lib/ultracart_api/models/sfvb_upsell_step_offer.rb +288 -0
  29. data/lib/ultracart_api/models/sfvb_upsell_tower_data.rb +234 -0
  30. data/lib/ultracart_api/models/sfvb_upsell_variation.rb +241 -0
  31. data/lib/ultracart_api/version.rb +1 -1
  32. data/lib/ultracart_api.rb +11 -0
  33. metadata +24 -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,83 @@ 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
+
477
624
  # Detach an image from an item
478
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.
479
626
  # @param storefront_oid [Integer]
@@ -697,6 +844,146 @@ module UltracartClient
697
844
  return data, status_code, headers
698
845
  end
699
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
+
700
987
  # Read a storefront file's raw bytes
701
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.
702
989
  # @param storefront_oid [Integer]
@@ -920,6 +1207,153 @@ module UltracartClient
920
1207
  return data, status_code, headers
921
1208
  end
922
1209
 
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
+
923
1357
  # End an experiment
924
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.
925
1359
  # @param storefront_oid [Integer]
@@ -2391,45 +2825,209 @@ module UltracartClient
2391
2825
 
2392
2826
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2393
2827
  if @api_client.config.debugging
2394
- @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2828
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2829
+ end
2830
+ return data, status_code, headers
2831
+ end
2832
+
2833
+ # Status of an asynchronous theme job
2834
+ # Poll until complete is true, then check success. Note that the new theme's oid is not returned. The job's product is a plain text report rather than a structured result, so once it completes, list themes and match on the target_path the start call gave you.
2835
+ # @param storefront_oid [Integer]
2836
+ # @param job_id [Integer]
2837
+ # @param [Hash] opts the optional parameters
2838
+ # @return [SfvbThemeJobResponse]
2839
+ def get_sfvb_theme_job(storefront_oid, job_id, opts = {})
2840
+ data, _status_code, _headers = get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts)
2841
+ data
2842
+ end
2843
+
2844
+ # Status of an asynchronous theme job
2845
+ # Poll until complete is true, then check success. Note that the new theme&#39;s oid is not returned. The job&#39;s product is a plain text report rather than a structured result, so once it completes, list themes and match on the target_path the start call gave you.
2846
+ # @param storefront_oid [Integer]
2847
+ # @param job_id [Integer]
2848
+ # @param [Hash] opts the optional parameters
2849
+ # @return [Array<(SfvbThemeJobResponse, Integer, Hash)>] SfvbThemeJobResponse data, response status code and response headers
2850
+ def get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts = {})
2851
+ if @api_client.config.debugging
2852
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_job ...'
2853
+ end
2854
+ # verify the required parameter 'storefront_oid' is set
2855
+ if @api_client.config.client_side_validation && storefront_oid.nil?
2856
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme_job"
2857
+ end
2858
+ # verify the required parameter 'job_id' is set
2859
+ if @api_client.config.client_side_validation && job_id.nil?
2860
+ fail ArgumentError, "Missing the required parameter 'job_id' when calling SfvbApi.get_sfvb_theme_job"
2861
+ end
2862
+ # resource path
2863
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
2864
+
2865
+ # query parameters
2866
+ query_params = opts[:query_params] || {}
2867
+
2868
+ # header parameters
2869
+ header_params = opts[:header_params] || {}
2870
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2871
+ # HTTP header 'Accept' (if needed)
2872
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2873
+
2874
+ # form parameters
2875
+ form_params = opts[:form_params] || {}
2876
+
2877
+ # http body (model)
2878
+ post_body = opts[:debug_body]
2879
+
2880
+ # return_type
2881
+ return_type = opts[:debug_return_type] || 'SfvbThemeJobResponse'
2882
+
2883
+ # auth_names
2884
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2885
+
2886
+ new_options = opts.merge(
2887
+ :operation => :"SfvbApi.get_sfvb_theme_job",
2888
+ :header_params => header_params,
2889
+ :query_params => query_params,
2890
+ :form_params => form_params,
2891
+ :body => post_body,
2892
+ :auth_names => auth_names,
2893
+ :return_type => return_type
2894
+ )
2895
+
2896
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2897
+ if @api_client.config.debugging
2898
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2899
+ end
2900
+ return data, status_code, headers
2901
+ end
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}"
2395
2981
  end
2396
2982
  return data, status_code, headers
2397
2983
  end
2398
2984
 
2399
- # Status of an asynchronous theme job
2400
- # Poll until complete is true, then check success. Note that the new theme's oid is not returned. The job's product is a plain text report rather than a structured result, so once it completes, list themes and match on the target_path the start call gave you.
2985
+ # Get an upsell path
2986
+ # The whole path, with the hash an update sends back in If-Match. Stats as on the list.
2401
2987
  # @param storefront_oid [Integer]
2402
- # @param job_id [Integer]
2988
+ # @param upsell_path_oid [Integer]
2403
2989
  # @param [Hash] opts the optional parameters
2404
- # @return [SfvbThemeJobResponse]
2405
- def get_sfvb_theme_job(storefront_oid, job_id, opts = {})
2406
- data, _status_code, _headers = get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts)
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)
2407
2997
  data
2408
2998
  end
2409
2999
 
2410
- # Status of an asynchronous theme job
2411
- # Poll until complete is true, then check success. Note that the new theme&#39;s oid is not returned. The job&#39;s product is a plain text report rather than a structured result, so once it completes, list themes and match on the target_path the start call gave you.
3000
+ # Get an upsell path
3001
+ # The whole path, with the hash an update sends back in If-Match. Stats as on the list.
2412
3002
  # @param storefront_oid [Integer]
2413
- # @param job_id [Integer]
3003
+ # @param upsell_path_oid [Integer]
2414
3004
  # @param [Hash] opts the optional parameters
2415
- # @return [Array<(SfvbThemeJobResponse, Integer, Hash)>] SfvbThemeJobResponse data, response status code and response headers
2416
- def get_sfvb_theme_job_with_http_info(storefront_oid, job_id, opts = {})
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 = {})
2417
3011
  if @api_client.config.debugging
2418
- @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_theme_job ...'
3012
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_upsell_path ...'
2419
3013
  end
2420
3014
  # verify the required parameter 'storefront_oid' is set
2421
3015
  if @api_client.config.client_side_validation && storefront_oid.nil?
2422
- fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_theme_job"
3016
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_upsell_path"
2423
3017
  end
2424
- # verify the required parameter 'job_id' is set
2425
- if @api_client.config.client_side_validation && job_id.nil?
2426
- fail ArgumentError, "Missing the required parameter 'job_id' when calling SfvbApi.get_sfvb_theme_job"
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"
2427
3021
  end
2428
3022
  # resource path
2429
- local_var_path = '/sfvb/storefronts/{storefront_oid}/theme_jobs/{job_id}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'job_id' + '}', CGI.escape(job_id.to_s))
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))
2430
3024
 
2431
3025
  # query parameters
2432
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?
2433
3031
 
2434
3032
  # header parameters
2435
3033
  header_params = opts[:header_params] || {}
@@ -2444,13 +3042,13 @@ module UltracartClient
2444
3042
  post_body = opts[:debug_body]
2445
3043
 
2446
3044
  # return_type
2447
- return_type = opts[:debug_return_type] || 'SfvbThemeJobResponse'
3045
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
2448
3046
 
2449
3047
  # auth_names
2450
3048
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
2451
3049
 
2452
3050
  new_options = opts.merge(
2453
- :operation => :"SfvbApi.get_sfvb_theme_job",
3051
+ :operation => :"SfvbApi.get_sfvb_upsell_path",
2454
3052
  :header_params => header_params,
2455
3053
  :query_params => query_params,
2456
3054
  :form_params => form_params,
@@ -2461,7 +3059,7 @@ module UltracartClient
2461
3059
 
2462
3060
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2463
3061
  if @api_client.config.debugging
2464
- @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_theme_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3062
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2465
3063
  end
2466
3064
  return data, status_code, headers
2467
3065
  end
@@ -2657,6 +3255,156 @@ module UltracartClient
2657
3255
  return data, status_code, headers
2658
3256
  end
2659
3257
 
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
+
2660
3408
  # Install a library entry into a storefront
2661
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.
2662
3410
  # @param storefront_oid [Integer]
@@ -3306,10 +4054,141 @@ module UltracartClient
3306
4054
  # @return [Array<(SfvbStorefrontsResponse, Integer, Hash)>] SfvbStorefrontsResponse data, response status code and response headers
3307
4055
  def list_sfvb_storefronts_with_http_info(opts = {})
3308
4056
  if @api_client.config.debugging
3309
- @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_storefronts ...'
4057
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_storefronts ...'
4058
+ end
4059
+ # resource path
4060
+ local_var_path = '/sfvb/storefronts'
4061
+
4062
+ # query parameters
4063
+ query_params = opts[:query_params] || {}
4064
+
4065
+ # header parameters
4066
+ header_params = opts[:header_params] || {}
4067
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4068
+ # HTTP header 'Accept' (if needed)
4069
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4070
+
4071
+ # form parameters
4072
+ form_params = opts[:form_params] || {}
4073
+
4074
+ # http body (model)
4075
+ post_body = opts[:debug_body]
4076
+
4077
+ # return_type
4078
+ return_type = opts[:debug_return_type] || 'SfvbStorefrontsResponse'
4079
+
4080
+ # auth_names
4081
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4082
+
4083
+ new_options = opts.merge(
4084
+ :operation => :"SfvbApi.list_sfvb_storefronts",
4085
+ :header_params => header_params,
4086
+ :query_params => query_params,
4087
+ :form_params => form_params,
4088
+ :body => post_body,
4089
+ :auth_names => auth_names,
4090
+ :return_type => return_type
4091
+ )
4092
+
4093
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4094
+ if @api_client.config.debugging
4095
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_storefronts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4096
+ end
4097
+ return data, status_code, headers
4098
+ end
4099
+
4100
+ # List the active theme's templates
4101
+ # Each template with the page type it declares and what it can render - items, sub-pages, blog posts, pagination, visual builder containers. A page's group_template names one of these. The storefront's fixed templates, such as checkout and my account, are flagged system and must never be assigned to a page.
4102
+ # @param storefront_oid [Integer]
4103
+ # @param [Hash] opts the optional parameters
4104
+ # @option opts [String] :page_type Only templates declaring this page type, for example group
4105
+ # @return [SfvbTemplatesResponse]
4106
+ def list_sfvb_templates(storefront_oid, opts = {})
4107
+ data, _status_code, _headers = list_sfvb_templates_with_http_info(storefront_oid, opts)
4108
+ data
4109
+ end
4110
+
4111
+ # List the active theme&#39;s templates
4112
+ # Each template with the page type it declares and what it can render - items, sub-pages, blog posts, pagination, visual builder containers. A page&#39;s group_template names one of these. The storefront&#39;s fixed templates, such as checkout and my account, are flagged system and must never be assigned to a page.
4113
+ # @param storefront_oid [Integer]
4114
+ # @param [Hash] opts the optional parameters
4115
+ # @option opts [String] :page_type Only templates declaring this page type, for example group
4116
+ # @return [Array<(SfvbTemplatesResponse, Integer, Hash)>] SfvbTemplatesResponse data, response status code and response headers
4117
+ def list_sfvb_templates_with_http_info(storefront_oid, opts = {})
4118
+ if @api_client.config.debugging
4119
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_templates ...'
4120
+ end
4121
+ # verify the required parameter 'storefront_oid' is set
4122
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4123
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_templates"
4124
+ end
4125
+ # resource path
4126
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/templates'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4127
+
4128
+ # query parameters
4129
+ query_params = opts[:query_params] || {}
4130
+ query_params[:'page_type'] = opts[:'page_type'] if !opts[:'page_type'].nil?
4131
+
4132
+ # header parameters
4133
+ header_params = opts[:header_params] || {}
4134
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
4135
+ # HTTP header 'Accept' (if needed)
4136
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4137
+
4138
+ # form parameters
4139
+ form_params = opts[:form_params] || {}
4140
+
4141
+ # http body (model)
4142
+ post_body = opts[:debug_body]
4143
+
4144
+ # return_type
4145
+ return_type = opts[:debug_return_type] || 'SfvbTemplatesResponse'
4146
+
4147
+ # auth_names
4148
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
4149
+
4150
+ new_options = opts.merge(
4151
+ :operation => :"SfvbApi.list_sfvb_templates",
4152
+ :header_params => header_params,
4153
+ :query_params => query_params,
4154
+ :form_params => form_params,
4155
+ :body => post_body,
4156
+ :auth_names => auth_names,
4157
+ :return_type => return_type
4158
+ )
4159
+
4160
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4161
+ if @api_client.config.debugging
4162
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4163
+ end
4164
+ return data, status_code, headers
4165
+ end
4166
+
4167
+ # List themes for a storefront
4168
+ # Exactly one theme is flagged active. Writing to the active theme is writing live and requires the sfvb_publish scope.
4169
+ # @param storefront_oid [Integer]
4170
+ # @param [Hash] opts the optional parameters
4171
+ # @return [SfvbThemesResponse]
4172
+ def list_sfvb_themes(storefront_oid, opts = {})
4173
+ data, _status_code, _headers = list_sfvb_themes_with_http_info(storefront_oid, opts)
4174
+ data
4175
+ end
4176
+
4177
+ # List themes for a storefront
4178
+ # Exactly one theme is flagged active. Writing to the active theme is writing live and requires the sfvb_publish scope.
4179
+ # @param storefront_oid [Integer]
4180
+ # @param [Hash] opts the optional parameters
4181
+ # @return [Array<(SfvbThemesResponse, Integer, Hash)>] SfvbThemesResponse data, response status code and response headers
4182
+ def list_sfvb_themes_with_http_info(storefront_oid, opts = {})
4183
+ if @api_client.config.debugging
4184
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_themes ...'
4185
+ end
4186
+ # verify the required parameter 'storefront_oid' is set
4187
+ if @api_client.config.client_side_validation && storefront_oid.nil?
4188
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_themes"
3310
4189
  end
3311
4190
  # resource path
3312
- local_var_path = '/sfvb/storefronts'
4191
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/themes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3313
4192
 
3314
4193
  # query parameters
3315
4194
  query_params = opts[:query_params] || {}
@@ -3327,13 +4206,13 @@ module UltracartClient
3327
4206
  post_body = opts[:debug_body]
3328
4207
 
3329
4208
  # return_type
3330
- return_type = opts[:debug_return_type] || 'SfvbStorefrontsResponse'
4209
+ return_type = opts[:debug_return_type] || 'SfvbThemesResponse'
3331
4210
 
3332
4211
  # auth_names
3333
4212
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3334
4213
 
3335
4214
  new_options = opts.merge(
3336
- :operation => :"SfvbApi.list_sfvb_storefronts",
4215
+ :operation => :"SfvbApi.list_sfvb_themes",
3337
4216
  :header_params => header_params,
3338
4217
  :query_params => query_params,
3339
4218
  :form_params => form_params,
@@ -3344,42 +4223,51 @@ module UltracartClient
3344
4223
 
3345
4224
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3346
4225
  if @api_client.config.debugging
3347
- @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_storefronts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4226
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3348
4227
  end
3349
4228
  return data, status_code, headers
3350
4229
  end
3351
4230
 
3352
- # List the active theme's templates
3353
- # Each template with the page type it declares and what it can render - items, sub-pages, blog posts, pagination, visual builder containers. A page's group_template names one of these. The storefront's fixed templates, such as checkout and my account, are flagged system and must never be assigned to a page.
4231
+ # List upsell offers
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.
3354
4233
  # @param storefront_oid [Integer]
3355
4234
  # @param [Hash] opts the optional parameters
3356
- # @option opts [String] :page_type Only templates declaring this page type, for example group
3357
- # @return [SfvbTemplatesResponse]
3358
- def list_sfvb_templates(storefront_oid, opts = {})
3359
- data, _status_code, _headers = list_sfvb_templates_with_http_info(storefront_oid, opts)
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
4239
+ # @return [SfvbUpsellOffersResponse]
4240
+ def list_sfvb_upsell_offers(storefront_oid, opts = {})
4241
+ data, _status_code, _headers = list_sfvb_upsell_offers_with_http_info(storefront_oid, opts)
3360
4242
  data
3361
4243
  end
3362
4244
 
3363
- # List the active theme&#39;s templates
3364
- # Each template with the page type it declares and what it can render - items, sub-pages, blog posts, pagination, visual builder containers. A page&#39;s group_template names one of these. The storefront&#39;s fixed templates, such as checkout and my account, are flagged system and must never be assigned to a page.
4245
+ # List upsell offers
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.
3365
4247
  # @param storefront_oid [Integer]
3366
4248
  # @param [Hash] opts the optional parameters
3367
- # @option opts [String] :page_type Only templates declaring this page type, for example group
3368
- # @return [Array<(SfvbTemplatesResponse, Integer, Hash)>] SfvbTemplatesResponse data, response status code and response headers
3369
- def list_sfvb_templates_with_http_info(storefront_oid, opts = {})
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
4253
+ # @return [Array<(SfvbUpsellOffersResponse, Integer, Hash)>] SfvbUpsellOffersResponse data, response status code and response headers
4254
+ def list_sfvb_upsell_offers_with_http_info(storefront_oid, opts = {})
3370
4255
  if @api_client.config.debugging
3371
- @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_templates ...'
4256
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_upsell_offers ...'
3372
4257
  end
3373
4258
  # verify the required parameter 'storefront_oid' is set
3374
4259
  if @api_client.config.client_side_validation && storefront_oid.nil?
3375
- fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_templates"
4260
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_upsell_offers"
3376
4261
  end
3377
4262
  # resource path
3378
- local_var_path = '/sfvb/storefronts/{storefront_oid}/templates'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4263
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3379
4264
 
3380
4265
  # query parameters
3381
4266
  query_params = opts[:query_params] || {}
3382
- query_params[:'page_type'] = opts[:'page_type'] if !opts[:'page_type'].nil?
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?
3383
4271
 
3384
4272
  # header parameters
3385
4273
  header_params = opts[:header_params] || {}
@@ -3394,13 +4282,13 @@ module UltracartClient
3394
4282
  post_body = opts[:debug_body]
3395
4283
 
3396
4284
  # return_type
3397
- return_type = opts[:debug_return_type] || 'SfvbTemplatesResponse'
4285
+ return_type = opts[:debug_return_type] || 'SfvbUpsellOffersResponse'
3398
4286
 
3399
4287
  # auth_names
3400
4288
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3401
4289
 
3402
4290
  new_options = opts.merge(
3403
- :operation => :"SfvbApi.list_sfvb_templates",
4291
+ :operation => :"SfvbApi.list_sfvb_upsell_offers",
3404
4292
  :header_params => header_params,
3405
4293
  :query_params => query_params,
3406
4294
  :form_params => form_params,
@@ -3411,39 +4299,66 @@ module UltracartClient
3411
4299
 
3412
4300
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3413
4301
  if @api_client.config.debugging
3414
- @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4302
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_upsell_offers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3415
4303
  end
3416
4304
  return data, status_code, headers
3417
4305
  end
3418
4306
 
3419
- # List themes for a storefront
3420
- # Exactly one theme is flagged active. Writing to the active theme is writing live and requires the sfvb_publish scope.
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.
3421
4309
  # @param storefront_oid [Integer]
3422
4310
  # @param [Hash] opts the optional parameters
3423
- # @return [SfvbThemesResponse]
3424
- def list_sfvb_themes(storefront_oid, opts = {})
3425
- data, _status_code, _headers = list_sfvb_themes_with_http_info(storefront_oid, opts)
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)
3426
4323
  data
3427
4324
  end
3428
4325
 
3429
- # List themes for a storefront
3430
- # Exactly one theme is flagged active. Writing to the active theme is writing live and requires the sfvb_publish scope.
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.
3431
4328
  # @param storefront_oid [Integer]
3432
4329
  # @param [Hash] opts the optional parameters
3433
- # @return [Array<(SfvbThemesResponse, Integer, Hash)>] SfvbThemesResponse data, response status code and response headers
3434
- def list_sfvb_themes_with_http_info(storefront_oid, opts = {})
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 = {})
3435
4341
  if @api_client.config.debugging
3436
- @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_themes ...'
4342
+ @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_upsell_paths ...'
3437
4343
  end
3438
4344
  # verify the required parameter 'storefront_oid' is set
3439
4345
  if @api_client.config.client_side_validation && storefront_oid.nil?
3440
- fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_themes"
4346
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_upsell_paths"
3441
4347
  end
3442
4348
  # resource path
3443
- local_var_path = '/sfvb/storefronts/{storefront_oid}/themes'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
4349
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_paths'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3444
4350
 
3445
4351
  # query parameters
3446
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?
3447
4362
 
3448
4363
  # header parameters
3449
4364
  header_params = opts[:header_params] || {}
@@ -3458,13 +4373,13 @@ module UltracartClient
3458
4373
  post_body = opts[:debug_body]
3459
4374
 
3460
4375
  # return_type
3461
- return_type = opts[:debug_return_type] || 'SfvbThemesResponse'
4376
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPathsResponse'
3462
4377
 
3463
4378
  # auth_names
3464
4379
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3465
4380
 
3466
4381
  new_options = opts.merge(
3467
- :operation => :"SfvbApi.list_sfvb_themes",
4382
+ :operation => :"SfvbApi.list_sfvb_upsell_paths",
3468
4383
  :header_params => header_params,
3469
4384
  :query_params => query_params,
3470
4385
  :form_params => form_params,
@@ -3475,36 +4390,48 @@ module UltracartClient
3475
4390
 
3476
4391
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3477
4392
  if @api_client.config.debugging
3478
- @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_themes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4393
+ @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_upsell_paths\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3479
4394
  end
3480
4395
  return data, status_code, headers
3481
4396
  end
3482
4397
 
3483
- # List upsell offers
3484
- # 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.
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.
3485
4400
  # @param storefront_oid [Integer]
4401
+ # @param upsell_path_oid [Integer]
4402
+ # @param move_request [SfvbUpsellPathMoveRequest] Where to move it
3486
4403
  # @param [Hash] opts the optional parameters
3487
- # @return [SfvbUpsellOffersResponse]
3488
- def list_sfvb_upsell_offers(storefront_oid, opts = {})
3489
- data, _status_code, _headers = list_sfvb_upsell_offers_with_http_info(storefront_oid, opts)
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)
3490
4407
  data
3491
4408
  end
3492
4409
 
3493
- # List upsell offers
3494
- # 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.
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.
3495
4412
  # @param storefront_oid [Integer]
4413
+ # @param upsell_path_oid [Integer]
4414
+ # @param move_request [SfvbUpsellPathMoveRequest] Where to move it
3496
4415
  # @param [Hash] opts the optional parameters
3497
- # @return [Array<(SfvbUpsellOffersResponse, Integer, Hash)>] SfvbUpsellOffersResponse data, response status code and response headers
3498
- def list_sfvb_upsell_offers_with_http_info(storefront_oid, opts = {})
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 = {})
3499
4418
  if @api_client.config.debugging
3500
- @api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_upsell_offers ...'
4419
+ @api_client.config.logger.debug 'Calling API: SfvbApi.move_sfvb_upsell_path ...'
3501
4420
  end
3502
4421
  # verify the required parameter 'storefront_oid' is set
3503
4422
  if @api_client.config.client_side_validation && storefront_oid.nil?
3504
- fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_upsell_offers"
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"
3505
4432
  end
3506
4433
  # resource path
3507
- local_var_path = '/sfvb/storefronts/{storefront_oid}/upsell_offers'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
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))
3508
4435
 
3509
4436
  # query parameters
3510
4437
  query_params = opts[:query_params] || {}
@@ -3514,21 +4441,26 @@ module UltracartClient
3514
4441
  header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3515
4442
  # HTTP header 'Accept' (if needed)
3516
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
3517
4449
 
3518
4450
  # form parameters
3519
4451
  form_params = opts[:form_params] || {}
3520
4452
 
3521
4453
  # http body (model)
3522
- post_body = opts[:debug_body]
4454
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(move_request)
3523
4455
 
3524
4456
  # return_type
3525
- return_type = opts[:debug_return_type] || 'SfvbUpsellOffersResponse'
4457
+ return_type = opts[:debug_return_type] || 'SfvbUpsellPath'
3526
4458
 
3527
4459
  # auth_names
3528
4460
  auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3529
4461
 
3530
4462
  new_options = opts.merge(
3531
- :operation => :"SfvbApi.list_sfvb_upsell_offers",
4463
+ :operation => :"SfvbApi.move_sfvb_upsell_path",
3532
4464
  :header_params => header_params,
3533
4465
  :query_params => query_params,
3534
4466
  :form_params => form_params,
@@ -3537,9 +4469,9 @@ module UltracartClient
3537
4469
  :return_type => return_type
3538
4470
  )
3539
4471
 
3540
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4472
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3541
4473
  if @api_client.config.debugging
3542
- @api_client.config.logger.debug "API called: SfvbApi#list_sfvb_upsell_offers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4474
+ @api_client.config.logger.debug "API called: SfvbApi#move_sfvb_upsell_path\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3543
4475
  end
3544
4476
  return data, status_code, headers
3545
4477
  end
@@ -3814,7 +4746,7 @@ module UltracartClient
3814
4746
  end
3815
4747
 
3816
4748
  # Change some of an item's attributes
3817
- # Partial - only the attributes named change, and an empty value clears one. Every entry is validated before any is written, so a refusal leaves the item untouched. The list types are checked against the shape their renderer actually parses, which matters more than it sounds: a definition list is a bare array with one letter keys, a video list is a wrapper object with keys spelled out, and an item set is comma separated text rather than JSON. A shape the renderer cannot read is not reported at render time - it renders exactly like an attribute nobody ever set.
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.
3818
4750
  # @param storefront_oid [Integer]
3819
4751
  # @param item_attribute_update_request [SfvbItemAttributeUpdateRequest] Attributes to change
3820
4752
  # @param [Hash] opts the optional parameters
@@ -3827,7 +4759,7 @@ module UltracartClient
3827
4759
  end
3828
4760
 
3829
4761
  # Change some of an item&#39;s attributes
3830
- # Partial - only the attributes named change, and an empty value clears one. Every entry is validated before any is written, so a refusal leaves the item untouched. The list types are checked against the shape their renderer actually parses, which matters more than it sounds: a definition list is a bare array with one letter keys, a video list is a wrapper object with keys spelled out, and an item set is comma separated text rather than JSON. A shape the renderer cannot read is not reported at render time - it renders exactly like an attribute nobody ever set.
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.
3831
4763
  # @param storefront_oid [Integer]
3832
4764
  # @param item_attribute_update_request [SfvbItemAttributeUpdateRequest] Attributes to change
3833
4765
  # @param [Hash] opts the optional parameters
@@ -5506,6 +6438,252 @@ module UltracartClient
5506
6438
  return data, status_code, headers
5507
6439
  end
5508
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
+
5509
6687
  # Store a binary asset that was already uploaded
5510
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.
5511
6689
  # @param storefront_oid [Integer]