Skip to content

Customer

Customer

Bases: object

Handles the customer methods

get_customer_by_id(customer_id)

Returns a customer from its ID

Parameters:

Name Type Description Default
customer_id int

Customer ID to look up

required

Returns:

Type Description
ApiResponse

ApiResponse object

list_customers()

Returns a list of the available customers

:return: ApiResponse object

Returns:

Type Description
ApiResponse

ApiResponse object

lookup_customer(customer_name)

Returns a customer ID if customer name is found. Customer names are unique in the database. Customer ID is in the data section of the API response aka id = parse_api_data(resp.get_data(), 'customer_id')

Parameters:

Name Type Description Default
customer_name

Name of the customer to lookup

required

Returns:

Type Description
ApiResponse

ApiResponse object


Last update: 2022-03-20
Back to top