toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      "created_at": encodeValue(createdAt),
      if (customData != null) "custom_data": encodeValue(customData),
      if (customerId != null) "customer_id": encodeValue(customerId),
      if (email != null) "email": encodeValue(email),
      "full_message": encodeValue(fullMessage),
      "id": encodeValue(id),
      if (idempotencyKey != null)
        "idempotency_key": encodeValue(idempotencyKey),
      if (purpose != null) "purpose": encodeValue(purpose),
      "recipient": encodeValue(recipient),
      "sender_id": encodeValue(senderId),
      if (transmission != null) "transmission": encodeValue(transmission),
    };