def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_str_value("commerceSubscriptionId", self.commerce_subscription_id)
        writer.write_datetime_value("createdDateTime", self.created_date_time)
        writer.write_bool_value("isTrial", self.is_trial)
        writer.write_datetime_value("nextLifecycleDateTime", self.next_lifecycle_date_time)
        writer.write_str_value("ownerId", self.owner_id)
        writer.write_str_value("ownerTenantId", self.owner_tenant_id)
        writer.write_str_value("ownerType", self.owner_type)
        writer.write_collection_of_object_values("serviceStatus", self.service_status)
        writer.write_str_value("skuId", self.sku_id)
        writer.write_str_value("skuPartNumber", self.sku_part_number)
        writer.write_str_value("status", self.status)
        writer.write_int_value("totalLicenses", self.total_licenses)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/company_subscription.py