ultracart_api 4.1.239 → 4.1.241

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -2
  3. data/docs/SfvbApi.md +337 -0
  4. data/docs/SfvbApprovalCreateRequest.md +4 -0
  5. data/docs/SfvbItemChildCreateRequest.md +26 -0
  6. data/docs/SfvbItemChildCreateResponse.md +36 -0
  7. data/docs/SfvbItemDefaultPageRequest.md +20 -0
  8. data/docs/SfvbItemDefaultPageResponse.md +36 -0
  9. data/docs/SfvbItemDefaultPageResult.md +40 -0
  10. data/docs/SfvbItemDefaultPageRow.md +28 -0
  11. data/docs/SfvbItemPageAssignment.md +28 -0
  12. data/docs/SfvbItemPages.md +28 -0
  13. data/docs/SfvbItemVariationAxis.md +22 -0
  14. data/docs/SfvbItemVariationChange.md +40 -0
  15. data/docs/SfvbItemVariationChangeResult.md +24 -0
  16. data/docs/SfvbItemVariationChild.md +22 -0
  17. data/docs/SfvbItemVariationCombination.md +24 -0
  18. data/docs/SfvbItemVariationOption.md +22 -0
  19. data/docs/SfvbItemVariationValue.md +20 -0
  20. data/docs/SfvbItemVariations.md +30 -0
  21. data/docs/SfvbItemVariationsRequest.md +20 -0
  22. data/docs/SfvbItemVariationsResponse.md +38 -0
  23. data/docs/SfvbTrackingCheckPlanGate.md +2 -0
  24. data/lib/ultracart_api/api/sfvb_api.rb +459 -0
  25. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +24 -3
  26. data/lib/ultracart_api/models/sfvb_item_child_create_request.rb +260 -0
  27. data/lib/ultracart_api/models/sfvb_item_child_create_response.rb +309 -0
  28. data/lib/ultracart_api/models/sfvb_item_default_page_request.rb +232 -0
  29. data/lib/ultracart_api/models/sfvb_item_default_page_response.rb +312 -0
  30. data/lib/ultracart_api/models/sfvb_item_default_page_result.rb +330 -0
  31. data/lib/ultracart_api/models/sfvb_item_default_page_row.rb +270 -0
  32. data/lib/ultracart_api/models/sfvb_item_page_assignment.rb +270 -0
  33. data/lib/ultracart_api/models/sfvb_item_pages.rb +274 -0
  34. data/lib/ultracart_api/models/sfvb_item_variation_axis.rb +242 -0
  35. data/lib/ultracart_api/models/sfvb_item_variation_change.rb +334 -0
  36. data/lib/ultracart_api/models/sfvb_item_variation_change_result.rb +250 -0
  37. data/lib/ultracart_api/models/sfvb_item_variation_child.rb +240 -0
  38. data/lib/ultracart_api/models/sfvb_item_variation_combination.rb +251 -0
  39. data/lib/ultracart_api/models/sfvb_item_variation_option.rb +240 -0
  40. data/lib/ultracart_api/models/sfvb_item_variation_value.rb +230 -0
  41. data/lib/ultracart_api/models/sfvb_item_variations.rb +284 -0
  42. data/lib/ultracart_api/models/sfvb_item_variations_request.rb +232 -0
  43. data/lib/ultracart_api/models/sfvb_item_variations_response.rb +328 -0
  44. data/lib/ultracart_api/models/sfvb_tracking_check_plan_gate.rb +11 -1
  45. data/lib/ultracart_api/version.rb +1 -1
  46. data/lib/ultracart_api.rb +18 -0
  47. metadata +37 -1
@@ -3565,6 +3565,81 @@ module UltracartClient
3565
3565
  return data, status_code, headers
3566
3566
  end
3567
3567
 
