# coding: utf-8

"""
Copyright 2017 Square, Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""


from __future__ import absolute_import

import sys
import os
import re

# python 2 and python 3 compatibility library
from six import iteritems

from ..api_client import ApiClient


class V1ItemsApi(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def adjust_inventory(self, location_id, variation_id, body, **kwargs):
        """
        AdjustInventory
        Adjusts an item variation's current available inventory.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.adjust_inventory(location_id, variation_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str variation_id: The ID of the variation to adjust inventory information for. (required)
        :param V1AdjustInventoryRequest body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1InventoryEntry
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'variation_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method adjust_inventory" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `adjust_inventory`")
        # verify the required parameter 'variation_id' is set
        if ('variation_id' not in params) or (params['variation_id'] is None):
            raise ValueError("Missing the required parameter `variation_id` when calling `adjust_inventory`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `adjust_inventory`")


        resource_path = '/v1/{location_id}/inventory/{variation_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'variation_id' in params:
            path_params['variation_id'] = params['variation_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1InventoryEntry',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def apply_fee(self, location_id, item_id, fee_id, **kwargs):
        """
        ApplyFee
        Associates a fee with an item, meaning the fee is automatically applied to the item in Square Register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.apply_fee(location_id, item_id, fee_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the fee's associated location. (required)
        :param str item_id: The ID of the item to add the fee to. (required)
        :param str fee_id: The ID of the fee to apply. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id', 'fee_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method apply_fee" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `apply_fee`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `apply_fee`")
        # verify the required parameter 'fee_id' is set
        if ('fee_id' not in params) or (params['fee_id'] is None):
            raise ValueError("Missing the required parameter `fee_id` when calling `apply_fee`")


        resource_path = '/v1/{location_id}/items/{item_id}/fees/{fee_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']
        if 'fee_id' in params:
            path_params['fee_id'] = params['fee_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def apply_modifier_list(self, location_id, modifier_list_id, item_id, **kwargs):
        """
        ApplyModifierList
        Associates a modifier list with an item, meaning modifier options from the list can be applied to the item.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.apply_modifier_list(location_id, modifier_list_id, item_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to apply. (required)
        :param str item_id: The ID of the item to add the modifier list to. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id', 'item_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method apply_modifier_list" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `apply_modifier_list`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `apply_modifier_list`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `apply_modifier_list`")


        resource_path = '/v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_category(self, location_id, body, **kwargs):
        """
        CreateCategory
        Creates an item category.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_category(location_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to create an item for. (required)
        :param V1Category body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Category
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_category" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_category`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_category`")


        resource_path = '/v1/{location_id}/categories'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Category',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_discount(self, location_id, body, **kwargs):
        """
        CreateDiscount
        Creates a discount.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_discount(location_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to create an item for. (required)
        :param V1Discount body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Discount
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_discount" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_discount`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_discount`")


        resource_path = '/v1/{location_id}/discounts'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Discount',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_fee(self, location_id, body, **kwargs):
        """
        CreateFee
        Creates a fee (tax).

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_fee(location_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to create a fee for. (required)
        :param V1Fee body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Fee
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_fee" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_fee`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_fee`")


        resource_path = '/v1/{location_id}/fees'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Fee',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_item(self, location_id, body, **kwargs):
        """
        CreateItem
        Creates an item and at least one variation for it. Item-related entities include fields you can use to associate them with entities in a non-Square system.  When you create an item-related entity, you can optionally specify its `id`. This value must be unique among all IDs ever specified for the account, including those specified by other applications. You can never reuse an entity ID. If you do not specify an ID, Square generates one for the entity.  Item variations have a `user_data` string that lets you associate arbitrary metadata with the variation. The string cannot exceed 255 characters.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_item(location_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to create an item for. (required)
        :param V1Item body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_item" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_item`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_item`")


        resource_path = '/v1/{location_id}/items'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_modifier_list(self, location_id, body, **kwargs):
        """
        CreateModifierList
        Creates an item modifier list and at least one modifier option for it.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_modifier_list(location_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to create a modifier list for. (required)
        :param V1ModifierList body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1ModifierList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_modifier_list" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_modifier_list`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_modifier_list`")


        resource_path = '/v1/{location_id}/modifier-lists'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierList',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_modifier_option(self, location_id, modifier_list_id, body, **kwargs):
        """
        CreateModifierOption
        Creates an item modifier option and adds it to a modifier list.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_modifier_option(location_id, modifier_list_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to edit. (required)
        :param V1ModifierOption body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1ModifierOption
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_modifier_option" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_modifier_option`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `create_modifier_option`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_modifier_option`")


        resource_path = '/v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierOption',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_page(self, location_id, body, **kwargs):
        """
        CreatePage
        Creates a Favorites page in Square Register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_page(location_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to create an item for. (required)
        :param V1Page body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Page
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_page" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_page`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_page`")


        resource_path = '/v1/{location_id}/pages'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Page',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def create_variation(self, location_id, item_id, body, **kwargs):
        """
        CreateVariation
        Creates an item variation for an existing item.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.create_variation(location_id, item_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str item_id: The item's ID. (required)
        :param V1Variation body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Variation
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_variation" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `create_variation`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `create_variation`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_variation`")


        resource_path = '/v1/{location_id}/items/{item_id}/variations'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'POST',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Variation',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_category(self, location_id, category_id, **kwargs):
        """
        DeleteCategory
        Deletes an existing item category. *Note**: DeleteCategory returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteCategoryRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_category(location_id, category_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str category_id: The ID of the category to delete. (required)
        :return: V1Category
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'category_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_category" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_category`")
        # verify the required parameter 'category_id' is set
        if ('category_id' not in params) or (params['category_id'] is None):
            raise ValueError("Missing the required parameter `category_id` when calling `delete_category`")


        resource_path = '/v1/{location_id}/categories/{category_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'category_id' in params:
            path_params['category_id'] = params['category_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Category',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_discount(self, location_id, discount_id, **kwargs):
        """
        DeleteDiscount
        Deletes an existing discount. *Note**: DeleteDiscount returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteDiscountRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_discount(location_id, discount_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str discount_id: The ID of the discount to delete. (required)
        :return: V1Discount
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'discount_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_discount" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_discount`")
        # verify the required parameter 'discount_id' is set
        if ('discount_id' not in params) or (params['discount_id'] is None):
            raise ValueError("Missing the required parameter `discount_id` when calling `delete_discount`")


        resource_path = '/v1/{location_id}/discounts/{discount_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'discount_id' in params:
            path_params['discount_id'] = params['discount_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Discount',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_fee(self, location_id, fee_id, **kwargs):
        """
        DeleteFee
        Deletes an existing fee (tax). *Note**: DeleteFee returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteFeeRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_fee(location_id, fee_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the fee's associated location. (required)
        :param str fee_id: The ID of the fee to delete. (required)
        :return: V1Fee
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'fee_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_fee" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_fee`")
        # verify the required parameter 'fee_id' is set
        if ('fee_id' not in params) or (params['fee_id'] is None):
            raise ValueError("Missing the required parameter `fee_id` when calling `delete_fee`")


        resource_path = '/v1/{location_id}/fees/{fee_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'fee_id' in params:
            path_params['fee_id'] = params['fee_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Fee',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_item(self, location_id, item_id, **kwargs):
        """
        DeleteItem
        Deletes an existing item and all item variations associated with it. *Note**: DeleteItem returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteItemRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_item(location_id, item_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str item_id: The ID of the item to modify. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_item" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_item`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `delete_item`")


        resource_path = '/v1/{location_id}/items/{item_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_modifier_list(self, location_id, modifier_list_id, **kwargs):
        """
        DeleteModifierList
        Deletes an existing item modifier list and all modifier options associated with it. *Note**: DeleteModifierList returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteModifierListRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_modifier_list(location_id, modifier_list_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to delete. (required)
        :return: V1ModifierList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_modifier_list" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_modifier_list`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `delete_modifier_list`")


        resource_path = '/v1/{location_id}/modifier-lists/{modifier_list_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierList',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_modifier_option(self, location_id, modifier_list_id, modifier_option_id, **kwargs):
        """
        DeleteModifierOption
        Deletes an existing item modifier option from a modifier list. *Note**: DeleteModifierOption returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteModifierOptionRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_modifier_option(location_id, modifier_list_id, modifier_option_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to delete. (required)
        :param str modifier_option_id: The ID of the modifier list to edit. (required)
        :return: V1ModifierOption
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id', 'modifier_option_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_modifier_option" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_modifier_option`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `delete_modifier_option`")
        # verify the required parameter 'modifier_option_id' is set
        if ('modifier_option_id' not in params) or (params['modifier_option_id'] is None):
            raise ValueError("Missing the required parameter `modifier_option_id` when calling `delete_modifier_option`")


        resource_path = '/v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']
        if 'modifier_option_id' in params:
            path_params['modifier_option_id'] = params['modifier_option_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierOption',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_page(self, location_id, page_id, **kwargs):
        """
        DeletePage
        Deletes an existing Favorites page and all of its cells. *Note**: DeletePage returns nothing on success but Connect SDKs map the empty response to an empty `V1DeletePageRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_page(location_id, page_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the Favorites page's associated location. (required)
        :param str page_id: The ID of the page to delete. (required)
        :return: V1Page
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'page_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_page" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_page`")
        # verify the required parameter 'page_id' is set
        if ('page_id' not in params) or (params['page_id'] is None):
            raise ValueError("Missing the required parameter `page_id` when calling `delete_page`")


        resource_path = '/v1/{location_id}/pages/{page_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'page_id' in params:
            path_params['page_id'] = params['page_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Page',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_page_cell(self, location_id, page_id, **kwargs):
        """
        DeletePageCell
        Deletes a cell from a Favorites page in Square Register. *Note**: DeletePageCell returns nothing on success but Connect SDKs map the empty response to an empty `V1DeletePageCellRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_page_cell(location_id, page_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the Favorites page's associated location. (required)
        :param str page_id: The ID of the page to delete. (required)
        :param str row: The row of the cell to clear. Always an integer between 0 and 4, inclusive. Row 0 is the top row.
        :param str column: The column of the cell to clear. Always an integer between 0 and 4, inclusive. Column 0 is the leftmost column.
        :return: V1Page
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'page_id', 'row', 'column']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_page_cell" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_page_cell`")
        # verify the required parameter 'page_id' is set
        if ('page_id' not in params) or (params['page_id'] is None):
            raise ValueError("Missing the required parameter `page_id` when calling `delete_page_cell`")


        resource_path = '/v1/{location_id}/pages/{page_id}/cells'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'page_id' in params:
            path_params['page_id'] = params['page_id']

        query_params = {}
        if 'row' in params and params['row'] is not None:
            query_params['row'] = params['row']
        if 'column' in params and params['column'] is not None:
            query_params['column'] = params['column']

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Page',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def delete_variation(self, location_id, item_id, variation_id, **kwargs):
        """
        DeleteVariation
        Deletes an existing item variation from an item. *Note**: DeleteVariation returns nothing on success but Connect SDKs map the empty response to an empty `V1DeleteVariationRequest` object as documented below.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.delete_variation(location_id, item_id, variation_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str item_id: The ID of the item to delete. (required)
        :param str variation_id: The ID of the variation to delete. (required)
        :return: V1Variation
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id', 'variation_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method delete_variation" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `delete_variation`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `delete_variation`")
        # verify the required parameter 'variation_id' is set
        if ('variation_id' not in params) or (params['variation_id'] is None):
            raise ValueError("Missing the required parameter `variation_id` when calling `delete_variation`")


        resource_path = '/v1/{location_id}/items/{item_id}/variations/{variation_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']
        if 'variation_id' in params:
            path_params['variation_id'] = params['variation_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Variation',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_categories(self, location_id, **kwargs):
        """
        ListCategories
        Lists all of a location's item categories.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_categories(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to list categories for. (required)
        :return: list[V1Category]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_categories" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_categories`")


        resource_path = '/v1/{location_id}/categories'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1Category]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_discounts(self, location_id, **kwargs):
        """
        ListDiscounts
        Lists all of a location's discounts.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_discounts(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to list categories for. (required)
        :return: list[V1Discount]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_discounts" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_discounts`")


        resource_path = '/v1/{location_id}/discounts'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1Discount]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_fees(self, location_id, **kwargs):
        """
        ListFees
        Lists all of a location's fees (taxes).

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_fees(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to list fees for. (required)
        :return: list[V1Fee]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_fees" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_fees`")


        resource_path = '/v1/{location_id}/fees'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1Fee]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_inventory(self, location_id, **kwargs):
        """
        ListInventory
        Provides inventory information for all of a merchant's inventory-enabled item variations.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_inventory(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param int limit: The maximum number of inventory entries to return in a single response. This value cannot exceed 1000.
        :param str batch_token: A pagination cursor to retrieve the next set of results for your original query to the endpoint.
        :return: list[V1InventoryEntry]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'limit', 'batch_token']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_inventory" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_inventory`")


        resource_path = '/v1/{location_id}/inventory'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}
        if 'limit' in params and params['limit'] is not None:
            query_params['limit'] = params['limit']
        if 'batch_token' in params and params['batch_token'] is not None:
            query_params['batch_token'] = params['batch_token']

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1InventoryEntry]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_items(self, location_id, **kwargs):
        """
        ListItems
        Provides summary information for all of a location's items.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_items(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to list items for. (required)
        :param str batch_token: A pagination cursor to retrieve the next set of results for your original query to the endpoint.
        :return: list[V1Item]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'batch_token']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_items" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_items`")


        resource_path = '/v1/{location_id}/items'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}
        if 'batch_token' in params and params['batch_token'] is not None:
            query_params['batch_token'] = params['batch_token']

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1Item]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_modifier_lists(self, location_id, **kwargs):
        """
        ListModifierLists
        Lists all of a location's modifier lists.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_modifier_lists(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to list modifier lists for. (required)
        :return: list[V1ModifierList]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_modifier_lists" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_modifier_lists`")


        resource_path = '/v1/{location_id}/modifier-lists'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1ModifierList]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def list_pages(self, location_id, **kwargs):
        """
        ListPages
        Lists all of a location's Favorites pages in Square Register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.list_pages(location_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the location to list Favorites pages for. (required)
        :return: list[V1Page]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method list_pages" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `list_pages`")


        resource_path = '/v1/{location_id}/pages'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='list[V1Page]',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def remove_fee(self, location_id, item_id, fee_id, **kwargs):
        """
        RemoveFee
        Removes a fee assocation from an item, meaning the fee is no longer automatically applied to the item in Square Register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.remove_fee(location_id, item_id, fee_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the fee's associated location. (required)
        :param str item_id: The ID of the item to add the fee to. (required)
        :param str fee_id: The ID of the fee to apply. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id', 'fee_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method remove_fee" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `remove_fee`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `remove_fee`")
        # verify the required parameter 'fee_id' is set
        if ('fee_id' not in params) or (params['fee_id'] is None):
            raise ValueError("Missing the required parameter `fee_id` when calling `remove_fee`")


        resource_path = '/v1/{location_id}/items/{item_id}/fees/{fee_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']
        if 'fee_id' in params:
            path_params['fee_id'] = params['fee_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def remove_modifier_list(self, location_id, modifier_list_id, item_id, **kwargs):
        """
        RemoveModifierList
        Removes a modifier list association from an item, meaning modifier options from the list can no longer be applied to the item.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.remove_modifier_list(location_id, modifier_list_id, item_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to remove. (required)
        :param str item_id: The ID of the item to remove the modifier list from. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id', 'item_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method remove_modifier_list" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `remove_modifier_list`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `remove_modifier_list`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `remove_modifier_list`")


        resource_path = '/v1/{location_id}/items/{item_id}/modifier-lists/{modifier_list_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'DELETE',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def retrieve_item(self, location_id, item_id, **kwargs):
        """
        RetrieveItem
        Provides the details for a single item, including associated modifier lists and fees.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.retrieve_item(location_id, item_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str item_id: The item's ID. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method retrieve_item" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `retrieve_item`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `retrieve_item`")


        resource_path = '/v1/{location_id}/items/{item_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def retrieve_modifier_list(self, location_id, modifier_list_id, **kwargs):
        """
        RetrieveModifierList
        Provides the details for a single modifier list.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.retrieve_modifier_list(location_id, modifier_list_id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The modifier list's ID. (required)
        :return: V1ModifierList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method retrieve_modifier_list" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `retrieve_modifier_list`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `retrieve_modifier_list`")


        resource_path = '/v1/{location_id}/modifier-lists/{modifier_list_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'GET',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierList',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_category(self, location_id, category_id, body, **kwargs):
        """
        UpdateCategory
        Modifies the details of an existing item category.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_category(location_id, category_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the category's associated location. (required)
        :param str category_id: The ID of the category to edit. (required)
        :param V1Category body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Category
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'category_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_category" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_category`")
        # verify the required parameter 'category_id' is set
        if ('category_id' not in params) or (params['category_id'] is None):
            raise ValueError("Missing the required parameter `category_id` when calling `update_category`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_category`")


        resource_path = '/v1/{location_id}/categories/{category_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'category_id' in params:
            path_params['category_id'] = params['category_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Category',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_discount(self, location_id, discount_id, body, **kwargs):
        """
        UpdateDiscount
        Modifies the details of an existing discount.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_discount(location_id, discount_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the category's associated location. (required)
        :param str discount_id: The ID of the discount to edit. (required)
        :param V1Discount body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Discount
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'discount_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_discount" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_discount`")
        # verify the required parameter 'discount_id' is set
        if ('discount_id' not in params) or (params['discount_id'] is None):
            raise ValueError("Missing the required parameter `discount_id` when calling `update_discount`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_discount`")


        resource_path = '/v1/{location_id}/discounts/{discount_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'discount_id' in params:
            path_params['discount_id'] = params['discount_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Discount',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_fee(self, location_id, fee_id, body, **kwargs):
        """
        UpdateFee
        Modifies the details of an existing fee (tax).

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_fee(location_id, fee_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the fee's associated location. (required)
        :param str fee_id: The ID of the fee to edit. (required)
        :param V1Fee body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Fee
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'fee_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_fee" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_fee`")
        # verify the required parameter 'fee_id' is set
        if ('fee_id' not in params) or (params['fee_id'] is None):
            raise ValueError("Missing the required parameter `fee_id` when calling `update_fee`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_fee`")


        resource_path = '/v1/{location_id}/fees/{fee_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'fee_id' in params:
            path_params['fee_id'] = params['fee_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Fee',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_item(self, location_id, item_id, body, **kwargs):
        """
        UpdateItem
        Modifies the core details of an existing item.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_item(location_id, item_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str item_id: The ID of the item to modify. (required)
        :param V1Item body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Item
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_item" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_item`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `update_item`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_item`")


        resource_path = '/v1/{location_id}/items/{item_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Item',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_modifier_list(self, location_id, modifier_list_id, body, **kwargs):
        """
        UpdateModifierList
        Modifies the details of an existing item modifier list.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_modifier_list(location_id, modifier_list_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to edit. (required)
        :param V1UpdateModifierListRequest body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1ModifierList
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_modifier_list" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_modifier_list`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `update_modifier_list`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_modifier_list`")


        resource_path = '/v1/{location_id}/modifier-lists/{modifier_list_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierList',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_modifier_option(self, location_id, modifier_list_id, modifier_option_id, body, **kwargs):
        """
        UpdateModifierOption
        Modifies the details of an existing item modifier option.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_modifier_option(location_id, modifier_list_id, modifier_option_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str modifier_list_id: The ID of the modifier list to edit. (required)
        :param str modifier_option_id: The ID of the modifier list to edit. (required)
        :param V1ModifierOption body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1ModifierOption
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'modifier_list_id', 'modifier_option_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_modifier_option" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_modifier_option`")
        # verify the required parameter 'modifier_list_id' is set
        if ('modifier_list_id' not in params) or (params['modifier_list_id'] is None):
            raise ValueError("Missing the required parameter `modifier_list_id` when calling `update_modifier_option`")
        # verify the required parameter 'modifier_option_id' is set
        if ('modifier_option_id' not in params) or (params['modifier_option_id'] is None):
            raise ValueError("Missing the required parameter `modifier_option_id` when calling `update_modifier_option`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_modifier_option`")


        resource_path = '/v1/{location_id}/modifier-lists/{modifier_list_id}/modifier-options/{modifier_option_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'modifier_list_id' in params:
            path_params['modifier_list_id'] = params['modifier_list_id']
        if 'modifier_option_id' in params:
            path_params['modifier_option_id'] = params['modifier_option_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1ModifierOption',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_page(self, location_id, page_id, body, **kwargs):
        """
        UpdatePage
        Modifies the details of a Favorites page in Square Register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_page(location_id, page_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the Favorites page's associated location (required)
        :param str page_id: The ID of the page to modify. (required)
        :param V1Page body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Page
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'page_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_page" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_page`")
        # verify the required parameter 'page_id' is set
        if ('page_id' not in params) or (params['page_id'] is None):
            raise ValueError("Missing the required parameter `page_id` when calling `update_page`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_page`")


        resource_path = '/v1/{location_id}/pages/{page_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'page_id' in params:
            path_params['page_id'] = params['page_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Page',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_page_cell(self, location_id, page_id, body, **kwargs):
        """
        UpdatePageCell
        Modifies a cell of a Favorites page in Square Register.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_page_cell(location_id, page_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the Favorites page's associated location. (required)
        :param str page_id: The ID of the page the cell belongs to. (required)
        :param V1PageCell body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Page
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'page_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_page_cell" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_page_cell`")
        # verify the required parameter 'page_id' is set
        if ('page_id' not in params) or (params['page_id'] is None):
            raise ValueError("Missing the required parameter `page_id` when calling `update_page_cell`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_page_cell`")


        resource_path = '/v1/{location_id}/pages/{page_id}/cells'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'page_id' in params:
            path_params['page_id'] = params['page_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Page',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        

    def update_variation(self, location_id, item_id, variation_id, body, **kwargs):
        """
        UpdateVariation
        Modifies the details of an existing item variation.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.update_variation(location_id, item_id, variation_id, body, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param str location_id: The ID of the item's associated location. (required)
        :param str item_id: The ID of the item to modify. (required)
        :param str variation_id: The ID of the variation to modify. (required)
        :param V1Variation body: An object containing the fields to POST for the request.  See the corresponding object definition for field details. (required)
        :return: V1Variation
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['location_id', 'item_id', 'variation_id', 'body']
        all_params.append('callback')

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method update_variation" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'location_id' is set
        if ('location_id' not in params) or (params['location_id'] is None):
            raise ValueError("Missing the required parameter `location_id` when calling `update_variation`")
        # verify the required parameter 'item_id' is set
        if ('item_id' not in params) or (params['item_id'] is None):
            raise ValueError("Missing the required parameter `item_id` when calling `update_variation`")
        # verify the required parameter 'variation_id' is set
        if ('variation_id' not in params) or (params['variation_id'] is None):
            raise ValueError("Missing the required parameter `variation_id` when calling `update_variation`")
        # verify the required parameter 'body' is set
        if ('body' not in params) or (params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `update_variation`")


        resource_path = '/v1/{location_id}/items/{item_id}/variations/{variation_id}'.replace('{format}', 'json')
        path_params = {}
        if 'location_id' in params:
            path_params['location_id'] = params['location_id']
        if 'item_id' in params:
            path_params['item_id'] = params['item_id']
        if 'variation_id' in params:
            path_params['variation_id'] = params['variation_id']

        query_params = {}

        header_params = {}
        header_params['Square-Version'] = "2019-06-12"
        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.\
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.\
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['oauth2']

        return self.api_client.call_api(resource_path, 'PUT',
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=local_var_files,
                                            response_type='V1Variation',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        
