Module pyinventory.api.customer

Functions

def add_customer(client: SymphonyClient, name: str, external_id: Union[str, NoneType]) -> Customer

This function adds Customer.

Args

name : str
name for the Customer
external_id : Optional[str]
external ID for the Customer

Returns

Customer object

Example

new_customers = client.add_customer(name="new_customer")

or

new_customers = client.add_customer(name="new_customer", external_id="12345678")
def delete_customer(client: SymphonyClient, customer: Customer) -> NoneType

This function delete Customer.

Args

customer ( Customer ): customer object

Example

client.delete_customer(customer)
def get_all_customers(client: SymphonyClient) -> List[Customer]

This function returns all Customers.

Returns

List[ pyinventory.common.data_class.Customer ]

Example

customers = client.get_all_customers()