3568
+ # Check moving items' default (canonical) pages
3569
+ # Checks up to 2,000 rows on up to 200 items, each naming an item and a page it is already on, and saves nothing. Each row answers ready, already_default, target_not_found, target_not_on_host, target_not_assigned, target_hidden (refused - a hidden page isn't served to shoppers), item_not_found, invalid or stale, with the item's current default and current_sha256. rows_sha256 covers the ready rows - request item.default_page with exactly those rows, then apply them.
3570
+ # @param storefront_oid [Integer]
3571
+ # @param item_default_page_request [SfvbItemDefaultPageRequest] The rows
3572
+ # @param [Hash] opts the optional parameters
3573
+ # @return [SfvbItemDefaultPageResponse]
3574
+ def dry_run_sfvb_item_default_page(storefront_oid, item_default_page_request, opts = {})
3575
+ data, _status_code, _headers = dry_run_sfvb_item_default_page_with_http_info(storefront_oid, item_default_page_request, opts)
3576
+ data
3577
+ end
3578
+
3579
+ # Check moving items' default (canonical) pages
3580
+ # Checks up to 2,000 rows on up to 200 items, each naming an item and a page it is already on, and saves nothing. Each row answers ready, already_default, target_not_found, target_not_on_host, target_not_assigned, target_hidden (refused - a hidden page isn't served to shoppers), item_not_found, invalid or stale, with the item's current default and current_sha256. rows_sha256 covers the ready rows - request item.default_page with exactly those rows, then apply them.
3581
+ # @param storefront_oid [Integer]
3582
+ # @param item_default_page_request [SfvbItemDefaultPageRequest] The rows
3583
+ # @param [Hash] opts the optional parameters
3584
+ # @return [Array<(SfvbItemDefaultPageResponse, Integer, Hash)>] SfvbItemDefaultPageResponse data, response status code and response headers
3585
+ def dry_run_sfvb_item_default_page_with_http_info(storefront_oid, item_default_page_request, opts = {})
3586
+ if @api_client.config.debugging
3587
+ @api_client.config.logger.debug 'Calling API: SfvbApi.dry_run_sfvb_item_default_page ...'
3588
+ end
3589
+ # verify the required parameter 'storefront_oid' is set
3590
+ if @api_client.config.client_side_validation && storefront_oid.nil?
3591
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.dry_run_sfvb_item_default_page"
3592
+ end
3593
+ # verify the required parameter 'item_default_page_request' is set
3594
+ if @api_client.config.client_side_validation && item_default_page_request.nil?
3595
+ fail ArgumentError, "Missing the required parameter 'item_default_page_request' when calling SfvbApi.dry_run_sfvb_item_default_page"
3596
+ end
3597
+ # resource path
3598
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/default_page/dry_run'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
3599
+
3600
+ # query parameters
3601
+ query_params = opts[:query_params] || {}
3602
+
3603
+ # header parameters
3604
+ header_params = opts[:header_params] || {}
3605
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
3606
+ # HTTP header 'Accept' (if needed)
3607
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3608
+ # HTTP header 'Content-Type'
3609
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
3610
+ if !content_type.nil?
3611
+ header_params['Content-Type'] = content_type
3612
+ end
3613
+
3614
+ # form parameters
3615
+ form_params = opts[:form_params] || {}
3616
+
3617
+ # http body (model)
3618
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_default_page_request)
3619
+
3620
+ # return_type
3621
+ return_type = opts[:debug_return_type] || 'SfvbItemDefaultPageResponse'
3622
+
3623
+ # auth_names
3624
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
3625
+
3626
+ new_options = opts.merge(
3627
+ :operation => :"SfvbApi.dry_run_sfvb_item_default_page",
3628
+ :header_params => header_params,
3629
+ :query_params => query_params,
3630
+ :form_params => form_params,
3631
+ :body => post_body,
3632
+ :auth_names => auth_names,
3633
+ :return_type => return_type
3634
+ )
3635
+
3636
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3637
+ if @api_client.config.debugging
3638
+ @api_client.config.logger.debug "API called: SfvbApi#dry_run_sfvb_item_default_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3639
+ end
3640
+ return data, status_code, headers
3641
+ end
3642
+
3568
3643
  # Check a batch delete of redirect rules without writing it
3569
3644
  # Checks up to 5,000 rules by redirect_id and returns each one as deletable, stale (its hash_sha256 differs from the one sent) or not_found, with its current hash, source, target, status, type and note, and a plan_hash. Writes nothing. Rows may leave out hash_sha256; the result carries the current one to send when deleting.
3570
3645
  # @param storefront_oid [Integer]
@@ -7948,6 +8023,76 @@ module UltracartClient
7948
8023
  return data, status_code, headers
7949
8024
  end
7950
8025
 
