Beispiel #1
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the RoomInstance

        :returns: twilio.rest.video.v1.room.RoomInstance
        :rtype: twilio.rest.video.v1.room.RoomInstance
        """
        super(RoomInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'status': payload['status'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'account_sid': payload['account_sid'],
            'enable_turn': payload['enable_turn'],
            'unique_name': payload['unique_name'],
            'status_callback': payload['status_callback'],
            'status_callback_method': payload['status_callback_method'],
            'end_time': deserialize.iso8601_datetime(payload['end_time']),
            'duration': deserialize.integer(payload['duration']),
            'type': payload['type'],
            'max_participants': deserialize.integer(payload['max_participants']),
            'record_participants_on_connect': payload['record_participants_on_connect'],
            'video_codecs': payload['video_codecs'],
            'media_region': payload['media_region'],
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
Beispiel #2
0
    def __init__(self, version, payload):
        """
        Initialize the WebhookInstance

        :returns: twilio.rest.messaging.v1.webhook.WebhookInstance
        :rtype: twilio.rest.messaging.v1.webhook.WebhookInstance
        """
        super(WebhookInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'webhook_method': payload['webhook_method'],
            'webhook_filters': payload['webhook_filters'],
            'pre_webhook_url': payload['pre_webhook_url'],
            'post_webhook_url': payload['post_webhook_url'],
            'pre_webhook_retry_count': deserialize.integer(payload['pre_webhook_retry_count']),
            'post_webhook_retry_count': deserialize.integer(payload['post_webhook_retry_count']),
            'target': payload['target'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {}
Beispiel #3
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the CompositionInstance

        :returns: twilio.rest.video.v1.composition.CompositionInstance
        :rtype: twilio.rest.video.v1.composition.CompositionInstance
        """
        super(CompositionInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'status': payload['status'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_completed': payload['date_completed'],
            'date_deleted': payload['date_deleted'],
            'sid': payload['sid'],
            'room_sid': payload['room_sid'],
            'audio_sources': payload['audio_sources'],
            'audio_sources_excluded': payload['audio_sources_excluded'],
            'video_layout': payload['video_layout'],
            'resolution': payload['resolution'],
            'trim': payload['trim'],
            'format': payload['format'],
            'bitrate': deserialize.integer(payload['bitrate']),
            'size': deserialize.integer(payload['size']),
            'duration': deserialize.integer(payload['duration']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
    def __init__(self, version, payload, service_sid, user_sid):
        """
        Initialize the UserChannelInstance

        :returns: twilio.rest.chat.v2.service.user.user_channel.UserChannelInstance
        :rtype: twilio.rest.chat.v2.service.user.user_channel.UserChannelInstance
        """
        super(UserChannelInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'channel_sid': payload['channel_sid'],
            'member_sid': payload['member_sid'],
            'status': payload['status'],
            'last_consumed_message_index': deserialize.integer(payload['last_consumed_message_index']),
            'unread_messages_count': deserialize.integer(payload['unread_messages_count']),
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
            'user_sid': user_sid,
        }
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the FeedbackSummaryInstance

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        """
        super(FeedbackSummaryInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'call_count': deserialize.integer(payload['call_count']),
            'call_feedback_count': deserialize.integer(payload['call_feedback_count']),
            'date_created': deserialize.rfc2822_datetime(payload['date_created']),
            'date_updated': deserialize.rfc2822_datetime(payload['date_updated']),
            'end_date': deserialize.iso8601_datetime(payload['end_date']),
            'include_subaccounts': payload['include_subaccounts'],
            'issues': payload['issues'],
            'quality_score_average': deserialize.decimal(payload['quality_score_average']),
            'quality_score_median': deserialize.decimal(payload['quality_score_median']),
            'quality_score_standard_deviation': deserialize.decimal(payload['quality_score_standard_deviation']),
            'sid': payload['sid'],
            'start_date': deserialize.iso8601_datetime(payload['start_date']),
            'status': payload['status'],
        }

        # Context
        self._context = None
        self._solution = {'account_sid': account_sid, 'sid': sid or self._properties['sid'], }
Beispiel #6
0
    def __init__(self, version, payload, sim_sid):
        """
        Initialize the DataSessionInstance

        :returns: twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
        :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionInstance
        """
        super(DataSessionInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'sim_sid': payload['sim_sid'],
            'account_sid': payload['account_sid'],
            'radio_link': payload['radio_link'],
            'operator_mcc': payload['operator_mcc'],
            'operator_mnc': payload['operator_mnc'],
            'operator_country': payload['operator_country'],
            'operator_name': payload['operator_name'],
            'cell_id': payload['cell_id'],
            'cell_location_estimate': payload['cell_location_estimate'],
            'packets_uploaded': deserialize.integer(payload['packets_uploaded']),
            'packets_downloaded': deserialize.integer(payload['packets_downloaded']),
            'last_updated': deserialize.iso8601_datetime(payload['last_updated']),
            'start': deserialize.iso8601_datetime(payload['start']),
            'end': deserialize.iso8601_datetime(payload['end']),
            'imeisv': payload['imeisv'],
        }

        # Context
        self._context = None
        self._solution = {'sim_sid': sim_sid, }
Beispiel #7
0
    def __init__(self, version, payload, call_sid=None):
        """
        Initialize the CallSummaryInstance

        :returns: twilio.rest.insights.v1.summary.CallSummaryInstance
        :rtype: twilio.rest.insights.v1.summary.CallSummaryInstance
        """
        super(CallSummaryInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'call_sid': payload['call_sid'],
            'call_type': payload['call_type'],
            'call_state': payload['call_state'],
            'processing_state': payload['processing_state'],
            'direction': payload['direction'],
            'disconnected_by': payload['disconnected_by'],
            'start_time': deserialize.iso8601_datetime(payload['start_time']),
            'end_time': deserialize.iso8601_datetime(payload['end_time']),
            'duration': deserialize.integer(payload['duration']),
            'connect_duration': deserialize.integer(payload['connect_duration']),
            'from_': payload['from'],
            'to': payload['to'],
            'carrier_edge': payload['carrier_edge'],
            'client_edge': payload['client_edge'],
            'sip_edge': payload['sip_edge'],
            'tags': payload['tags'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'call_sid': call_sid or self._properties['call_sid'], }
Beispiel #8
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the RatePlanInstance

        :returns: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance
        """
        super(RatePlanInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'unique_name': payload['unique_name'],
            'account_sid': payload['account_sid'],
            'friendly_name': payload['friendly_name'],
            'data_enabled': payload['data_enabled'],
            'data_metering': payload['data_metering'],
            'data_limit': deserialize.integer(payload['data_limit']),
            'messaging_enabled': payload['messaging_enabled'],
            'voice_enabled': payload['voice_enabled'],
            'national_roaming_enabled': payload['national_roaming_enabled'],
            'national_roaming_data_limit': deserialize.integer(payload['national_roaming_data_limit']),
            'international_roaming': payload['international_roaming'],
            'international_roaming_data_limit': deserialize.integer(payload['international_roaming_data_limit']),
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
Beispiel #9
0
    def __init__(self, version, payload, assistant_sid, sid=None):
        """
        Initialize the ModelBuildInstance

        :returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
        :rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
        """
        super(ModelBuildInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'assistant_sid': payload['assistant_sid'],
            'sid': payload['sid'],
            'status': payload['status'],
            'unique_name': payload['unique_name'],
            'url': payload['url'],
            'build_duration': deserialize.integer(payload['build_duration']),
            'error_code': deserialize.integer(payload['error_code']),
        }

        # Context
        self._context = None
        self._solution = {'assistant_sid': assistant_sid, 'sid': sid or self._properties['sid'], }
Beispiel #10
0
    def __init__(self, version, payload, workspace_sid, worker_sid, sid=None):
        """
        Initialize the WorkerChannelInstance

        :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance
        """
        super(WorkerChannelInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'assigned_tasks': deserialize.integer(payload['assigned_tasks']),
            'available': payload['available'],
            'available_capacity_percentage': deserialize.integer(payload['available_capacity_percentage']),
            'configured_capacity': deserialize.integer(payload['configured_capacity']),
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'sid': payload['sid'],
            'task_channel_sid': payload['task_channel_sid'],
            'task_channel_unique_name': payload['task_channel_unique_name'],
            'worker_sid': payload['worker_sid'],
            'workspace_sid': payload['workspace_sid'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'worker_sid': worker_sid,
            'sid': sid or self._properties['sid'],
        }
    def __init__(self, version, payload, workspace_sid, task_queue_sid):
        """
        Initialize the TaskQueueRealTimeStatisticsInstance

        :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
        """
        super(TaskQueueRealTimeStatisticsInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'activity_statistics': payload['activity_statistics'],
            'longest_task_waiting_age': deserialize.integer(payload['longest_task_waiting_age']),
            'task_queue_sid': payload['task_queue_sid'],
            'tasks_by_priority': payload['tasks_by_priority'],
            'tasks_by_status': payload['tasks_by_status'],
            'total_available_workers': deserialize.integer(payload['total_available_workers']),
            'total_eligible_workers': deserialize.integer(payload['total_eligible_workers']),
            'total_tasks': deserialize.integer(payload['total_tasks']),
            'workspace_sid': payload['workspace_sid'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'workspace_sid': workspace_sid, 'task_queue_sid': task_queue_sid, }
Beispiel #12
0
    def __init__(self, version, payload, trunk_sid, sid=None):
        """
        Initialize the OriginationUrlInstance

        :returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
        :rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
        """
        super(OriginationUrlInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'sid': payload['sid'],
            'trunk_sid': payload['trunk_sid'],
            'weight': deserialize.integer(payload['weight']),
            'enabled': payload['enabled'],
            'sip_url': payload['sip_url'],
            'friendly_name': payload['friendly_name'],
            'priority': deserialize.integer(payload['priority']),
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'trunk_sid': trunk_sid, 'sid': sid or self._properties['sid'], }
Beispiel #13
0
    def __init__(self, version, payload, room_sid, sid=None):
        """
        Initialize the RoomRecordingInstance

        :returns: twilio.rest.video.v1.room.recording.RoomRecordingInstance
        :rtype: twilio.rest.video.v1.room.recording.RoomRecordingInstance
        """
        super(RoomRecordingInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'status': payload['status'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'sid': payload['sid'],
            'source_sid': payload['source_sid'],
            'size': deserialize.integer(payload['size']),
            'url': payload['url'],
            'type': payload['type'],
            'duration': deserialize.integer(payload['duration']),
            'container_format': payload['container_format'],
            'codec': payload['codec'],
            'grouping_sids': payload['grouping_sids'],
            'track_name': payload['track_name'],
            'room_sid': payload['room_sid'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'room_sid': room_sid, 'sid': sid or self._properties['sid'], }
    def __init__(self, version, payload, account_sid, queue_sid, call_sid=None):
        """
        Initialize the MemberInstance

        :returns: twilio.rest.api.v2010.account.queue.member.MemberInstance
        :rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance
        """
        super(MemberInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'call_sid': payload['call_sid'],
            'date_enqueued': deserialize.rfc2822_datetime(payload['date_enqueued']),
            'position': deserialize.integer(payload['position']),
            'uri': payload['uri'],
            'wait_time': deserialize.integer(payload['wait_time']),
        }

        # Context
        self._context = None
        self._solution = {
            'account_sid': account_sid,
            'queue_sid': queue_sid,
            'call_sid': call_sid or self._properties['call_sid'],
        }
Beispiel #15
0
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the QueueInstance

        :returns: twilio.rest.api.v2010.account.queue.QueueInstance
        :rtype: twilio.rest.api.v2010.account.queue.QueueInstance
        """
        super(QueueInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'average_wait_time': deserialize.integer(payload['average_wait_time']),
            'current_size': deserialize.integer(payload['current_size']),
            'date_created': deserialize.rfc2822_datetime(payload['date_created']),
            'date_updated': deserialize.rfc2822_datetime(payload['date_updated']),
            'friendly_name': payload['friendly_name'],
            'max_size': deserialize.integer(payload['max_size']),
            'sid': payload['sid'],
            'uri': payload['uri'],
            'subresource_uris': payload['subresource_uris'],
        }

        # Context
        self._context = None
        self._solution = {'account_sid': account_sid, 'sid': sid or self._properties['sid'], }
Beispiel #16
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the FaxInstance

        :returns: twilio.rest.fax.v1.fax.FaxInstance
        :rtype: twilio.rest.fax.v1.fax.FaxInstance
        """
        super(FaxInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'from_': payload['from'],
            'to': payload['to'],
            'quality': payload['quality'],
            'media_sid': payload['media_sid'],
            'media_url': payload['media_url'],
            'num_pages': deserialize.integer(payload['num_pages']),
            'duration': deserialize.integer(payload['duration']),
            'status': payload['status'],
            'direction': payload['direction'],
            'api_version': payload['api_version'],
            'price': deserialize.decimal(payload['price']),
            'price_unit': payload['price_unit'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'links': payload['links'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
Beispiel #17
0
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the RecordingInstance

        :returns: twilio.rest.api.v2010.account.recording.RecordingInstance
        :rtype: twilio.rest.api.v2010.account.recording.RecordingInstance
        """
        super(RecordingInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'api_version': payload['api_version'],
            'call_sid': payload['call_sid'],
            'conference_sid': payload['conference_sid'],
            'date_created': deserialize.rfc2822_datetime(payload['date_created']),
            'date_updated': deserialize.rfc2822_datetime(payload['date_updated']),
            'duration': payload['duration'],
            'sid': payload['sid'],
            'price': payload['price'],
            'price_unit': payload['price_unit'],
            'status': payload['status'],
            'channels': deserialize.integer(payload['channels']),
            'source': payload['source'],
            'error_code': deserialize.integer(payload['error_code']),
            'uri': payload['uri'],
            'encryption_details': payload['encryption_details'],
            'subresource_uris': payload['subresource_uris'],
        }

        # Context
        self._context = None
        self._solution = {'account_sid': account_sid, 'sid': sid or self._properties['sid'], }
Beispiel #18
0
    def __init__(self, version, payload, service_sid, sid=None):
        """
        Initialize the ChannelInstance

        :returns: twilio.rest.chat.v2.service.channel.ChannelInstance
        :rtype: twilio.rest.chat.v2.service.channel.ChannelInstance
        """
        super(ChannelInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'friendly_name': payload['friendly_name'],
            'unique_name': payload['unique_name'],
            'attributes': payload['attributes'],
            'type': payload['type'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'created_by': payload['created_by'],
            'members_count': deserialize.integer(payload['members_count']),
            'messages_count': deserialize.integer(payload['messages_count']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'service_sid': service_sid, 'sid': sid or self._properties['sid'], }
    def __init__(self, version, payload, service_sid, list_sid, index=None):
        """
        Initialize the SyncListItemInstance

        :returns: twilio.rest.sync.v1.service.sync_list.sync_list_item.SyncListItemInstance
        :rtype: twilio.rest.sync.v1.service.sync_list.sync_list_item.SyncListItemInstance
        """
        super(SyncListItemInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'index': deserialize.integer(payload['index']),
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'list_sid': payload['list_sid'],
            'url': payload['url'],
            'revision': payload['revision'],
            'data': payload['data'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'created_by': payload['created_by'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
            'list_sid': list_sid,
            'index': index or self._properties['index'],
        }
Beispiel #20
0
    def __init__(self, version, payload, service_sid, sid=None):
        """
        Initialize the PhoneNumberInstance

        :returns: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        :rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
        """
        super(PhoneNumberInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'phone_number': payload['phone_number'],
            'friendly_name': payload['friendly_name'],
            'iso_country': payload['iso_country'],
            'capabilities': payload['capabilities'],
            'url': payload['url'],
            'is_reserved': payload['is_reserved'],
            'in_use': deserialize.integer(payload['in_use']),
        }

        # Context
        self._context = None
        self._solution = {'service_sid': service_sid, 'sid': sid or self._properties['sid'], }
Beispiel #21
0
    def __init__(self, version, payload, room_sid, sid=None):
        """
        Initialize the ParticipantInstance

        :returns: twilio.rest.video.v1.room.room_participant.ParticipantInstance
        :rtype: twilio.rest.video.v1.room.room_participant.ParticipantInstance
        """
        super(ParticipantInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'room_sid': payload['room_sid'],
            'account_sid': payload['account_sid'],
            'status': payload['status'],
            'identity': payload['identity'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'start_time': deserialize.iso8601_datetime(payload['start_time']),
            'end_time': deserialize.iso8601_datetime(payload['end_time']),
            'duration': deserialize.integer(payload['duration']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'room_sid': room_sid, 'sid': sid or self._properties['sid'], }
Beispiel #22
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the FlowInstance

        :returns: twilio.rest.studio.v1.flow.FlowInstance
        :rtype: twilio.rest.studio.v1.flow.FlowInstance
        """
        super(FlowInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'friendly_name': payload['friendly_name'],
            'status': payload['status'],
            'version': deserialize.integer(payload['version']),
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
Beispiel #23
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the ServiceInstance

        :returns: twilio.rest.proxy.v1.service.ServiceInstance
        :rtype: twilio.rest.proxy.v1.service.ServiceInstance
        """
        super(ServiceInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'unique_name': payload['unique_name'],
            'account_sid': payload['account_sid'],
            'callback_url': payload['callback_url'],
            'default_ttl': deserialize.integer(payload['default_ttl']),
            'number_selection_behavior': payload['number_selection_behavior'],
            'geo_match_level': payload['geo_match_level'],
            'intercept_callback_url': payload['intercept_callback_url'],
            'out_of_session_callback_url': payload['out_of_session_callback_url'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
    def __init__(self, version, payload, workspace_sid, sid=None):
        """
        Initialize the TaskQueueInstance

        :returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueInstance
        """
        super(TaskQueueInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'assignment_activity_sid': payload['assignment_activity_sid'],
            'assignment_activity_name': payload['assignment_activity_name'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'friendly_name': payload['friendly_name'],
            'max_reserved_workers': deserialize.integer(payload['max_reserved_workers']),
            'reservation_activity_sid': payload['reservation_activity_sid'],
            'reservation_activity_name': payload['reservation_activity_name'],
            'sid': payload['sid'],
            'target_workers': payload['target_workers'],
            'task_order': payload['task_order'],
            'url': payload['url'],
            'workspace_sid': payload['workspace_sid'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'sid': sid or self._properties['sid'],
        }
Beispiel #25
0
    def __init__(self, version, payload, service_sid, sid=None):
        """
        Initialize the UserInstance

        :returns: twilio.rest.chat.v1.service.user.UserInstance
        :rtype: twilio.rest.chat.v1.service.user.UserInstance
        """
        super(UserInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'attributes': payload['attributes'],
            'friendly_name': payload['friendly_name'],
            'role_sid': payload['role_sid'],
            'identity': payload['identity'],
            'is_online': payload['is_online'],
            'is_notifiable': payload['is_notifiable'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'joined_channels_count': deserialize.integer(payload['joined_channels_count']),
            'links': payload['links'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'service_sid': service_sid, 'sid': sid or self._properties['sid'], }
Beispiel #26
0
    def __init__(self, version, payload, service_sid, channel_sid, sid=None):
        """
        Initialize the MemberInstance

        :returns: twilio.rest.chat.v2.service.channel.member.MemberInstance
        :rtype: twilio.rest.chat.v2.service.channel.member.MemberInstance
        """
        super(MemberInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'channel_sid': payload['channel_sid'],
            'service_sid': payload['service_sid'],
            'identity': payload['identity'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'role_sid': payload['role_sid'],
            'last_consumed_message_index': deserialize.integer(payload['last_consumed_message_index']),
            'last_consumption_timestamp': deserialize.iso8601_datetime(payload['last_consumption_timestamp']),
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
            'channel_sid': channel_sid,
            'sid': sid or self._properties['sid'],
        }
Beispiel #27
0
    def __init__(self, version, payload, workspace_sid, sid=None):
        """
        Initialize the WorkflowInstance

        :returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
        """
        super(WorkflowInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'assignment_callback_url': payload['assignment_callback_url'],
            'configuration': payload['configuration'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'document_content_type': payload['document_content_type'],
            'fallback_assignment_callback_url': payload['fallback_assignment_callback_url'],
            'friendly_name': payload['friendly_name'],
            'sid': payload['sid'],
            'task_reservation_timeout': deserialize.integer(payload['task_reservation_timeout']),
            'workspace_sid': payload['workspace_sid'],
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'workspace_sid': workspace_sid, 'sid': sid or self._properties['sid'], }
    def __init__(self, version, payload, service_sid, channel_sid, sid=None):
        """
        Initialize the MessageInstance

        :returns: twilio.rest.chat.v2.service.channel.message.MessageInstance
        :rtype: twilio.rest.chat.v2.service.channel.message.MessageInstance
        """
        super(MessageInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'attributes': payload['attributes'],
            'service_sid': payload['service_sid'],
            'to': payload['to'],
            'channel_sid': payload['channel_sid'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'was_edited': payload['was_edited'],
            'from_': payload['from'],
            'body': payload['body'],
            'index': deserialize.integer(payload['index']),
            'type': payload['type'],
            'media': payload['media'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
            'channel_sid': channel_sid,
            'sid': sid or self._properties['sid'],
        }
Beispiel #29
0
    def __init__(self, version, payload, session_sid, sid=None):
        """
        Initialize the MessageInstance

        :returns: twilio.rest.messaging.v1.session.message.MessageInstance
        :rtype: twilio.rest.messaging.v1.session.message.MessageInstance
        """
        super(MessageInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'messaging_service_sid': payload['messaging_service_sid'],
            'session_sid': payload['session_sid'],
            'sid': payload['sid'],
            'index': deserialize.integer(payload['index']),
            'author': payload['author'],
            'body': payload['body'],
            'attributes': payload['attributes'],
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {'session_sid': session_sid, 'sid': sid or self._properties['sid'], }
Beispiel #30
0
    def __init__(self, version, payload, service_sid, sid=None):
        """
        Initialize the SessionInstance

        :returns: twilio.rest.preview.proxy.service.session.SessionInstance
        :rtype: twilio.rest.preview.proxy.service.session.SessionInstance
        """
        super(SessionInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'service_sid': payload['service_sid'],
            'account_sid': payload['account_sid'],
            'unique_name': payload['unique_name'],
            'ttl': deserialize.integer(payload['ttl']),
            'status': payload['status'],
            'start_time': deserialize.iso8601_datetime(payload['start_time']),
            'end_time': deserialize.iso8601_datetime(payload['end_time']),
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'service_sid': service_sid, 'sid': sid or self._properties['sid'], }
Beispiel #31
0
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the MessageInstance

        :returns: twilio_code.rest.api.v2010.account.message.MessageInstance
        :rtype: twilio.rest.api.v2010.account.message.MessageInstance
        """
        super(MessageInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'api_version': payload['api_version'],
            'body': payload['body'],
            'date_created':
            deserialize.rfc2822_datetime(payload['date_created']),
            'date_updated':
            deserialize.rfc2822_datetime(payload['date_updated']),
            'date_sent': deserialize.rfc2822_datetime(payload['date_sent']),
            'direction': payload['direction'],
            'error_code': deserialize.integer(payload['error_code']),
            'error_message': payload['error_message'],
            'from_': payload['from'],
            'messaging_service_sid': payload['messaging_service_sid'],
            'num_media': payload['num_media'],
            'num_segments': payload['num_segments'],
            'price': deserialize.decimal(payload['price']),
            'price_unit': payload['price_unit'],
            'sid': payload['sid'],
            'status': payload['status'],
            'subresource_uris': payload['subresource_uris'],
            'to': payload['to'],
            'uri': payload['uri'],
        }

        # Context
        self._context = None
        self._solution = {
            'account_sid': account_sid,
            'sid': sid or self._properties['sid'],
        }
Beispiel #32
0
    def __init__(self, version, payload, conversation_sid, sid=None):
        """
        Initialize the MessageInstance

        :returns: twilio.rest.conversations.v1.conversation.message.MessageInstance
        :rtype: twilio.rest.conversations.v1.conversation.message.MessageInstance
        """
        super(MessageInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid':
            payload.get('account_sid'),
            'conversation_sid':
            payload.get('conversation_sid'),
            'sid':
            payload.get('sid'),
            'index':
            deserialize.integer(payload.get('index')),
            'author':
            payload.get('author'),
            'body':
            payload.get('body'),
            'media':
            payload.get('media'),
            'attributes':
            payload.get('attributes'),
            'date_created':
            deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated':
            deserialize.iso8601_datetime(payload.get('date_updated')),
            'url':
            payload.get('url'),
        }

        # Context
        self._context = None
        self._solution = {
            'conversation_sid': conversation_sid,
            'sid': sid or self._properties['sid'],
        }
    def __init__(self, version, payload, subscription_sid):
        """
        Initialize the SubscribedEventInstance

        :returns: twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
        :rtype: twilio.rest.events.v1.subscription.subscribed_event.SubscribedEventInstance
        """
        super(SubscribedEventInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload.get('account_sid'),
            'type': payload.get('type'),
            'version': deserialize.integer(payload.get('version')),
            'subscription_sid': payload.get('subscription_sid'),
            'url': payload.get('url'),
        }

        # Context
        self._context = None
        self._solution = {'subscription_sid': subscription_sid, }
Beispiel #34
0
    def __init__(self, version, payload, id=None):
        """
        Initialize the SchemaInstance

        :returns: twilio.rest.events.v1.schema.SchemaInstance
        :rtype: twilio.rest.events.v1.schema.SchemaInstance
        """
        super(SchemaInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'id': payload.get('id'),
            'url': payload.get('url'),
            'links': payload.get('links'),
            'last_created': deserialize.iso8601_datetime(payload.get('last_created')),
            'last_version': deserialize.integer(payload.get('last_version')),
        }

        # Context
        self._context = None
        self._solution = {'id': id or self._properties['id'], }
    def __init__(self, version, payload, workspace_sid):
        """
        Initialize the WorkersRealTimeStatisticsInstance

        :returns: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance
        """
        super(WorkersRealTimeStatisticsInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload.get('account_sid'),
            'activity_statistics': payload.get('activity_statistics'),
            'total_workers': deserialize.integer(payload.get('total_workers')),
            'workspace_sid': payload.get('workspace_sid'),
            'url': payload.get('url'),
        }

        # Context
        self._context = None
        self._solution = {'workspace_sid': workspace_sid, }
    def __init__(self, version, payload, account_sid):
        """
        Initialize the ValidationRequestInstance

        :returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
        :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
        """
        super(ValidationRequestInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'phone_number': payload['phone_number'],
            'friendly_name': payload['friendly_name'],
            'validation_code': deserialize.integer(payload['validation_code']),
            'call_sid': payload['call_sid'],
        }

        # Context
        self._context = None
        self._solution = {'account_sid': account_sid, }
    def __init__(self, version, payload, service_sid, list_sid, index=None):
        """
        Initialize the SyncListItemInstance

        :returns: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance
        :rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance
        """
        super(SyncListItemInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'index':
            deserialize.integer(payload.get('index')),
            'account_sid':
            payload.get('account_sid'),
            'service_sid':
            payload.get('service_sid'),
            'list_sid':
            payload.get('list_sid'),
            'url':
            payload.get('url'),
            'revision':
            payload.get('revision'),
            'data':
            payload.get('data'),
            'date_created':
            deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated':
            deserialize.iso8601_datetime(payload.get('date_updated')),
            'created_by':
            payload.get('created_by'),
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
            'list_sid': list_sid,
            'index': index or self._properties['index'],
        }
    def __init__(self, version, payload, sid=None):
        """
        Initialize the ServiceInstance

        :returns: twilio.rest.messaging.v1.service.ServiceInstance
        :rtype: twilio.rest.messaging.v1.service.ServiceInstance
        """
        super(ServiceInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'friendly_name': payload['friendly_name'],
            'date_created':
            deserialize.iso8601_datetime(payload['date_created']),
            'date_updated':
            deserialize.iso8601_datetime(payload['date_updated']),
            'inbound_request_url': payload['inbound_request_url'],
            'inbound_method': payload['inbound_method'],
            'fallback_url': payload['fallback_url'],
            'fallback_method': payload['fallback_method'],
            'status_callback': payload['status_callback'],
            'sticky_sender': payload['sticky_sender'],
            'mms_converter': payload['mms_converter'],
            'smart_encoding': payload['smart_encoding'],
            'scan_message_content': payload['scan_message_content'],
            'fallback_to_long_code': payload['fallback_to_long_code'],
            'area_code_geomatch': payload['area_code_geomatch'],
            'synchronous_validation': payload['synchronous_validation'],
            'validity_period': deserialize.integer(payload['validity_period']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {
            'sid': sid or self._properties['sid'],
        }
Beispiel #39
0
    def __init__(self, version, payload, resource_type):
        """
        Initialize the DayInstance

        :returns: twilio.rest.preview.bulk_exports.export.day.DayInstance
        :rtype: twilio.rest.preview.bulk_exports.export.day.DayInstance
        """
        super(DayInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'redirect_to': payload.get('redirect_to'),
            'day': payload.get('day'),
            'size': deserialize.integer(payload.get('size')),
            'resource_type': payload.get('resource_type'),
        }

        # Context
        self._context = None
        self._solution = {
            'resource_type': resource_type,
        }
Beispiel #40
0
    def __init__(self, version, payload, service_sid):
        """
        Initialize the NotificationInstance

        :returns: twilio.rest.notify.v1.service.notification.NotificationInstance
        :rtype: twilio.rest.notify.v1.service.notification.NotificationInstance
        """
        super(NotificationInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'service_sid': payload['service_sid'],
            'date_created':
            deserialize.iso8601_datetime(payload['date_created']),
            'identities': payload['identities'],
            'tags': payload['tags'],
            'segments': payload['segments'],
            'priority': payload['priority'],
            'ttl': deserialize.integer(payload['ttl']),
            'title': payload['title'],
            'body': payload['body'],
            'sound': payload['sound'],
            'action': payload['action'],
            'data': payload['data'],
            'apn': payload['apn'],
            'gcm': payload['gcm'],
            'fcm': payload['fcm'],
            'sms': payload['sms'],
            'facebook_messenger': payload['facebook_messenger'],
            'alexa': payload['alexa'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
        }
Beispiel #41
0
    def __init__(self, version, payload, account_sid, call_sid):
        """
        Initialize the FeedbackInstance

        :returns: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
        """
        super(FeedbackInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload.get('account_sid'),
            'date_created': deserialize.rfc2822_datetime(payload.get('date_created')),
            'date_updated': deserialize.rfc2822_datetime(payload.get('date_updated')),
            'issues': payload.get('issues'),
            'quality_score': deserialize.integer(payload.get('quality_score')),
            'sid': payload.get('sid'),
        }

        # Context
        self._context = None
        self._solution = {'account_sid': account_sid, 'call_sid': call_sid, }
Beispiel #42
0
    def __init__(self, version, payload, resource_type, day=None):
        """
        Initialize the DayInstance

        :returns: twilio.rest.bulkexports.v1.export.day.DayInstance
        :rtype: twilio.rest.bulkexports.v1.export.day.DayInstance
        """
        super(DayInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'redirect_to': payload.get('redirect_to'),
            'day': payload.get('day'),
            'size': deserialize.integer(payload.get('size')),
            'create_date': payload.get('create_date'),
            'friendly_name': payload.get('friendly_name'),
            'resource_type': payload.get('resource_type'),
        }

        # Context
        self._context = None
        self._solution = {'resource_type': resource_type, 'day': day or self._properties['day'], }
Beispiel #43
0
    def __init__(self, version, payload, service_sid, channel_sid, sid=None):
        """
        Initialize the MessageInstance

        :returns: twilio.rest.chat.v2.service.channel.message.MessageInstance
        :rtype: twilio.rest.chat.v2.service.channel.message.MessageInstance
        """
        super(MessageInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'attributes': payload['attributes'],
            'service_sid': payload['service_sid'],
            'to': payload['to'],
            'channel_sid': payload['channel_sid'],
            'date_created':
            deserialize.iso8601_datetime(payload['date_created']),
            'date_updated':
            deserialize.iso8601_datetime(payload['date_updated']),
            'last_updated_by': payload['last_updated_by'],
            'was_edited': payload['was_edited'],
            'from_': payload['from'],
            'body': payload['body'],
            'index': deserialize.integer(payload['index']),
            'type': payload['type'],
            'media': payload['media'],
            'url': payload['url'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
            'channel_sid': channel_sid,
            'sid': sid or self._properties['sid'],
        }
    def __init__(self, version, payload, assistant_sid):
        """
        Initialize the ExportAssistantInstance

        :returns: twilio.rest.autopilot.v1.assistant.export_assistant.ExportAssistantInstance
        :rtype: twilio.rest.autopilot.v1.assistant.export_assistant.ExportAssistantInstance
        """
        super(ExportAssistantInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload.get('account_sid'),
            'assistant_sid': payload.get('assistant_sid'),
            'date_created': deserialize.iso8601_datetime(payload.get('date_created')),
            'status': payload.get('status'),
            'error_code': deserialize.integer(payload.get('error_code')),
            'url': payload.get('url'),
            'schema': payload.get('schema'),
        }

        # Context
        self._context = None
        self._solution = {'assistant_sid': assistant_sid, }
Beispiel #45
0
    def __init__(self, version, payload, workspace_sid, sid=None):
        """
        Initialize the EventInstance

        :returns: twilio.rest.taskrouter.v1.workspace.event.EventInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.event.EventInstance
        """
        super(EventInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload.get('account_sid'),
            'actor_sid': payload.get('actor_sid'),
            'actor_type': payload.get('actor_type'),
            'actor_url': payload.get('actor_url'),
            'description': payload.get('description'),
            'event_data': payload.get('event_data'),
            'event_date':
            deserialize.iso8601_datetime(payload.get('event_date')),
            'event_date_ms': deserialize.integer(payload.get('event_date_ms')),
            'event_type': payload.get('event_type'),
            'resource_sid': payload.get('resource_sid'),
            'resource_type': payload.get('resource_type'),
            'resource_url': payload.get('resource_url'),
            'sid': payload.get('sid'),
            'source': payload.get('source'),
            'source_ip_address': payload.get('source_ip_address'),
            'url': payload.get('url'),
            'workspace_sid': payload.get('workspace_sid'),
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'sid': sid or self._properties['sid'],
        }
Beispiel #46
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the IpRecordInstance

        :returns: twilio.rest.voice.v1.ip_record.IpRecordInstance
        :rtype: twilio.rest.voice.v1.ip_record.IpRecordInstance
        """
        super(IpRecordInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload.get('account_sid'),
            'sid': payload.get('sid'),
            'friendly_name': payload.get('friendly_name'),
            'ip_address': payload.get('ip_address'),
            'cidr_prefix_length': deserialize.integer(payload.get('cidr_prefix_length')),
            'date_created': deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated': deserialize.iso8601_datetime(payload.get('date_updated')),
            'url': payload.get('url'),
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }
Beispiel #47
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the ServiceInstance

        :returns: twilio.rest.preview.acc_security.service.ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        super(ServiceInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'account_sid': payload['account_sid'],
            'name': payload['name'],
            'code_length': deserialize.integer(payload['code_length']),
            'date_created': deserialize.iso8601_datetime(payload['date_created']),
            'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
            'url': payload['url'],
            'links': payload['links'],
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid']}
Beispiel #48
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the FlowInstance

        :returns: twilio.rest.studio.v1.flow.FlowInstance
        :rtype: twilio.rest.studio.v1.flow.FlowInstance
        """
        super(FlowInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid':
            payload.get('sid'),
            'account_sid':
            payload.get('account_sid'),
            'friendly_name':
            payload.get('friendly_name'),
            'status':
            payload.get('status'),
            'version':
            deserialize.integer(payload.get('version')),
            'date_created':
            deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated':
            deserialize.iso8601_datetime(payload.get('date_updated')),
            'url':
            payload.get('url'),
            'links':
            payload.get('links'),
        }

        # Context
        self._context = None
        self._solution = {
            'sid': sid or self._properties['sid'],
        }
Beispiel #49
0
    def __init__(self, version, payload, workspace_sid):
        """
        Initialize the WorkersCumulativeStatisticsInstance

        :returns: twilio.rest.taskrouter.v1.workspace.worker.workers_cumulative_statistics.WorkersCumulativeStatisticsInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.worker.workers_cumulative_statistics.WorkersCumulativeStatisticsInstance
        """
        super(WorkersCumulativeStatisticsInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid':
            payload['account_sid'],
            'start_time':
            deserialize.iso8601_datetime(payload['start_time']),
            'end_time':
            deserialize.iso8601_datetime(payload['end_time']),
            'activity_durations':
            payload['activity_durations'],
            'reservations_created':
            deserialize.integer(payload['reservations_created']),
            'reservations_accepted':
            deserialize.integer(payload['reservations_accepted']),
            'reservations_rejected':
            deserialize.integer(payload['reservations_rejected']),
            'reservations_timed_out':
            deserialize.integer(payload['reservations_timed_out']),
            'reservations_canceled':
            deserialize.integer(payload['reservations_canceled']),
            'reservations_rescinded':
            deserialize.integer(payload['reservations_rescinded']),
            'workspace_sid':
            payload['workspace_sid'],
            'url':
            payload['url'],
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
        }
    def __init__(self, version, payload, workspace_sid, workflow_sid):
        """
        Initialize the WorkflowCumulativeStatisticsInstance

        :returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_cumulative_statistics.WorkflowCumulativeStatisticsInstance
        """
        super(WorkflowCumulativeStatisticsInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid':
            payload.get('account_sid'),
            'avg_task_acceptance_time':
            deserialize.integer(payload.get('avg_task_acceptance_time')),
            'start_time':
            deserialize.iso8601_datetime(payload.get('start_time')),
            'end_time':
            deserialize.iso8601_datetime(payload.get('end_time')),
            'reservations_created':
            deserialize.integer(payload.get('reservations_created')),
            'reservations_accepted':
            deserialize.integer(payload.get('reservations_accepted')),
            'reservations_rejected':
            deserialize.integer(payload.get('reservations_rejected')),
            'reservations_timed_out':
            deserialize.integer(payload.get('reservations_timed_out')),
            'reservations_canceled':
            deserialize.integer(payload.get('reservations_canceled')),
            'reservations_rescinded':
            deserialize.integer(payload.get('reservations_rescinded')),
            'split_by_wait_time':
            payload.get('split_by_wait_time'),
            'wait_duration_until_accepted':
            payload.get('wait_duration_until_accepted'),
            'wait_duration_until_canceled':
            payload.get('wait_duration_until_canceled'),
            'tasks_canceled':
            deserialize.integer(payload.get('tasks_canceled')),
            'tasks_completed':
            deserialize.integer(payload.get('tasks_completed')),
            'tasks_entered':
            deserialize.integer(payload.get('tasks_entered')),
            'tasks_deleted':
            deserialize.integer(payload.get('tasks_deleted')),
            'tasks_moved':
            deserialize.integer(payload.get('tasks_moved')),
            'tasks_timed_out_in_workflow':
            deserialize.integer(payload.get('tasks_timed_out_in_workflow')),
            'workflow_sid':
            payload.get('workflow_sid'),
            'workspace_sid':
            payload.get('workspace_sid'),
            'url':
            payload.get('url'),
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'workflow_sid': workflow_sid,
        }
 def test_zero(self):
     self.assertEqual(0, deserialize.integer(0))
 def test_negative(self):
     self.assertEqual(-1, deserialize.integer(-1))
Beispiel #53
0
    def __init__(self, version, payload, signing_document_sid):
        """
        Initialize the DependentHostedNumberOrderInstance

        :returns: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance
        :rtype: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance
        """
        super(DependentHostedNumberOrderInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid':
            payload.get('sid'),
            'account_sid':
            payload.get('account_sid'),
            'incoming_phone_number_sid':
            payload.get('incoming_phone_number_sid'),
            'address_sid':
            payload.get('address_sid'),
            'signing_document_sid':
            payload.get('signing_document_sid'),
            'phone_number':
            payload.get('phone_number'),
            'capabilities':
            payload.get('capabilities'),
            'friendly_name':
            payload.get('friendly_name'),
            'unique_name':
            payload.get('unique_name'),
            'status':
            payload.get('status'),
            'failure_reason':
            payload.get('failure_reason'),
            'date_created':
            deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated':
            deserialize.iso8601_datetime(payload.get('date_updated')),
            'verification_attempts':
            deserialize.integer(payload.get('verification_attempts')),
            'email':
            payload.get('email'),
            'cc_emails':
            payload.get('cc_emails'),
            'verification_type':
            payload.get('verification_type'),
            'verification_document_sid':
            payload.get('verification_document_sid'),
            'extension':
            payload.get('extension'),
            'call_delay':
            deserialize.integer(payload.get('call_delay')),
            'verification_code':
            payload.get('verification_code'),
            'verification_call_sids':
            payload.get('verification_call_sids'),
        }

        # Context
        self._context = None
        self._solution = {
            'signing_document_sid': signing_document_sid,
        }
 def test_positive(self):
     self.assertEqual(1, deserialize.integer(1))
    def __init__(self, version, payload, conference_sid, participant_sid=None):
        """
        Initialize the ConferenceParticipantInstance

        :returns: twilio.rest.insights.v1.conference.conference_participant.ConferenceParticipantInstance
        :rtype: twilio.rest.insights.v1.conference.conference_participant.ConferenceParticipantInstance
        """
        super(ConferenceParticipantInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'participant_sid':
            payload.get('participant_sid'),
            'label':
            payload.get('label'),
            'conference_sid':
            payload.get('conference_sid'),
            'call_sid':
            payload.get('call_sid'),
            'account_sid':
            payload.get('account_sid'),
            'call_direction':
            payload.get('call_direction'),
            'from_':
            payload.get('from'),
            'to':
            payload.get('to'),
            'call_state':
            payload.get('call_state'),
            'country_code':
            payload.get('country_code'),
            'is_moderator':
            payload.get('is_moderator'),
            'join_time':
            deserialize.iso8601_datetime(payload.get('join_time')),
            'leave_time':
            deserialize.iso8601_datetime(payload.get('leave_time')),
            'duration_seconds':
            deserialize.integer(payload.get('duration_seconds')),
            'whisper':
            payload.get('whisper'),
            'agent_audio':
            payload.get('agent_audio'),
            'outbound_queue_length':
            deserialize.integer(payload.get('outbound_queue_length')),
            'outbound_time_in_queue':
            deserialize.integer(payload.get('outbound_time_in_queue')),
            'jitter_buffer_size':
            payload.get('jitter_buffer_size'),
            'is_coach':
            payload.get('is_coach'),
            'coached_participants':
            payload.get('coached_participants'),
            'participant_region':
            payload.get('participant_region'),
            'conference_region':
            payload.get('conference_region'),
            'call_type':
            payload.get('call_type'),
            'quality_issues':
            deserialize.integer(payload.get('quality_issues')),
            'properties':
            payload.get('properties'),
            'events':
            payload.get('events'),
            'metrics':
            payload.get('metrics'),
            'url':
            payload.get('url'),
        }

        # Context
        self._context = None
        self._solution = {
            'conference_sid':
            conference_sid,
            'participant_sid':
            participant_sid or self._properties['participant_sid'],
        }
Beispiel #56
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the RoomInstance

        :returns: twilio.rest.video.v1.room.RoomInstance
        :rtype: twilio.rest.video.v1.room.RoomInstance
        """
        super(RoomInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid':
            payload.get('sid'),
            'status':
            payload.get('status'),
            'date_created':
            deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated':
            deserialize.iso8601_datetime(payload.get('date_updated')),
            'account_sid':
            payload.get('account_sid'),
            'enable_turn':
            payload.get('enable_turn'),
            'unique_name':
            payload.get('unique_name'),
            'status_callback':
            payload.get('status_callback'),
            'status_callback_method':
            payload.get('status_callback_method'),
            'end_time':
            deserialize.iso8601_datetime(payload.get('end_time')),
            'duration':
            deserialize.integer(payload.get('duration')),
            'type':
            payload.get('type'),
            'max_participants':
            deserialize.integer(payload.get('max_participants')),
            'max_participant_duration':
            deserialize.integer(payload.get('max_participant_duration')),
            'max_concurrent_published_tracks':
            deserialize.integer(
                payload.get('max_concurrent_published_tracks')),
            'record_participants_on_connect':
            payload.get('record_participants_on_connect'),
            'video_codecs':
            payload.get('video_codecs'),
            'media_region':
            payload.get('media_region'),
            'audio_only':
            payload.get('audio_only'),
            'empty_room_timeout':
            deserialize.integer(payload.get('empty_room_timeout')),
            'unused_room_timeout':
            deserialize.integer(payload.get('unused_room_timeout')),
            'url':
            payload.get('url'),
            'links':
            payload.get('links'),
        }

        # Context
        self._context = None
        self._solution = {
            'sid': sid or self._properties['sid'],
        }
 def test_positive_string(self):
     self.assertEqual(1, deserialize.integer('1'))
Beispiel #58
0
    def __init__(self, version, payload, room_sid=None):
        """
        Initialize the RoomInstance

        :returns: twilio.rest.insights.v1.room.RoomInstance
        :rtype: twilio.rest.insights.v1.room.RoomInstance
        """
        super(RoomInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid':
            payload.get('account_sid'),
            'room_sid':
            payload.get('room_sid'),
            'room_name':
            payload.get('room_name'),
            'create_time':
            deserialize.iso8601_datetime(payload.get('create_time')),
            'end_time':
            deserialize.iso8601_datetime(payload.get('end_time')),
            'room_type':
            payload.get('room_type'),
            'room_status':
            payload.get('room_status'),
            'status_callback':
            payload.get('status_callback'),
            'status_callback_method':
            payload.get('status_callback_method'),
            'created_method':
            payload.get('created_method'),
            'end_reason':
            payload.get('end_reason'),
            'max_participants':
            deserialize.integer(payload.get('max_participants')),
            'unique_participants':
            deserialize.integer(payload.get('unique_participants')),
            'unique_participant_identities':
            deserialize.integer(payload.get('unique_participant_identities')),
            'concurrent_participants':
            deserialize.integer(payload.get('concurrent_participants')),
            'max_concurrent_participants':
            deserialize.integer(payload.get('max_concurrent_participants')),
            'codecs':
            payload.get('codecs'),
            'media_region':
            payload.get('media_region'),
            'duration_sec':
            deserialize.integer(payload.get('duration_sec')),
            'total_participant_duration_sec':
            deserialize.integer(payload.get('total_participant_duration_sec')),
            'total_recording_duration_sec':
            deserialize.integer(payload.get('total_recording_duration_sec')),
            'processing_state':
            payload.get('processing_state'),
            'recording_enabled':
            payload.get('recording_enabled'),
            'edge_location':
            payload.get('edge_location'),
            'url':
            payload.get('url'),
            'links':
            payload.get('links'),
        }

        # Context
        self._context = None
        self._solution = {
            'room_sid': room_sid or self._properties['room_sid'],
        }
    def __init__(self, version, payload, sid=None):
        """
        Initialize the ServiceInstance

        :returns: twilio.rest.chat.v2.service.ServiceInstance
        :rtype: twilio.rest.chat.v2.service.ServiceInstance
        """
        super(ServiceInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid':
            payload['sid'],
            'account_sid':
            payload['account_sid'],
            'friendly_name':
            payload['friendly_name'],
            'date_created':
            deserialize.iso8601_datetime(payload['date_created']),
            'date_updated':
            deserialize.iso8601_datetime(payload['date_updated']),
            'default_service_role_sid':
            payload['default_service_role_sid'],
            'default_channel_role_sid':
            payload['default_channel_role_sid'],
            'default_channel_creator_role_sid':
            payload['default_channel_creator_role_sid'],
            'read_status_enabled':
            payload['read_status_enabled'],
            'reachability_enabled':
            payload['reachability_enabled'],
            'typing_indicator_timeout':
            deserialize.integer(payload['typing_indicator_timeout']),
            'consumption_report_interval':
            deserialize.integer(payload['consumption_report_interval']),
            'limits':
            payload['limits'],
            'pre_webhook_url':
            payload['pre_webhook_url'],
            'post_webhook_url':
            payload['post_webhook_url'],
            'webhook_method':
            payload['webhook_method'],
            'webhook_filters':
            payload['webhook_filters'],
            'pre_webhook_retry_count':
            deserialize.integer(payload['pre_webhook_retry_count']),
            'post_webhook_retry_count':
            deserialize.integer(payload['post_webhook_retry_count']),
            'notifications':
            payload['notifications'],
            'media':
            payload['media'],
            'url':
            payload['url'],
            'links':
            payload['links'],
        }

        # Context
        self._context = None
        self._solution = {
            'sid': sid or self._properties['sid'],
        }
Beispiel #60
0
    def __init__(self, version, payload, workspace_sid, sid=None):
        """
        Initialize the TaskInstance

        :returns: twilio.rest.taskrouter.v1.workspace.task.TaskInstance
        :rtype: twilio.rest.taskrouter.v1.workspace.task.TaskInstance
        """
        super(TaskInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid':
            payload.get('account_sid'),
            'age':
            deserialize.integer(payload.get('age')),
            'assignment_status':
            payload.get('assignment_status'),
            'attributes':
            payload.get('attributes'),
            'addons':
            payload.get('addons'),
            'date_created':
            deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated':
            deserialize.iso8601_datetime(payload.get('date_updated')),
            'task_queue_entered_date':
            deserialize.iso8601_datetime(
                payload.get('task_queue_entered_date')),
            'priority':
            deserialize.integer(payload.get('priority')),
            'reason':
            payload.get('reason'),
            'sid':
            payload.get('sid'),
            'task_queue_sid':
            payload.get('task_queue_sid'),
            'task_queue_friendly_name':
            payload.get('task_queue_friendly_name'),
            'task_channel_sid':
            payload.get('task_channel_sid'),
            'task_channel_unique_name':
            payload.get('task_channel_unique_name'),
            'timeout':
            deserialize.integer(payload.get('timeout')),
            'workflow_sid':
            payload.get('workflow_sid'),
            'workflow_friendly_name':
            payload.get('workflow_friendly_name'),
            'workspace_sid':
            payload.get('workspace_sid'),
            'url':
            payload.get('url'),
            'links':
            payload.get('links'),
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'sid': sid or self._properties['sid'],
        }