=begin
#Square Connect API

OpenAPI spec version: 2.0
Contact: developers@squareup.com
Generated by: https://github.com/swagger-api/swagger-codegen.git

=end

require "uri"

module SquareConnect
  class V1ItemsApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end

    # Adjusts an item variation's current available inventory.
    # Adjusts an item variation's current available inventory.
    # @param location_id The ID of the item&#39;s associated location.
    # @param variation_id The ID of the variation to adjust inventory information for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1InventoryEntry]
    def adjust_inventory(location_id, variation_id, body, opts = {})
      data, _status_code, _headers = adjust_inventory_with_http_info(location_id, variation_id, body, opts)
      return data
    end

    # Adjusts an item variation&#39;s current available inventory.
    # Adjusts an item variation&#39;s current available inventory.
    # @param location_id The ID of the item&#39;s associated location.
    # @param variation_id The ID of the variation to adjust inventory information for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1InventoryEntry, Fixnum, Hash)>] V1InventoryEntry data, response status code and response headers
    def adjust_inventory_with_http_info(location_id, variation_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.adjust_inventory ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.adjust_inventory" if location_id.nil?
      # verify the required parameter 'variation_id' is set
      fail ArgumentError, "Missing the required parameter 'variation_id' when calling V1ItemsApi.adjust_inventory" if variation_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.adjust_inventory" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/inventory/{variation_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'variation_id' + '}', variation_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1InventoryEntry')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#adjust_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
    # Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
    # @param location_id The ID of the fee&#39;s associated location.
    # @param item_id The ID of the item to add the fee to.
    # @param fee_id The ID of the fee to apply.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def apply_fee(location_id, item_id, fee_id, opts = {})
      data, _status_code, _headers = apply_fee_with_http_info(location_id, item_id, fee_id, opts)
      return data
    end

    # Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
    # Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.
    # @param location_id The ID of the fee&#39;s associated location.
    # @param item_id The ID of the item to add the fee to.
    # @param fee_id The ID of the fee to apply.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def apply_fee_with_http_info(location_id, item_id, fee_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.apply_fee ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.apply_fee" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.apply_fee" if item_id.nil?
      # verify the required parameter 'fee_id' is set
      fail ArgumentError, "Missing the required parameter 'fee_id' when calling V1ItemsApi.apply_fee" if fee_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/fees/{fee_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s).sub('{' + 'fee_id' + '}', fee_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#apply_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
    # Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to apply.
    # @param item_id The ID of the item to add the modifier list to.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def apply_modifier_list(location_id, modifier_list_id, item_id, opts = {})
      data, _status_code, _headers = apply_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts)
      return data
    end

    # Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
    # Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to apply.
    # @param item_id The ID of the item to add the modifier list to.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def apply_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.apply_modifier_list ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.apply_modifier_list" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.apply_modifier_list" if modifier_list_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.apply_modifier_list" if item_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#apply_modifier_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates an item category.
    # Creates an item category.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Category]
    def create_category(location_id, body, opts = {})
      data, _status_code, _headers = create_category_with_http_info(location_id, body, opts)
      return data
    end

    # Creates an item category.
    # Creates an item category.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Category, Fixnum, Hash)>] V1Category data, response status code and response headers
    def create_category_with_http_info(location_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_category ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_category" if location_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_category" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/categories".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Category')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates a discount.
    # Creates a discount.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Discount]
    def create_discount(location_id, body, opts = {})
      data, _status_code, _headers = create_discount_with_http_info(location_id, body, opts)
      return data
    end

    # Creates a discount.
    # Creates a discount.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Discount, Fixnum, Hash)>] V1Discount data, response status code and response headers
    def create_discount_with_http_info(location_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_discount ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_discount" if location_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_discount" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/discounts".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Discount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates a fee (tax).
    # Creates a fee (tax).
    # @param location_id The ID of the location to create a fee for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Fee]
    def create_fee(location_id, body, opts = {})
      data, _status_code, _headers = create_fee_with_http_info(location_id, body, opts)
      return data
    end

    # Creates a fee (tax).
    # Creates a fee (tax).
    # @param location_id The ID of the location to create a fee for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Fee, Fixnum, Hash)>] V1Fee data, response status code and response headers
    def create_fee_with_http_info(location_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_fee ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_fee" if location_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_fee" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/fees".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Fee')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates an item and at least one variation for it.
    # Creates an item and at least one variation for it.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def create_item(location_id, body, opts = {})
      data, _status_code, _headers = create_item_with_http_info(location_id, body, opts)
      return data
    end

    # Creates an item and at least one variation for it.
    # Creates an item and at least one variation for it.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def create_item_with_http_info(location_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_item ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_item" if location_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_item" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates an item modifier list and at least one modifier option for it.
    # Creates an item modifier list and at least one modifier option for it.
    # @param location_id The ID of the location to create a modifier list for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierList]
    def create_modifier_list(location_id, body, opts = {})
      data, _status_code, _headers = create_modifier_list_with_http_info(location_id, body, opts)
      return data
    end

    # Creates an item modifier list and at least one modifier option for it.
    # Creates an item modifier list and at least one modifier option for it.
    # @param location_id The ID of the location to create a modifier list for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierList, Fixnum, Hash)>] V1ModifierList data, response status code and response headers
    def create_modifier_list_with_http_info(location_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_modifier_list ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_modifier_list" if location_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_modifier_list" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierList')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_modifier_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates an item modifier option and adds it to a modifier list.
    # Creates an item modifier option and adds it to a modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierOption]
    def create_modifier_option(location_id, modifier_list_id, body, opts = {})
      data, _status_code, _headers = create_modifier_option_with_http_info(location_id, modifier_list_id, body, opts)
      return data
    end

    # Creates an item modifier option and adds it to a modifier list.
    # Creates an item modifier option and adds it to a modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierOption, Fixnum, Hash)>] V1ModifierOption data, response status code and response headers
    def create_modifier_option_with_http_info(location_id, modifier_list_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_modifier_option ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_modifier_option" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.create_modifier_option" if modifier_list_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_modifier_option" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierOption')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_modifier_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates a Favorites page in Square Register.
    # Creates a Favorites page in Square Register.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Page]
    def create_page(location_id, body, opts = {})
      data, _status_code, _headers = create_page_with_http_info(location_id, body, opts)
      return data
    end

    # Creates a Favorites page in Square Register.
    # Creates a Favorites page in Square Register.
    # @param location_id The ID of the location to create an item for.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Page, Fixnum, Hash)>] V1Page data, response status code and response headers
    def create_page_with_http_info(location_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_page ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_page" if location_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_page" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/pages".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Page')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Creates an item variation for an existing item.
    # Creates an item variation for an existing item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The item&#39;s ID.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Variation]
    def create_variation(location_id, item_id, body, opts = {})
      data, _status_code, _headers = create_variation_with_http_info(location_id, item_id, body, opts)
      return data
    end

    # Creates an item variation for an existing item.
    # Creates an item variation for an existing item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The item&#39;s ID.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Variation, Fixnum, Hash)>] V1Variation data, response status code and response headers
    def create_variation_with_http_info(location_id, item_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.create_variation ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.create_variation" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.create_variation" if item_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.create_variation" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/variations".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:POST, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Variation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#create_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing item category.
    # Deletes an existing item category.
    # @param location_id The ID of the item&#39;s associated location.
    # @param category_id The ID of the category to delete.
    # @param [Hash] opts the optional parameters
    # @return [V1Category]
    def delete_category(location_id, category_id, opts = {})
      data, _status_code, _headers = delete_category_with_http_info(location_id, category_id, opts)
      return data
    end

    # Deletes an existing item category.
    # Deletes an existing item category.
    # @param location_id The ID of the item&#39;s associated location.
    # @param category_id The ID of the category to delete.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Category, Fixnum, Hash)>] V1Category data, response status code and response headers
    def delete_category_with_http_info(location_id, category_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_category ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_category" if location_id.nil?
      # verify the required parameter 'category_id' is set
      fail ArgumentError, "Missing the required parameter 'category_id' when calling V1ItemsApi.delete_category" if category_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/categories/{category_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'category_id' + '}', category_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Category')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing discount.
    # Deletes an existing discount.
    # @param location_id The ID of the item&#39;s associated location.
    # @param discount_id The ID of the discount to delete.
    # @param [Hash] opts the optional parameters
    # @return [V1Discount]
    def delete_discount(location_id, discount_id, opts = {})
      data, _status_code, _headers = delete_discount_with_http_info(location_id, discount_id, opts)
      return data
    end

    # Deletes an existing discount.
    # Deletes an existing discount.
    # @param location_id The ID of the item&#39;s associated location.
    # @param discount_id The ID of the discount to delete.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Discount, Fixnum, Hash)>] V1Discount data, response status code and response headers
    def delete_discount_with_http_info(location_id, discount_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_discount ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_discount" if location_id.nil?
      # verify the required parameter 'discount_id' is set
      fail ArgumentError, "Missing the required parameter 'discount_id' when calling V1ItemsApi.delete_discount" if discount_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/discounts/{discount_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'discount_id' + '}', discount_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Discount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing fee (tax).
    # Deletes an existing fee (tax).
    # @param location_id The ID of the fee&#39;s associated location.
    # @param fee_id The ID of the fee to delete.
    # @param [Hash] opts the optional parameters
    # @return [V1Fee]
    def delete_fee(location_id, fee_id, opts = {})
      data, _status_code, _headers = delete_fee_with_http_info(location_id, fee_id, opts)
      return data
    end

    # Deletes an existing fee (tax).
    # Deletes an existing fee (tax).
    # @param location_id The ID of the fee&#39;s associated location.
    # @param fee_id The ID of the fee to delete.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Fee, Fixnum, Hash)>] V1Fee data, response status code and response headers
    def delete_fee_with_http_info(location_id, fee_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_fee ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_fee" if location_id.nil?
      # verify the required parameter 'fee_id' is set
      fail ArgumentError, "Missing the required parameter 'fee_id' when calling V1ItemsApi.delete_fee" if fee_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/fees/{fee_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'fee_id' + '}', fee_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Fee')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing item and all item variations associated with it.
    # Deletes an existing item and all item variations associated with it.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to modify.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def delete_item(location_id, item_id, opts = {})
      data, _status_code, _headers = delete_item_with_http_info(location_id, item_id, opts)
      return data
    end

    # Deletes an existing item and all item variations associated with it.
    # Deletes an existing item and all item variations associated with it.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to modify.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def delete_item_with_http_info(location_id, item_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_item ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_item" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.delete_item" if item_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing item modifier list and all modifier options associated with it.
    # Deletes an existing item modifier list and all modifier options associated with it.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to delete.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierList]
    def delete_modifier_list(location_id, modifier_list_id, opts = {})
      data, _status_code, _headers = delete_modifier_list_with_http_info(location_id, modifier_list_id, opts)
      return data
    end

    # Deletes an existing item modifier list and all modifier options associated with it.
    # Deletes an existing item modifier list and all modifier options associated with it.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to delete.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierList, Fixnum, Hash)>] V1ModifierList data, response status code and response headers
    def delete_modifier_list_with_http_info(location_id, modifier_list_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_modifier_list ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_modifier_list" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.delete_modifier_list" if modifier_list_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists/{modifier_list_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierList')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_modifier_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing item modifier option from a modifier list.
    # Deletes an existing item modifier option from a modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to delete.
    # @param modifier_option_id The ID of the modifier list to edit.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierOption]
    def delete_modifier_option(location_id, modifier_list_id, modifier_option_id, opts = {})
      data, _status_code, _headers = delete_modifier_option_with_http_info(location_id, modifier_list_id, modifier_option_id, opts)
      return data
    end

    # Deletes an existing item modifier option from a modifier list.
    # Deletes an existing item modifier option from a modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to delete.
    # @param modifier_option_id The ID of the modifier list to edit.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierOption, Fixnum, Hash)>] V1ModifierOption data, response status code and response headers
    def delete_modifier_option_with_http_info(location_id, modifier_list_id, modifier_option_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_modifier_option ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_modifier_option" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.delete_modifier_option" if modifier_list_id.nil?
      # verify the required parameter 'modifier_option_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_option_id' when calling V1ItemsApi.delete_modifier_option" if modifier_option_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s).sub('{' + 'modifier_option_id' + '}', modifier_option_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierOption')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_modifier_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing Favorites page and all of its cells.
    # Deletes an existing Favorites page and all of its cells.
    # @param location_id The ID of the Favorites page&#39;s associated location.
    # @param page_id The ID of the page to delete.
    # @param [Hash] opts the optional parameters
    # @return [V1Page]
    def delete_page(location_id, page_id, opts = {})
      data, _status_code, _headers = delete_page_with_http_info(location_id, page_id, opts)
      return data
    end

    # Deletes an existing Favorites page and all of its cells.
    # Deletes an existing Favorites page and all of its cells.
    # @param location_id The ID of the Favorites page&#39;s associated location.
    # @param page_id The ID of the page to delete.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Page, Fixnum, Hash)>] V1Page data, response status code and response headers
    def delete_page_with_http_info(location_id, page_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_page ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_page" if location_id.nil?
      # verify the required parameter 'page_id' is set
      fail ArgumentError, "Missing the required parameter 'page_id' when calling V1ItemsApi.delete_page" if page_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/pages/{page_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'page_id' + '}', page_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Page')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes a cell from a Favorites page in Square Register.
    # Deletes a cell from a Favorites page in Square Register.
    # @param location_id The ID of the Favorites page&#39;s associated location.
    # @param page_id The ID of the page to delete.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :row The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row.
    # @option opts [String] :column The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column.
    # @return [V1Page]
    def delete_page_cell(location_id, page_id, opts = {})
      data, _status_code, _headers = delete_page_cell_with_http_info(location_id, page_id, opts)
      return data
    end

    # Deletes a cell from a Favorites page in Square Register.
    # Deletes a cell from a Favorites page in Square Register.
    # @param location_id The ID of the Favorites page&#39;s associated location.
    # @param page_id The ID of the page to delete.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :row The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row.
    # @option opts [String] :column The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column.
    # @return [Array<(V1Page, Fixnum, Hash)>] V1Page data, response status code and response headers
    def delete_page_cell_with_http_info(location_id, page_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_page_cell ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_page_cell" if location_id.nil?
      # verify the required parameter 'page_id' is set
      fail ArgumentError, "Missing the required parameter 'page_id' when calling V1ItemsApi.delete_page_cell" if page_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/pages/{page_id}/cells".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'page_id' + '}', page_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'row'] = opts[:'row'] if !opts[:'row'].nil?
      query_params[:'column'] = opts[:'column'] if !opts[:'column'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Page')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_page_cell\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Deletes an existing item variation from an item.
    # Deletes an existing item variation from an item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to delete.
    # @param variation_id The ID of the variation to delete.
    # @param [Hash] opts the optional parameters
    # @return [V1Variation]
    def delete_variation(location_id, item_id, variation_id, opts = {})
      data, _status_code, _headers = delete_variation_with_http_info(location_id, item_id, variation_id, opts)
      return data
    end

    # Deletes an existing item variation from an item.
    # Deletes an existing item variation from an item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to delete.
    # @param variation_id The ID of the variation to delete.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Variation, Fixnum, Hash)>] V1Variation data, response status code and response headers
    def delete_variation_with_http_info(location_id, item_id, variation_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.delete_variation ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.delete_variation" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.delete_variation" if item_id.nil?
      # verify the required parameter 'variation_id' is set
      fail ArgumentError, "Missing the required parameter 'variation_id' when calling V1ItemsApi.delete_variation" if variation_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/variations/{variation_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s).sub('{' + 'variation_id' + '}', variation_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Variation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#delete_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Lists all of a location's item categories.
    # Lists all of a location's item categories.
    # @param location_id The ID of the location to list categories for.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Category>]
    def list_categories(location_id, opts = {})
      data, _status_code, _headers = list_categories_with_http_info(location_id, opts)
      return data
    end

    # Lists all of a location&#39;s item categories.
    # Lists all of a location&#39;s item categories.
    # @param location_id The ID of the location to list categories for.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Category>, Fixnum, Hash)>] Array<V1Category> data, response status code and response headers
    def list_categories_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_categories ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_categories" if location_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/categories".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1Category>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Lists all of a location's discounts.
    # Lists all of a location's discounts.
    # @param location_id The ID of the location to list categories for.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Discount>]
    def list_discounts(location_id, opts = {})
      data, _status_code, _headers = list_discounts_with_http_info(location_id, opts)
      return data
    end

    # Lists all of a location&#39;s discounts.
    # Lists all of a location&#39;s discounts.
    # @param location_id The ID of the location to list categories for.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Discount>, Fixnum, Hash)>] Array<V1Discount> data, response status code and response headers
    def list_discounts_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_discounts ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_discounts" if location_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/discounts".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1Discount>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_discounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Lists all of a location's fees (taxes).
    # Lists all of a location's fees (taxes).
    # @param location_id The ID of the location to list fees for.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Fee>]
    def list_fees(location_id, opts = {})
      data, _status_code, _headers = list_fees_with_http_info(location_id, opts)
      return data
    end

    # Lists all of a location&#39;s fees (taxes).
    # Lists all of a location&#39;s fees (taxes).
    # @param location_id The ID of the location to list fees for.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Fee>, Fixnum, Hash)>] Array<V1Fee> data, response status code and response headers
    def list_fees_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_fees ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_fees" if location_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/fees".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1Fee>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_fees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Provides inventory information for all of a merchant's inventory-enabled item variations.
    # Provides inventory information for all of a merchant's inventory-enabled item variations.
    # @param location_id The ID of the item&#39;s associated location.
    # @param [Hash] opts the optional parameters
    # @option opts [Integer] :limit The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
    # @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
    # @return [Array<V1InventoryEntry>]
    def list_inventory(location_id, opts = {})
      data, _status_code, _headers = list_inventory_with_http_info(location_id, opts)
      return data
    end

    # Provides inventory information for all of a merchant&#39;s inventory-enabled item variations.
    # Provides inventory information for all of a merchant&#39;s inventory-enabled item variations.
    # @param location_id The ID of the item&#39;s associated location.
    # @param [Hash] opts the optional parameters
    # @option opts [Integer] :limit The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
    # @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
    # @return [Array<(Array<V1InventoryEntry>, Fixnum, Hash)>] Array<V1InventoryEntry> data, response status code and response headers
    def list_inventory_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_inventory ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_inventory" if location_id.nil?
      if !opts[:'limit'].nil? && opts[:'limit'] > 1000
        fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1ItemsApi.list_inventory, must be smaller than or equal to 1000.'
      end

      # resource path
      local_var_path = "/v1/{location_id}/inventory".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
      query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1InventoryEntry>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_inventory\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Provides summary information for all of a location's items.
    # Provides summary information for all of a location's items.
    # @param location_id The ID of the location to list items for.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
    # @return [Array<V1Item>]
    def list_items(location_id, opts = {})
      data, _status_code, _headers = list_items_with_http_info(location_id, opts)
      return data
    end

    # Provides summary information for all of a location&#39;s items.
    # Provides summary information for all of a location&#39;s items.
    # @param location_id The ID of the location to list items for.
    # @param [Hash] opts the optional parameters
    # @option opts [String] :batch_token A pagination cursor to retrieve the next set of results for your original query to the endpoint.
    # @return [Array<(Array<V1Item>, Fixnum, Hash)>] Array<V1Item> data, response status code and response headers
    def list_items_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_items ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_items" if location_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}
      query_params[:'batch_token'] = opts[:'batch_token'] if !opts[:'batch_token'].nil?

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1Item>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Lists all of a location's modifier lists.
    # Lists all of a location's modifier lists.
    # @param location_id The ID of the location to list modifier lists for.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1ModifierList>]
    def list_modifier_lists(location_id, opts = {})
      data, _status_code, _headers = list_modifier_lists_with_http_info(location_id, opts)
      return data
    end

    # Lists all of a location&#39;s modifier lists.
    # Lists all of a location&#39;s modifier lists.
    # @param location_id The ID of the location to list modifier lists for.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1ModifierList>, Fixnum, Hash)>] Array<V1ModifierList> data, response status code and response headers
    def list_modifier_lists_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_modifier_lists ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_modifier_lists" if location_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1ModifierList>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_modifier_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Lists all of a location's Favorites pages in Square Register.
    # Lists all of a location's Favorites pages in Square Register.
    # @param location_id The ID of the location to list Favorites pages for.
    # @param [Hash] opts the optional parameters
    # @return [Array<V1Page>]
    def list_pages(location_id, opts = {})
      data, _status_code, _headers = list_pages_with_http_info(location_id, opts)
      return data
    end

    # Lists all of a location&#39;s Favorites pages in Square Register.
    # Lists all of a location&#39;s Favorites pages in Square Register.
    # @param location_id The ID of the location to list Favorites pages for.
    # @param [Hash] opts the optional parameters
    # @return [Array<(Array<V1Page>, Fixnum, Hash)>] Array<V1Page> data, response status code and response headers
    def list_pages_with_http_info(location_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.list_pages ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.list_pages" if location_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/pages".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'Array<V1Page>')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#list_pages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
    # Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
    # @param location_id The ID of the fee&#39;s associated location.
    # @param item_id The ID of the item to add the fee to.
    # @param fee_id The ID of the fee to apply.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def remove_fee(location_id, item_id, fee_id, opts = {})
      data, _status_code, _headers = remove_fee_with_http_info(location_id, item_id, fee_id, opts)
      return data
    end

    # Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
    # Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.
    # @param location_id The ID of the fee&#39;s associated location.
    # @param item_id The ID of the item to add the fee to.
    # @param fee_id The ID of the fee to apply.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def remove_fee_with_http_info(location_id, item_id, fee_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.remove_fee ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.remove_fee" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.remove_fee" if item_id.nil?
      # verify the required parameter 'fee_id' is set
      fail ArgumentError, "Missing the required parameter 'fee_id' when calling V1ItemsApi.remove_fee" if fee_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/fees/{fee_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s).sub('{' + 'fee_id' + '}', fee_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#remove_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
    # Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to remove.
    # @param item_id The ID of the item to remove the modifier list from.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def remove_modifier_list(location_id, modifier_list_id, item_id, opts = {})
      data, _status_code, _headers = remove_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts)
      return data
    end

    # Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
    # Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to remove.
    # @param item_id The ID of the item to remove the modifier list from.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def remove_modifier_list_with_http_info(location_id, modifier_list_id, item_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.remove_modifier_list ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.remove_modifier_list" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.remove_modifier_list" if modifier_list_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.remove_modifier_list" if item_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#remove_modifier_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Provides the details for a single item, including associated modifier lists and fees.
    # Provides the details for a single item, including associated modifier lists and fees.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The item&#39;s ID.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def retrieve_item(location_id, item_id, opts = {})
      data, _status_code, _headers = retrieve_item_with_http_info(location_id, item_id, opts)
      return data
    end

    # Provides the details for a single item, including associated modifier lists and fees.
    # Provides the details for a single item, including associated modifier lists and fees.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The item&#39;s ID.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def retrieve_item_with_http_info(location_id, item_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.retrieve_item ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.retrieve_item" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.retrieve_item" if item_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#retrieve_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Provides the details for a single modifier list.
    # Provides the details for a single modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The modifier list&#39;s ID.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierList]
    def retrieve_modifier_list(location_id, modifier_list_id, opts = {})
      data, _status_code, _headers = retrieve_modifier_list_with_http_info(location_id, modifier_list_id, opts)
      return data
    end

    # Provides the details for a single modifier list.
    # Provides the details for a single modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The modifier list&#39;s ID.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierList, Fixnum, Hash)>] V1ModifierList data, response status code and response headers
    def retrieve_modifier_list_with_http_info(location_id, modifier_list_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.retrieve_modifier_list ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.retrieve_modifier_list" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.retrieve_modifier_list" if modifier_list_id.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists/{modifier_list_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierList')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#retrieve_modifier_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of an existing item category.
    # Modifies the details of an existing item category.
    # @param location_id The ID of the category&#39;s associated location.
    # @param category_id The ID of the category to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Category]
    def update_category(location_id, category_id, body, opts = {})
      data, _status_code, _headers = update_category_with_http_info(location_id, category_id, body, opts)
      return data
    end

    # Modifies the details of an existing item category.
    # Modifies the details of an existing item category.
    # @param location_id The ID of the category&#39;s associated location.
    # @param category_id The ID of the category to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Category, Fixnum, Hash)>] V1Category data, response status code and response headers
    def update_category_with_http_info(location_id, category_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_category ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_category" if location_id.nil?
      # verify the required parameter 'category_id' is set
      fail ArgumentError, "Missing the required parameter 'category_id' when calling V1ItemsApi.update_category" if category_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_category" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/categories/{category_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'category_id' + '}', category_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Category')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of an existing discount.
    # Modifies the details of an existing discount.
    # @param location_id The ID of the category&#39;s associated location.
    # @param discount_id The ID of the discount to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Discount]
    def update_discount(location_id, discount_id, body, opts = {})
      data, _status_code, _headers = update_discount_with_http_info(location_id, discount_id, body, opts)
      return data
    end

    # Modifies the details of an existing discount.
    # Modifies the details of an existing discount.
    # @param location_id The ID of the category&#39;s associated location.
    # @param discount_id The ID of the discount to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Discount, Fixnum, Hash)>] V1Discount data, response status code and response headers
    def update_discount_with_http_info(location_id, discount_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_discount ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_discount" if location_id.nil?
      # verify the required parameter 'discount_id' is set
      fail ArgumentError, "Missing the required parameter 'discount_id' when calling V1ItemsApi.update_discount" if discount_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_discount" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/discounts/{discount_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'discount_id' + '}', discount_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Discount')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_discount\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of an existing fee (tax).
    # Modifies the details of an existing fee (tax).
    # @param location_id The ID of the fee&#39;s associated location.
    # @param fee_id The ID of the fee to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Fee]
    def update_fee(location_id, fee_id, body, opts = {})
      data, _status_code, _headers = update_fee_with_http_info(location_id, fee_id, body, opts)
      return data
    end

    # Modifies the details of an existing fee (tax).
    # Modifies the details of an existing fee (tax).
    # @param location_id The ID of the fee&#39;s associated location.
    # @param fee_id The ID of the fee to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Fee, Fixnum, Hash)>] V1Fee data, response status code and response headers
    def update_fee_with_http_info(location_id, fee_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_fee ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_fee" if location_id.nil?
      # verify the required parameter 'fee_id' is set
      fail ArgumentError, "Missing the required parameter 'fee_id' when calling V1ItemsApi.update_fee" if fee_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_fee" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/fees/{fee_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'fee_id' + '}', fee_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Fee')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_fee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the core details of an existing item.
    # Modifies the core details of an existing item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to modify.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Item]
    def update_item(location_id, item_id, body, opts = {})
      data, _status_code, _headers = update_item_with_http_info(location_id, item_id, body, opts)
      return data
    end

    # Modifies the core details of an existing item.
    # Modifies the core details of an existing item.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to modify.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Item, Fixnum, Hash)>] V1Item data, response status code and response headers
    def update_item_with_http_info(location_id, item_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_item ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_item" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.update_item" if item_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_item" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Item')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of an existing item modifier list.
    # Modifies the details of an existing item modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierList]
    def update_modifier_list(location_id, modifier_list_id, body, opts = {})
      data, _status_code, _headers = update_modifier_list_with_http_info(location_id, modifier_list_id, body, opts)
      return data
    end

    # Modifies the details of an existing item modifier list.
    # Modifies the details of an existing item modifier list.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierList, Fixnum, Hash)>] V1ModifierList data, response status code and response headers
    def update_modifier_list_with_http_info(location_id, modifier_list_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_modifier_list ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_modifier_list" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.update_modifier_list" if modifier_list_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_modifier_list" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists/{modifier_list_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierList')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_modifier_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of an existing item modifier option.
    # Modifies the details of an existing item modifier option.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to edit.
    # @param modifier_option_id The ID of the modifier list to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1ModifierOption]
    def update_modifier_option(location_id, modifier_list_id, modifier_option_id, body, opts = {})
      data, _status_code, _headers = update_modifier_option_with_http_info(location_id, modifier_list_id, modifier_option_id, body, opts)
      return data
    end

    # Modifies the details of an existing item modifier option.
    # Modifies the details of an existing item modifier option.
    # @param location_id The ID of the item&#39;s associated location.
    # @param modifier_list_id The ID of the modifier list to edit.
    # @param modifier_option_id The ID of the modifier list to edit.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1ModifierOption, Fixnum, Hash)>] V1ModifierOption data, response status code and response headers
    def update_modifier_option_with_http_info(location_id, modifier_list_id, modifier_option_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_modifier_option ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_modifier_option" if location_id.nil?
      # verify the required parameter 'modifier_list_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_list_id' when calling V1ItemsApi.update_modifier_option" if modifier_list_id.nil?
      # verify the required parameter 'modifier_option_id' is set
      fail ArgumentError, "Missing the required parameter 'modifier_option_id' when calling V1ItemsApi.update_modifier_option" if modifier_option_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_modifier_option" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'modifier_list_id' + '}', modifier_list_id.to_s).sub('{' + 'modifier_option_id' + '}', modifier_option_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1ModifierOption')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_modifier_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of a Favorites page in Square Register.
    # Modifies the details of a Favorites page in Square Register.
    # @param location_id The ID of the Favorites page&#39;s associated location
    # @param page_id The ID of the page to modify.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Page]
    def update_page(location_id, page_id, body, opts = {})
      data, _status_code, _headers = update_page_with_http_info(location_id, page_id, body, opts)
      return data
    end

    # Modifies the details of a Favorites page in Square Register.
    # Modifies the details of a Favorites page in Square Register.
    # @param location_id The ID of the Favorites page&#39;s associated location
    # @param page_id The ID of the page to modify.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Page, Fixnum, Hash)>] V1Page data, response status code and response headers
    def update_page_with_http_info(location_id, page_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_page ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_page" if location_id.nil?
      # verify the required parameter 'page_id' is set
      fail ArgumentError, "Missing the required parameter 'page_id' when calling V1ItemsApi.update_page" if page_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_page" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/pages/{page_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'page_id' + '}', page_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Page')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies a cell of a Favorites page in Square Register.
    # Modifies a cell of a Favorites page in Square Register.
    # @param location_id The ID of the Favorites page&#39;s associated location.
    # @param page_id The ID of the page the cell belongs to.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Page]
    def update_page_cell(location_id, page_id, body, opts = {})
      data, _status_code, _headers = update_page_cell_with_http_info(location_id, page_id, body, opts)
      return data
    end

    # Modifies a cell of a Favorites page in Square Register.
    # Modifies a cell of a Favorites page in Square Register.
    # @param location_id The ID of the Favorites page&#39;s associated location.
    # @param page_id The ID of the page the cell belongs to.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Page, Fixnum, Hash)>] V1Page data, response status code and response headers
    def update_page_cell_with_http_info(location_id, page_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_page_cell ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_page_cell" if location_id.nil?
      # verify the required parameter 'page_id' is set
      fail ArgumentError, "Missing the required parameter 'page_id' when calling V1ItemsApi.update_page_cell" if page_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_page_cell" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/pages/{page_id}/cells".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'page_id' + '}', page_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Page')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_page_cell\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end

    # Modifies the details of an existing item variation.
    # Modifies the details of an existing item variation.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to modify.
    # @param variation_id The ID of the variation to modify.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [V1Variation]
    def update_variation(location_id, item_id, variation_id, body, opts = {})
      data, _status_code, _headers = update_variation_with_http_info(location_id, item_id, variation_id, body, opts)
      return data
    end

    # Modifies the details of an existing item variation.
    # Modifies the details of an existing item variation.
    # @param location_id The ID of the item&#39;s associated location.
    # @param item_id The ID of the item to modify.
    # @param variation_id The ID of the variation to modify.
    # @param body An object containing the fields to POST for the request.  See the corresponding object definition for field details.
    # @param [Hash] opts the optional parameters
    # @return [Array<(V1Variation, Fixnum, Hash)>] V1Variation data, response status code and response headers
    def update_variation_with_http_info(location_id, item_id, variation_id, body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug "Calling API: V1ItemsApi.update_variation ..."
      end
      # verify the required parameter 'location_id' is set
      fail ArgumentError, "Missing the required parameter 'location_id' when calling V1ItemsApi.update_variation" if location_id.nil?
      # verify the required parameter 'item_id' is set
      fail ArgumentError, "Missing the required parameter 'item_id' when calling V1ItemsApi.update_variation" if item_id.nil?
      # verify the required parameter 'variation_id' is set
      fail ArgumentError, "Missing the required parameter 'variation_id' when calling V1ItemsApi.update_variation" if variation_id.nil?
      # verify the required parameter 'body' is set
      fail ArgumentError, "Missing the required parameter 'body' when calling V1ItemsApi.update_variation" if body.nil?
      # resource path
      local_var_path = "/v1/{location_id}/items/{item_id}/variations/{variation_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'item_id' + '}', item_id.to_s).sub('{' + 'variation_id' + '}', variation_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(body)
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'V1Variation')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: V1ItemsApi#update_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