8026
+ # Read the pages an item is on and its default page
8027
+ # Every page the item is assigned to on this storefront, whether each is visible, and which is the default - the page the item's canonical link uses. Another storefront's pages aren't listed. hash_sha256 is the same value the default-page dry run reports as current_sha256. Address the item by merchant_item_id or merchant_item_oid.
8028
+ # @param storefront_oid [Integer]
8029
+ # @param [Hash] opts the optional parameters
8030
+ # @option opts [String] :merchant_item_id
8031
+ # @option opts [Integer] :merchant_item_oid
8032
+ # @return [SfvbItemPages]
8033
+ def get_sfvb_item_pages(storefront_oid, opts = {})
8034
+ data, _status_code, _headers = get_sfvb_item_pages_with_http_info(storefront_oid, opts)
8035
+ data
8036
+ end
8037
+
8038
+ # Read the pages an item is on and its default page
8039
+ # Every page the item is assigned to on this storefront, whether each is visible, and which is the default - the page the item&#39;s canonical link uses. Another storefront&#39;s pages aren&#39;t listed. hash_sha256 is the same value the default-page dry run reports as current_sha256. Address the item by merchant_item_id or merchant_item_oid.
8040
+ # @param storefront_oid [Integer]
8041
+ # @param [Hash] opts the optional parameters
8042
+ # @option opts [String] :merchant_item_id
8043
+ # @option opts [Integer] :merchant_item_oid
8044
+ # @return [Array<(SfvbItemPages, Integer, Hash)>] SfvbItemPages data, response status code and response headers
8045
+ def get_sfvb_item_pages_with_http_info(storefront_oid, opts = {})
8046
+ if @api_client.config.debugging
8047
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_pages ...'
8048
+ end
8049
+ # verify the required parameter 'storefront_oid' is set
8050
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8051
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_pages"
8052
+ end
8053
+ # resource path
8054
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/pages'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
8055
+
8056
+ # query parameters
8057
+ query_params = opts[:query_params] || {}
8058
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
8059
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
8060
+
8061
+ # header parameters
8062
+ header_params = opts[:header_params] || {}
8063
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8064
+ # HTTP header 'Accept' (if needed)
8065
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8066
+
8067
+ # form parameters
8068
+ form_params = opts[:form_params] || {}
8069
+
8070
+ # http body (model)
8071
+ post_body = opts[:debug_body]
8072
+
8073
+ # return_type
8074
+ return_type = opts[:debug_return_type] || 'SfvbItemPages'
8075
+
8076
+ # auth_names
8077
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
8078
+
8079
+ new_options = opts.merge(
8080
+ :operation => :"SfvbApi.get_sfvb_item_pages",
8081
+ :header_params => header_params,
8082
+ :query_params => query_params,
8083
+ :form_params => form_params,
8084
+ :body => post_body,
8085
+ :auth_names => auth_names,
8086
+ :return_type => return_type
8087
+ )
8088
+
8089
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
8090
+ if @api_client.config.debugging
8091
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8092
+ end
8093
+ return data, status_code, headers
8094
+ end
8095
+
7951
8096
  # Read an item's pre-order flag and ETA
7952
8097
  # Whether the item is on pre-order, its ETA, and what itempreorder shows shoppers because of them, with a hash_sha256 to send as If-Match when changing them. A variation is an item of its own and can be read here; read a parent's variations together with GET items/preorder/children. Address by merchant_item_id or merchant_item_oid.
7953
8098
  # @param storefront_oid [Integer]
@@ -8228,6 +8373,76 @@ module UltracartClient
8228
8373
  return data, status_code, headers
8229
8374
  end
8230
8375
 
8376
+ # Read an item's variations
8377
+ # The variation axes, such as Size, with their options in the order shoppers see them, and every filled combination with the child item it sells and its quantity. A combination not listed has no child, and storefronts show it as unavailable. hash_sha256 goes back as If-Match on the update. Address the parent by merchant_item_id or merchant_item_oid.
8378
+ # @param storefront_oid [Integer]
8379
+ # @param [Hash] opts the optional parameters
8380
+ # @option opts [String] :merchant_item_id
8381
+ # @option opts [Integer] :merchant_item_oid
8382
+ # @return [SfvbItemVariations]
8383
+ def get_sfvb_item_variations(storefront_oid, opts = {})
8384
+ data, _status_code, _headers = get_sfvb_item_variations_with_http_info(storefront_oid, opts)
8385
+ data
8386
+ end
8387
+
8388
+ # Read an item&#39;s variations
8389
+ # The variation axes, such as Size, with their options in the order shoppers see them, and every filled combination with the child item it sells and its quantity. A combination not listed has no child, and storefronts show it as unavailable. hash_sha256 goes back as If-Match on the update. Address the parent by merchant_item_id or merchant_item_oid.
8390
+ # @param storefront_oid [Integer]
8391
+ # @param [Hash] opts the optional parameters
8392
+ # @option opts [String] :merchant_item_id
8393
+ # @option opts [Integer] :merchant_item_oid
8394
+ # @return [Array<(SfvbItemVariations, Integer, Hash)>] SfvbItemVariations data, response status code and response headers
8395
+ def get_sfvb_item_variations_with_http_info(storefront_oid, opts = {})
8396
+ if @api_client.config.debugging
8397
+ @api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_item_variations ...'
8398
+ end
8399
+ # verify the required parameter 'storefront_oid' is set
8400
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8401
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_item_variations"
8402
+ end
8403
+ # resource path
8404
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/variations'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
8405
+
8406
+ # query parameters
8407
+ query_params = opts[:query_params] || {}
8408
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
8409
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
8410
+
8411
+ # header parameters
8412
+ header_params = opts[:header_params] || {}
8413
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8414
+ # HTTP header 'Accept' (if needed)
8415
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8416
+
8417
+ # form parameters
8418
+ form_params = opts[:form_params] || {}
8419
+
8420
+ # http body (model)
8421
+ post_body = opts[:debug_body]
8422
+
8423
+ # return_type
8424
+ return_type = opts[:debug_return_type] || 'SfvbItemVariations'
8425
+
8426
+ # auth_names
8427
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
8428
+
8429
+ new_options = opts.merge(
8430
+ :operation => :"SfvbApi.get_sfvb_item_variations",
8431
+ :header_params => header_params,
8432
+ :query_params => query_params,
8433
+ :form_params => form_params,
8434
+ :body => post_body,
8435
+ :auth_names => auth_names,
8436
+ :return_type => return_type
8437
+ )
8438
+
8439
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
8440
+ if @api_client.config.debugging
8441
+ @api_client.config.logger.debug "API called: SfvbApi#get_sfvb_item_variations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8442
+ end
8443
+ return data, status_code, headers
8444
+ end
8445
+
8231
8446
  # Read one library entry including its CJSON
