# Create customer response
customer = monei.business.create_business_customer(
business_id,
first_name="John",
last_name="Doe",
email="john@example.com",
phone_number="+2348012345678"
)
print(customer.id) # Customer ID
print(customer.first_name) # First name
print(customer.last_name) # Last name
print(customer.email) # Email address
print(customer.phone_number) # Phone number
print(customer.status) # Customer status
print(customer.created_at) # Creation date
# Get business customers response
customers = monei.business.get_business_customers(business_id)
for customer in customers.data:
print(customer.id) # Customer ID
print(customer.first_name) # First name
print(customer.last_name) # Last name
print(customer.email) # Email address
print(customer.phone_number) # Phone number
print(customer.status) # Customer status
print(customers.pagination) # Pagination info
print(customers.pagination.total) # Total count
print(customers.pagination.page) # Current page
print(customers.pagination.limit) # Items per page
# Get customer details response
customer = monei.business.get_customer_details(business_id, customer_id)
print(customer.id) # Customer ID
print(customer.first_name) # First name
print(customer.last_name) # Last name
print(customer.email) # Email address
print(customer.phone_number) # Phone number
print(customer.status) # Customer status
print(customer.created_at) # Creation date
print(customer.updated_at) # Last update date
# Update customer response
updated_customer = monei.business.update_customer(
business_id,
customer_id,
first_name="Jane",
last_name="Doe",
email="jane@example.com"
)
print(updated_customer.id) # Customer ID
print(updated_customer.first_name) # Updated first name
print(updated_customer.last_name) # Updated last name
print(updated_customer.email) # Updated email
print(updated_customer.updated_at) # Update timestamp
# Disable customer response
response = monei.business.disable_customer(business_id, customer_id)
print(response.message) # Success message
print(response.customer_id) # Disabled customer ID
print(response.status) # New status