The customer API allows you to create, view, update, and delete individual, or a batch, of customers.
This API helps you to create a new customer.
String email,
String firstName,
String lastName,
String userName,
Map<String, dynamic> billing,
Map<String, dynamic> shipping
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call Api
Customer customer = await WooSignal.instance.createCustomer({
String email,
String firstName,
String lastName,
String userName,
Map<String, dynamic> billing,
Map<String, dynamic> shipping,
}).then( (customer) {
print(customer);
});
});
Customer instance
Represents the following object - WooCommerce create a customer
This API lets you retrieve and view a specific customer by ID.
int id
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Customer customer = await WooSignal.instance.retrieveCustomer(id: "customer id");
Customers instance
Represents the following object - WooCommerce retrieve a customer
Returns customers back from WooCommerce, include parementers to query data.
int page,
int perPage,
String search,
List<int> exclude,
List<int> include,
int offset,
String order,
String orderBy,
bool hideEmpty,
int parent,
int product,
String email,
String slug,
String role
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
List<Customer> customers = await WooSignal.instance.getCustomers();
List<Customer> instance
Represents the following object - WooCommerce list all customers
This API lets you make changes to a customer.
Map<String, dynamic> data
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Customer customer = await WooSignal.instance.updateCustomer("customer id", data: {});
Customer instance
Represents the following object - WooCommerce update a customer
This API helps you delete a customer.
bool force
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
Customer customer = await WooSignal.instance.deleteCustomer("customer id");
Customer instance
Represents the following object - WooCommerce delete a customer
This API helps you to batch create, update and delete multiple customers.
Map<String, dynamic> data
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
CustomerBatch customerBatch = await WooSignal.instance.batchCustomers(data: {});
CustomerBatch instance
Represents the following object - WooCommerce batch update customers
This API lets you retrieve customer downloads permissions.
// Initialize WooSignal
await WooSignal.instance.init(appKey: "your app key");
// Call API
CustomerDownload customerDownload = await WooSignal.instance.retrieveCustomerDownloads(customerid: "customer id");
CustomerDownload instance
Represents the following object - WooCommerce retrieve customer downloads