8232
8447
  # The owner gets the draft with its hash_sha256, which an update, delete or publish sends back as If-Match. Everyone else gets the latest published revision. Pin a published revision with revision_number. Read content_manifest before installing. If the fragment references images or other storefront files those paths will not resolve on this storefront until the entry is installed, so use install rather than this when the intent is to place the fragment.
8233
8448
  # @param storefront_oid [Integer]
@@ -12658,6 +12873,81 @@ module UltracartClient
12658
12873
  return data, status_code, headers
12659
12874
  end
12660
12875
 
12876
+ # Create a child item for a parent's variations
12877
+ # Creates a new item copying the parent's description, cost, weight, dimensions and item folder, so it can be assigned to a combination with the variations update. It is not assigned here and nothing else is copied. merchant_item_id may use letters, digits, dot, underscore and dash, at most 20 characters; an id already on the account is 409 sfvb.item_exists. Needs sfvb_publish when items are live. dry_run checks without creating.
12878
+ # @param storefront_oid [Integer]
12879
+ # @param item_child_request [SfvbItemChildCreateRequest] The child to create
12880
+ # @param [Hash] opts the optional parameters
12881
+ # @return [SfvbItemChildCreateResponse]
12882
+ def insert_sfvb_item_child(storefront_oid, item_child_request, opts = {})
12883
+ data, _status_code, _headers = insert_sfvb_item_child_with_http_info(storefront_oid, item_child_request, opts)
12884
+ data
12885
+ end
12886
+
12887
+ # Create a child item for a parent&#39;s variations
12888
+ # Creates a new item copying the parent&#39;s description, cost, weight, dimensions and item folder, so it can be assigned to a combination with the variations update. It is not assigned here and nothing else is copied. merchant_item_id may use letters, digits, dot, underscore and dash, at most 20 characters; an id already on the account is 409 sfvb.item_exists. Needs sfvb_publish when items are live. dry_run checks without creating.
12889
+ # @param storefront_oid [Integer]
12890
+ # @param item_child_request [SfvbItemChildCreateRequest] The child to create
12891
+ # @param [Hash] opts the optional parameters
12892
+ # @return [Array<(SfvbItemChildCreateResponse, Integer, Hash)>] SfvbItemChildCreateResponse data, response status code and response headers
12893
+ def insert_sfvb_item_child_with_http_info(storefront_oid, item_child_request, opts = {})
12894
+ if @api_client.config.debugging
12895
+ @api_client.config.logger.debug 'Calling API: SfvbApi.insert_sfvb_item_child ...'
12896
+ end
12897
+ # verify the required parameter 'storefront_oid' is set
12898
+ if @api_client.config.client_side_validation && storefront_oid.nil?
12899
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.insert_sfvb_item_child"
12900
+ end
12901
+ # verify the required parameter 'item_child_request' is set
12902
+ if @api_client.config.client_side_validation && item_child_request.nil?
12903
+ fail ArgumentError, "Missing the required parameter 'item_child_request' when calling SfvbApi.insert_sfvb_item_child"
12904
+ end
12905
+ # resource path
12906
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/children'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
12907
+
12908
+ # query parameters
12909
+ query_params = opts[:query_params] || {}
12910
+
12911
+ # header parameters
12912
+ header_params = opts[:header_params] || {}
12913
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
12914
+ # HTTP header 'Accept' (if needed)
12915
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
12916
+ # HTTP header 'Content-Type'
12917
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
12918
+ if !content_type.nil?
12919
+ header_params['Content-Type'] = content_type
12920
+ end
12921
+
12922
+ # form parameters
12923
+ form_params = opts[:form_params] || {}
12924
+
12925
+ # http body (model)
12926
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_child_request)
12927
+
12928
+ # return_type
12929
+ return_type = opts[:debug_return_type] || 'SfvbItemChildCreateResponse'
12930
+
12931
+ # auth_names
12932
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
12933
+
12934
+ new_options = opts.merge(
12935
+ :operation => :"SfvbApi.insert_sfvb_item_child",
12936
+ :header_params => header_params,
12937
+ :query_params => query_params,
12938
+ :form_params => form_params,
12939
+ :body => post_body,
12940
+ :auth_names => auth_names,
12941
+ :return_type => return_type
12942
+ )
12943
+
12944
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
12945
+ if @api_client.config.debugging
12946
+ @api_client.config.logger.debug "API called: SfvbApi#insert_sfvb_item_child\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
12947
+ end
12948
+ return data, status_code, headers
12949
+ end
12950
+
12661
12951
  # Create a page
