Function CustomersApiFp

  • CustomersApi - functional programming interface

    Export

    Parameters

    Returns {
        createCustomer(tilled_account, CustomerCreateParams, options?) => Promise<((axios?, basePath?) => AxiosPromise<Customer>)>;
        deleteCustomer(tilled_account, id, options?) => Promise<((axios?, basePath?) => AxiosPromise<object>)>;
        getCustomer(tilled_account, id, options?) => Promise<((axios?, basePath?) => AxiosPromise<Customer>)>;
        listCustomers(tilled_account, metadata?, q?, offset?, limit?, options?) => Promise<((axios?, basePath?) => AxiosPromise<ListCustomers200Response>)>;
        updateCustomer(tilled_account, id, CustomerUpdateParams, options?) => Promise<((axios?, basePath?) => AxiosPromise<Customer>)>;
    }

    • createCustomer:function
      • Creates a Customer.

        Summary

        Create a Customer

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • CustomerCreateParams: CustomerCreateParams
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Customer>)>

    • deleteCustomer:function
      • Deletes a Customer. This cannot be undone.

        Summary

        Delete a Customer

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<object>)>

    • getCustomer:function
      • Retrieves the details of an existing Customer.

        Summary

        Get a Customer

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Customer>)>

    • listCustomers:function
      • Returns a list of Customers. The Customers are sorted with the most recently created appearing first.

        Summary

        List all Customers

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • Optional metadata: {
              [key: string]: string;
          }

          `metadata` key-value pairs to filter by. Only exact matches on the key-value pair(s) will be returned. Example: `?metadata[internal_customer_id]=7cb1159d-875e-47ae-a309-319fa7ff395b`.

          • [key: string]: string
        • Optional q: string

          The partial search of text fields. Supports searching by `customer.first_name`, `customer.last_name`, `customer.email`, `customer.phone`

        • Optional offset: number

          The (zero-based) offset of the first item in the collection to return.

        • Optional limit: number

          The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used.

        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<ListCustomers200Response>)>

    • updateCustomer:function
      • Updates a Customer by setting the values of the provided parameters. Any parameters not provided will be left unchanged.

        Summary

        Update a Customer

        Throws

        Parameters

        • tilled_account: string

          The id of the Tilled Account (usually starting with the prefix `acct_`) that the request is performed on behalf of.

        • id: string
        • CustomerUpdateParams: CustomerUpdateParams
        • Optional options: RawAxiosRequestConfig<any>

          Override http request option.

        Returns Promise<((axios?, basePath?) => AxiosPromise<Customer>)>

Generated using TypeDoc