Beispiel #1
0
    def __init__(self, **kwargs):
        self.body = fields.StringField(name=HightonConstants.BODY,
                                       required=True)
        self.author_id = fields.IntegerField(name=HightonConstants.AUTHOR_ID)
        self.subject_id = fields.IntegerField(name=HightonConstants.SUBJECT_ID,
                                              required=True)
        self.subject_type = fields.StringField(
            name=HightonConstants.SUBJECT_TYPE, required=True)
        self.subject_name = fields.StringField(
            name=HightonConstants.SUBJECT_NAME)
        self.collection_id = fields.IntegerField(
            name=HightonConstants.COLLECTION_ID)
        self.collection_type = fields.StringField(
            name=HightonConstants.COLLECTION_TYPE)
        self.visible_to = fields.StringField(name=HightonConstants.VISIBLE_TO)
        self.owner_id = fields.IntegerField(name=HightonConstants.OWNER_ID)
        self.group_id = fields.IntegerField(name=HightonConstants.GROUP_ID)
        self.updated_at = fields.DatetimeField(
            name=HightonConstants.UPDATED_AT)
        self.created_at = fields.DatetimeField(
            name=HightonConstants.CREATED_AT)
        self.attachments = fields.ListField(name=HightonConstants.ATTACHMENTS,
                                            init_class=Attachment)

        super().__init__(**kwargs)
Beispiel #2
0
    def __init__(self, **kwargs):
        from highton.models import (
            Tag,
            ContactData,
            SubjectData,
        )

        self.author_id = fields.IntegerField(name=HightonConstants.AUTHOR_ID)
        self.background = fields.StringField(name=HightonConstants.BACKGROUND)
        self.created_at = fields.DatetimeField(
            name=HightonConstants.CREATED_AT)
        self.group_id = fields.IntegerField(name=HightonConstants.GROUP_ID)
        self.owner_id = fields.IntegerField(name=HightonConstants.OWNER_ID)
        self.updated_at = fields.DatetimeField(
            name=HightonConstants.UPDATED_AT)
        self.visible_to = fields.StringField(name=HightonConstants.VISIBLE_TO)
        self.linkedin_url = fields.StringField(
            name=HightonConstants.LINKEDIN_URL)
        self.avatar_url = fields.StringField(name=HightonConstants.AVATAR_URL)
        self.tags = fields.ListField(name=HightonConstants.TAGS,
                                     init_class=Tag)
        self.contact_data = fields.ObjectField(
            name=HightonConstants.CONTACT_DATA, init_class=ContactData)
        self.subject_datas = fields.ListField(
            name=HightonConstants.SUBJECT_DATAS, init_class=SubjectData)

        super().__init__(**kwargs)
Beispiel #3
0
    def __init__(self, **kwargs):
        self.parent_id = fields.IntegerField(name=HightonConstants.PARENT_ID,
                                             required=True)
        self.body = fields.StringField(name=HightonConstants.BODY,
                                       required=True)
        self.author_id = fields.IntegerField(name=HightonConstants.AUTHOR_ID)
        self.created_at = fields.DatetimeField(
            name=HightonConstants.CREATED_AT)

        super().__init__(**kwargs)
Beispiel #4
0
    def __init__(self, **kwargs):
        self.company_id = fields.IntegerField(name=HightonConstants.COMPANY_ID, required=True)
        self.company_name = fields.StringField(name=HightonConstants.COMPANY_NAME, required=True)
        self.first_name = fields.StringField(name=HightonConstants.FIRST_NAME, required=True)
        self.last_name = fields.StringField(name=HightonConstants.LAST_NAME, required=True)
        self.title = fields.StringField(name=HightonConstants.TITLE, required=True)

        super().__init__(**kwargs)