12662
12952
  # Creates the page and its folder, the way the store admin's add page does. The parent page must already exist, and the last part of the path may only contain letters, digits, hyphens and underscores - it is refused, not cleaned. A path that already has a page is refused with a 409 and the code sfvb.page_exists. Without a group_template the page inherits its parent's templates, or catalog_group.vm directly under the root. Set attributes and images afterwards with the page attribute and image endpoints, and push the body to the page folder. Always needs sfvb_publish, because the page is live as soon as it exists. Deleting, moving and renaming pages stay in the store admin.
12663
12953
  # @param storefront_oid [Integer]
@@ -16309,6 +16599,97 @@ module UltracartClient
16309
16599
  return data, status_code, headers
16310
16600
  end
16311
16601
 
16602
+ # Change an item's variations
16603
+ # A list of changes applied in order - add_axis, remove_axis, rename_axis, add_option, remove_option, rename_option, reorder_options, set_default, set_default_text, set_option_multimedia and set_combination. Every change is checked before anything is saved, and nothing the list doesn't mention changes. Child items must already exist; create one with POST items/children. Needs sfvb_publish when items are live and If-Match with the hash_sha256 from the read. Removing an axis, removing an option whose combinations sell a child, or re-pointing or clearing a combination shoppers can buy today also needs the approval of the person who signed in the CLI - an approved item.variations request for this item and exactly this list. Adding never does. dry_run returns the planned variations, what each change does, and whether approval is needed.
16604
+ # @param storefront_oid [Integer]
16605
+ # @param if_match [String] hash_sha256 from the variations read. Required; 428 when absent, 412 when stale.
16606
+ # @param item_variations_request [SfvbItemVariationsRequest] The changes
16607
+ # @param [Hash] opts the optional parameters
16608
+ # @option opts [String] :merchant_item_id
16609
+ # @option opts [Integer] :merchant_item_oid
16610
+ # @option opts [String] :approval_id The approval_id of an approved item.variations request for this item and list. Required when the list removes or re-points something shoppers can buy. See POST /sfvb/approvals.
16611
+ # @return [SfvbItemVariationsResponse]
16612
+ def put_sfvb_item_variations(storefront_oid, if_match, item_variations_request, opts = {})
16613
+ data, _status_code, _headers = put_sfvb_item_variations_with_http_info(storefront_oid, if_match, item_variations_request, opts)
16614
+ data
16615
+ end
16616
+
16617
+ # Change an item&#39;s variations
16618
+ # A list of changes applied in order - add_axis, remove_axis, rename_axis, add_option, remove_option, rename_option, reorder_options, set_default, set_default_text, set_option_multimedia and set_combination. Every change is checked before anything is saved, and nothing the list doesn&#39;t mention changes. Child items must already exist; create one with POST items/children. Needs sfvb_publish when items are live and If-Match with the hash_sha256 from the read. Removing an axis, removing an option whose combinations sell a child, or re-pointing or clearing a combination shoppers can buy today also needs the approval of the person who signed in the CLI - an approved item.variations request for this item and exactly this list. Adding never does. dry_run returns the planned variations, what each change does, and whether approval is needed.
16619
+ # @param storefront_oid [Integer]
16620
+ # @param if_match [String] hash_sha256 from the variations read. Required; 428 when absent, 412 when stale.
16621
+ # @param item_variations_request [SfvbItemVariationsRequest] The changes
16622
+ # @param [Hash] opts the optional parameters
16623
+ # @option opts [String] :merchant_item_id
16624
+ # @option opts [Integer] :merchant_item_oid
16625
+ # @option opts [String] :approval_id The approval_id of an approved item.variations request for this item and list. Required when the list removes or re-points something shoppers can buy. See POST /sfvb/approvals.
16626
+ # @return [Array<(SfvbItemVariationsResponse, Integer, Hash)>] SfvbItemVariationsResponse data, response status code and response headers
16627
+ def put_sfvb_item_variations_with_http_info(storefront_oid, if_match, item_variations_request, opts = {})
16628
+ if @api_client.config.debugging
16629
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_item_variations ...'
16630
+ end
16631
+ # verify the required parameter 'storefront_oid' is set
16632
+ if @api_client.config.client_side_validation && storefront_oid.nil?
16633
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_item_variations"
16634
+ end
16635
+ # verify the required parameter 'if_match' is set
16636
+ if @api_client.config.client_side_validation && if_match.nil?
16637
+ fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.put_sfvb_item_variations"
16638
+ end
16639
+ # verify the required parameter 'item_variations_request' is set
16640
+ if @api_client.config.client_side_validation && item_variations_request.nil?
16641
+ fail ArgumentError, "Missing the required parameter 'item_variations_request' when calling SfvbApi.put_sfvb_item_variations"
16642
+ end
16643
+ # resource path
16644
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/variations'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
16645
+
16646
+ # query parameters
16647
+ query_params = opts[:query_params] || {}
16648
+ query_params[:'merchant_item_id'] = opts[:'merchant_item_id'] if !opts[:'merchant_item_id'].nil?
16649
+ query_params[:'merchant_item_oid'] = opts[:'merchant_item_oid'] if !opts[:'merchant_item_oid'].nil?
16650
+
16651
+ # header parameters
16652
+ header_params = opts[:header_params] || {}
16653
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
16654
+ # HTTP header 'Accept' (if needed)
16655
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16656
+ # HTTP header 'Content-Type'
16657
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
16658
+ if !content_type.nil?
16659
+ header_params['Content-Type'] = content_type
16660
+ end
16661
+ header_params[:'If-Match'] = if_match
16662
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
16663
+
16664
+ # form parameters
16665
+ form_params = opts[:form_params] || {}
16666
+
16667
+ # http body (model)
16668
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_variations_request)
16669
+
16670
+ # return_type
16671
+ return_type = opts[:debug_return_type] || 'SfvbItemVariationsResponse'
16672
+
16673
+ # auth_names
16674
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
16675
+
16676
+ new_options = opts.merge(
16677
+ :operation => :"SfvbApi.put_sfvb_item_variations",
16678
+ :header_params => header_params,
16679
+ :query_params => query_params,
16680
+ :form_params => form_params,
16681
+ :body => post_body,
16682
+ :auth_names => auth_names,
16683
+ :return_type => return_type
16684
+ )
16685
+
16686
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
16687
+ if @api_client.config.debugging
16688
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_item_variations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16689
+ end
16690
+ return data, status_code, headers
16691
+ end
16692
+
16312
16693
  # Replace a store menu's entries
