createCustomer method

  1. @override
Future<CustomerCreateResponse> createCustomer(
  1. Customer customer,
  2. String deduplicateAttribute
)
override

Implementation

@override
Future<CustomerCreateResponse> createCustomer(
    Customer customer,
    String deduplicateAttribute
    ) async {
      final response = await methodChannel.invokeMethod('createCustomer',{'customer':customer.toMap(),'deduplicateAttribute':deduplicateAttribute});
      return CustomerCreateResponse(
        status: response['status'],
        generated: response['generated'],
        id: response['id'],
        organizationId: response['organizationId'],
        locationId: response['locationId'],
        username: response['username'],
        password: response['password'],
      );
}