InitializeCustomerRequest constructor

InitializeCustomerRequest({
  1. required String customerId,
  2. required String deviceToken,
  3. String? osType,
  4. CustomerAttributes? customerAttributes,
  5. String? referrerCode,
  6. String? email,
  7. String? mobileNumber,
  8. bool? isGuest,
  9. String? pushProvider,
})

Creates a new InitializeCustomerRequest object.

Arguments:

  • customerId (required): The unique identifier for the customer.
  • deviceToken (required): The customer's device token.
  • osType (optional): The operating system type. Automatically set based on the platform if not provided.
  • customerAttributes (optional): Additional attributes related to the customer.
  • referrerCode (optional): A referral code associated with the customer.
  • email (optional): The customer's email address.
  • mobileNumber (optional): The customer's mobile number for communication purposes.
  • isGuest (optional): A flag indicating if the customer is a guest or not.

Implementation

InitializeCustomerRequest({
  required this.customerId,
  required this.deviceToken,
  this.osType,
  this.customerAttributes,
  this.referrerCode,
  this.email,
  this.mobileNumber,
  this.isGuest,
  this.pushProvider
}) {
  osType = getDevicePlatform(); // Automatically set osType based on platform
}