16313
16694
  # A whole menu replace, not a merge - what you send is what the menu holds afterwards, so read it, change the tree and send it back. Omitting items changes only the title; sending an empty array empties the menu. Writing a code that does not exist creates it. Every entry is checked before any of it is written, including that a merchant_item_id and a page_path actually resolve, so a tree with one bad entry changes nothing. Always needs sfvb_publish, because a menu is shared by every theme and there is no dormant copy to change instead.
16314
16695
  # @param storefront_oid [Integer]
@@ -20737,6 +21118,84 @@ module UltracartClient
20737
21118
  return data, status_code, headers
20738
21119
  end
20739
21120
 
21121
+ # Move items' default (canonical) pages
21122
+ # Applies the dry run's ready rows with their rows_sha256 under an approved item.default_page request for exactly those rows. Each item's default moves to the named page on this storefront only; every page assignment stays, and nothing else on the item changes. A row whose pages changed since the dry run is skipped as stale, and one failed row doesn't stop the others. Each row is read back; it answers updated with previous_default_path, so the change can be undone, or failed. Needs sfvb_publish when items are live.
21123
+ # @param storefront_oid [Integer]
21124
+ # @param item_default_page_request [SfvbItemDefaultPageRequest] The dry run&#39;s ready rows and rows_sha256
21125
+ # @param [Hash] opts the optional parameters
21126
+ # @option opts [String] :approval_id The approval_id of an approved item.default_page request for exactly these rows. Required. See POST /sfvb/approvals.
21127
+ # @return [SfvbItemDefaultPageResponse]
21128
+ def update_sfvb_item_default_page(storefront_oid, item_default_page_request, opts = {})
21129
+ data, _status_code, _headers = update_sfvb_item_default_page_with_http_info(storefront_oid, item_default_page_request, opts)
21130
+ data
21131
+ end
21132
+
21133
+ # Move items&#39; default (canonical) pages
21134
+ # Applies the dry run&#39;s ready rows with their rows_sha256 under an approved item.default_page request for exactly those rows. Each item&#39;s default moves to the named page on this storefront only; every page assignment stays, and nothing else on the item changes. A row whose pages changed since the dry run is skipped as stale, and one failed row doesn&#39;t stop the others. Each row is read back; it answers updated with previous_default_path, so the change can be undone, or failed. Needs sfvb_publish when items are live.
21135
+ # @param storefront_oid [Integer]
21136
+ # @param item_default_page_request [SfvbItemDefaultPageRequest] The dry run&#39;s ready rows and rows_sha256
21137
+ # @param [Hash] opts the optional parameters
21138
+ # @option opts [String] :approval_id The approval_id of an approved item.default_page request for exactly these rows. Required. See POST /sfvb/approvals.
21139
+ # @return [Array<(SfvbItemDefaultPageResponse, Integer, Hash)>] SfvbItemDefaultPageResponse data, response status code and response headers
21140
+ def update_sfvb_item_default_page_with_http_info(storefront_oid, item_default_page_request, opts = {})
21141
+ if @api_client.config.debugging
21142
+ @api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_item_default_page ...'
21143
+ end
21144
+ # verify the required parameter 'storefront_oid' is set
21145
+ if @api_client.config.client_side_validation && storefront_oid.nil?
21146
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_item_default_page"
21147
+ end
21148
+ # verify the required parameter 'item_default_page_request' is set
21149
+ if @api_client.config.client_side_validation && item_default_page_request.nil?
21150
+ fail ArgumentError, "Missing the required parameter 'item_default_page_request' when calling SfvbApi.update_sfvb_item_default_page"
21151
+ end
21152
+ # resource path
21153
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/items/default_page'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
21154
+
21155
+ # query parameters
21156
+ query_params = opts[:query_params] || {}
21157
+
21158
+ # header parameters
21159
+ header_params = opts[:header_params] || {}
21160
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
21161
+ # HTTP header 'Accept' (if needed)
21162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
21163
+ # HTTP header 'Content-Type'
21164
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
21165
+ if !content_type.nil?
21166
+ header_params['Content-Type'] = content_type
21167
+ end
21168
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
21169
+
21170
+ # form parameters
21171
+ form_params = opts[:form_params] || {}
21172
+
21173
+ # http body (model)
21174
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(item_default_page_request)
21175
+
21176
+ # return_type
21177
+ return_type = opts[:debug_return_type] || 'SfvbItemDefaultPageResponse'
21178
+
21179
+ # auth_names
21180
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
21181
+
21182
+ new_options = opts.merge(
21183
+ :operation => :"SfvbApi.update_sfvb_item_default_page",
21184
+ :header_params => header_params,
21185
+ :query_params => query_params,
21186
+ :form_params => form_params,
21187
+ :body => post_body,
21188
+ :auth_names => auth_names,
21189
+ :return_type => return_type
21190
+ )
21191
+
21192
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
21193
+ if @api_client.config.debugging
21194
+ @api_client.config.logger.debug "API called: SfvbApi#update_sfvb_item_default_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
21195
+ end
21196
+ return data, status_code, headers
21197
+ end
21198
+
20740
21199
  # Update a library entry's draft