Beispiel #5
0
    def __init__(self, **kwargs):
        """
        Init a deal with the attributes

        :param kwargs:
        :type kwargs:
        """
        from highton.models import (
            Tag,
            ContactData,
            SubjectData,
            Party,
            AssociatedParty,
            Category,
        )

        self.author_id = fields.IntegerField(name=HightonConstants.AUTHOR_ID)
        self.account_id = fields.IntegerField(name=HightonConstants.ACCOUNT_ID)
        self.background = fields.StringField(name=HightonConstants.BACKGROUND)
        self.category_id = fields.IntegerField(name=HightonConstants.CATEGORY_ID)
        self.created_at = fields.DatetimeField(name=HightonConstants.CREATED_AT)
        self.currency = fields.StringField(name=HightonConstants.CURRENCY)
        self.duration = fields.IntegerField(name=HightonConstants.DURATION)
        self.group_id = fields.IntegerField(name=HightonConstants.GROUP_ID)
        self.name = fields.StringField(name=HightonConstants.NAME)
        self.owner_id = fields.IntegerField(name=HightonConstants.OWNER_ID)
        self.party_id = fields.IntegerField(name=HightonConstants.PARTY_ID)
        self.price = fields.IntegerField(name=HightonConstants.PRICE)
        self.price_type = fields.StringField(name=HightonConstants.PRICE_TYPE)
        self.responsible_party_id = fields.IntegerField(name=HightonConstants.RESPONSIBLE_PARTY_ID)
        self.status = fields.StringField(name=HightonConstants.STATUS)
        self.status_changed_on = fields.DatetimeField(name=HightonConstants.STATUS_CHANGED_ON)
        self.updated_at = fields.DatetimeField(name=HightonConstants.UPDATED_AT)
        self.visible_to = fields.StringField(name=HightonConstants.VISIBLE_TO)
        self.party = fields.ObjectField(name=HightonConstants.PARTY, init_class=Party)
        self.category = fields.ObjectField(name=HightonConstants.CATEGORY, init_class=Category)
        self.tags = fields.ListField(name=HightonConstants.TAGS, init_class=Tag)
        self.parties = fields.ListField(name=HightonConstants.PARTIES, init_class=Party)
        self.contact_data = fields.ObjectField(name=HightonConstants.CONTACT_DATA, init_class=ContactData)
        self.subject_datas = fields.ListField(name=HightonConstants.SUBJECT_DATAS, init_class=SubjectData)
        self.associated_parties = fields.ListField(name=HightonConstants.ASSOCIATED_PARTIES, init_class=AssociatedParty)

        super().__init__(**kwargs)
Beispiel #6
0
    def __init__(self, **kwargs):
        from highton.models import (
            Party,
            AssociatedParty,
        )

        self.author_id = fields.IntegerField(name=HightonConstants.AUTHOR_ID)
        self.closed_at = fields.DatetimeField(name=HightonConstants.CLOSED_AT)
        self.created_at = fields.DatetimeField(
            name=HightonConstants.CREATED_AT)
        self.updated_at = fields.DatetimeField(
            name=HightonConstants.UPDATED_AT)
        self.name = fields.StringField(name=HightonConstants.NAME)
        self.visible_to = fields.StringField(name=HightonConstants.VISIBLE_TO)
        self.group_id = fields.IntegerField(name=HightonConstants.GROUP_ID)
        self.owner_id = fields.IntegerField(name=HightonConstants.OWNER_ID)
        self.background = fields.StringField(name=HightonConstants.BACKGROUND)
        self.parties = fields.ListField(name=HightonConstants.PARTIES,
                                        init_class=Party)
        self.associated_parties = fields.ListField(
            name=HightonConstants.ASSOCIATED_PARTIES,
            init_class=AssociatedParty)

        super().__init__(**kwargs)
Beispiel #7
0
    def __init__(self, **kwargs):
        self.recording_id = fields.IntegerField(name=HightonConstants.RECORDING_ID)
        self.subject_id = fields.IntegerField(name=HightonConstants.SUBJECT_ID)
        self.subject_type = fields.StringField(name=HightonConstants.SUBJECT_TYPE)
        self.subject_name = fields.StringField(name=HightonConstants.SUBJECT_NAME)
        self.category_id = fields.IntegerField(name=HightonConstants.CATEGORY_ID, required=True)
        self.body = fields.StringField(name=HightonConstants.BODY, required=True)
        self.frame = fields.StringField(name=HightonConstants.FRAME, required=True)
        self.due_at = fields.DatetimeField(name=HightonConstants.DUE_AT, required=True)
        self.alert_at = fields.DatetimeField(name=HightonConstants.ALERT_AT)
        self.created_at = fields.DatetimeField(name=HightonConstants.CREATED_AT)
        self.author_id = fields.IntegerField(name=HightonConstants.AUTHOR_ID)
        self.updated_at = fields.DatetimeField(name=HightonConstants.UPDATED_AT)
        self.public = fields.BooleanField(name=HightonConstants.PUBLIC)
        self.recurring_period = fields.StringField(name=HightonConstants.RECURRING_PERIOD)
        self.anchor_type = fields.IntegerField(name=HightonConstants.ANCHOR_TYPE)
        self.done_at = fields.DatetimeField(name=HightonConstants.DONE_AT)
        self.owner_id = fields.IntegerField(name=HightonConstants.OWNER_ID)

        super().__init__(**kwargs)
 def __init__(self, **kwargs):
     self.id = fields.IntegerField(name='id')
     self.value = fields.StringField(name='value')
     super().__init__(**kwargs)
Beispiel #9
0
    def __init__(self, **kwargs):
        self.url = fields.StringField(name=HightonConstants.URL)
        self.name = fields.StringField(name=HightonConstants.NAME)
        self.size = fields.IntegerField(name=HightonConstants.SIZE)

        super().__init__(**kwargs)
Beispiel #10
0
    def __init__(self, **kwargs):
        self.id = fields.IntegerField(name=HightonConstants.ID)

        for key, value in kwargs.items():
            setattr(self, key, value)