20741
21200
  # A full replace of the draft's fields. Owner only. Send the hash_sha256 you read as If-Match. Every save increments revision_number; nothing other merchants see changes until the draft is published. A changed fragment is re-scanned and its images copied again, and screenshot_stale tells you to retake the screenshot.
20742
21201
  # @param storefront_oid [Integer]
@@ -34,12 +34,17 @@ module UltracartClient
34
34
  # For item.attribute_batch, exactly the rows the batch will send - the dry run's change rows, each with merchant_item_oid and current_sha256. UltraCart keeps only their hash.
35
35
  attr_accessor :item_attribute_rows
36
36
 
37
+ # For item.default_page, exactly the rows the apply will send - the dry run's ready rows, each with merchant_item_oid, page_oid and current_sha256. UltraCart keeps only their hash.
38
+ attr_accessor :item_default_page_rows
39
+
37
40
  attr_accessor :item_preorder
38
41
 
39
42
  attr_accessor :item_preorder_children
40
43
 
41
44
  attr_accessor :item_pricing
42
45
 
46
+ attr_accessor :item_variations
47
+
43
48
  attr_accessor :params
44
49
 
45
50
  attr_accessor :postcard_test_mail
@@ -93,9 +98,11 @@ module UltracartClient
93
98
  :'experiment_start' => :'experiment_start',
94
99
  :'flow_backfill' => :'flow_backfill',
95
100
  :'item_attribute_rows' => :'item_attribute_rows',
101
+ :'item_default_page_rows' => :'item_default_page_rows',
96
102
  :'item_preorder' => :'item_preorder',
97
103
  :'item_preorder_children' => :'item_preorder_children',
98
104
  :'item_pricing' => :'item_pricing',
105
+ :'item_variations' => :'item_variations',
99
106
  :'params' => :'params',
100
107
  :'postcard_test_mail' => :'postcard_test_mail',
101
108
  :'reason' => :'reason',
@@ -124,9 +131,11 @@ module UltracartClient
124
131
  :'experiment_start' => :'SfvbExperimentStartRequest',
125
132
  :'flow_backfill' => :'SfvbFlowBackfillRequest',
126
133
  :'item_attribute_rows' => :'Array<SfvbItemAttributeBatchRow>',
134
+ :'item_default_page_rows' => :'Array<SfvbItemDefaultPageRow>',
127
135
  :'item_preorder' => :'SfvbItemPreorderRequest',
128
136
  :'item_preorder_children' => :'SfvbItemPreorderChildrenRequest',
129
137
  :'item_pricing' => :'SfvbItemPricingRequest',
138
+ :'item_variations' => :'SfvbItemVariationsRequest',
130
139
  :'params' => :'SfvbApprovalParams',
131
140
  :'postcard_test_mail' => :'SfvbCommsTestPostcardRequest',
132
141
  :'reason' => :'String',
@@ -194,6 +203,12 @@ module UltracartClient
194
203
  end
195
204
  end
196
205
 
206
+ if attributes.key?(:'item_default_page_rows')
207
+ if (value = attributes[:'item_default_page_rows']).is_a?(Array)
208
+ self.item_default_page_rows = value
209
+ end
210
+ end
211
+
197
212
  if attributes.key?(:'item_preorder')
198
213
  self.item_preorder = attributes[:'item_preorder']
199
214
  end
@@ -206,6 +221,10 @@ module UltracartClient
206
221
  self.item_pricing = attributes[:'item_pricing']
207
222
  end
208
223
 
224
+ if attributes.key?(:'item_variations')
225
+ self.item_variations = attributes[:'item_variations']
226
+ end
227
+
209
228
  if attributes.key?(:'params')
210
229
  self.params = attributes[:'params']
211
230
  end
@@ -255,7 +274,7 @@ module UltracartClient
255
274
  # Check to see if the all the properties in the model are valid
256
275
  # @return true if the model is valid
257
276
  def valid?
258
- action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
277
+ action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
259
278
  return false unless action_validator.valid?(@action)
260
279
  true
261
280
  end
@@ -263,7 +282,7 @@ module UltracartClient
263
282
  # Custom attribute writer method checking allowed values (enum).
264
283
  # @param [Object] action Object to be assigned
265
284
  def action=(action)
266
- validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
285
+ validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "item.preorder", "item.variations", "item.default_page", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_provider.clear", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change", "transactional_email.update", "comms_settings.update", "comms_list.import", "postcard.test_mail", "flow.backfill"])
267
286
  unless validator.valid?(action)
268
287
  fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
269
288
  end
@@ -283,9 +302,11 @@ module UltracartClient
283
302
  experiment_start == o.experiment_start &&
284
303
  flow_backfill == o.flow_backfill &&
285
304
  item_attribute_rows == o.item_attribute_rows &&
305
+ item_default_page_rows == o.item_default_page_rows &&
286
306
  item_preorder == o.item_preorder &&
287
307
  item_preorder_children == o.item_preorder_children &&
288
308
  item_pricing == o.item_pricing &&
309
+ item_variations == o.item_variations &&
289
310
  params == o.params &&
290
311
  postcard_test_mail == o.postcard_test_mail &&
291
312
  reason == o.reason &&
@@ -306,7 +327,7 @@ module UltracartClient
306
327
  # Calculates hash code according to all attributes.
307
328
  # @return [Integer] Hash code
308
329
  def hash
309
- [action, affiliate_network, comms_list_import, comms_settings, content, experiment_start, flow_backfill, item_attribute_rows, item_preorder, item_preorder_children, item_pricing, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
330
+ [action, affiliate_network, comms_list_import, comms_settings, content, experiment_start, flow_backfill, item_attribute_rows, item_default_page_rows, item_preorder, item_preorder_children, item_pricing, item_variations, params, postcard_test_mail, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider, transactional_email].hash
310
331
  end
311
332
 
312
333
  # Builds the object from hash