Ejemplo n.º 1
0
 def __init__(self, version, payload, account_sid, sid=None):
     """
     Initialize the FeedbackSummaryInstance
     
     :returns: FeedbackSummaryInstance
     :rtype: 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'],
     }
Ejemplo n.º 2
0
    def __init__(self, version, payload, workspace_sid, sid=None):
        """
        Initialize the TaskInstance
        
        :returns: TaskInstance
        :rtype: TaskInstance
        """
        super(TaskInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'account_sid': payload['account_sid'],
            'age': deserialize.integer(payload['age']),
            'assignment_status': payload['assignment_status'],
            'attributes': payload['attributes'],
            'date_created':
            deserialize.iso8601_datetime(payload['date_created']),
            'date_updated':
            deserialize.iso8601_datetime(payload['date_updated']),
            'priority': deserialize.integer(payload['priority']),
            'reason': payload['reason'],
            'sid': payload['sid'],
            'task_queue_sid': payload['task_queue_sid'],
            'timeout': deserialize.integer(payload['timeout']),
            'workflow_sid': payload['workflow_sid'],
            'workspace_sid': payload['workspace_sid'],
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'sid': sid or self._properties['sid'],
        }
Ejemplo n.º 3
0
    def __init__(self, version, payload, trunk_sid, sid=None):
        """
        Initialize the OriginationUrlInstance
        
        :returns: OriginationUrlInstance
        :rtype: 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'],
        }
Ejemplo n.º 4
0
 def __init__(self, version, payload, workspace_sid, sid=None):
     """
     Initialize the TaskInstance
     
     :returns: TaskInstance
     :rtype: TaskInstance
     """
     super(TaskInstance, self).__init__(version)
     
     # Marshaled Properties
     self._properties = {
         'account_sid': payload['account_sid'],
         'age': deserialize.integer(payload['age']),
         'assignment_status': payload['assignment_status'],
         'attributes': payload['attributes'],
         'date_created': deserialize.iso8601_datetime(payload['date_created']),
         'date_updated': deserialize.iso8601_datetime(payload['date_updated']),
         'priority': deserialize.integer(payload['priority']),
         'reason': payload['reason'],
         'sid': payload['sid'],
         'task_queue_sid': payload['task_queue_sid'],
         'timeout': deserialize.integer(payload['timeout']),
         'workflow_sid': payload['workflow_sid'],
         'workspace_sid': payload['workspace_sid'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'workspace_sid': workspace_sid,
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 5
0
 def __init__(self, version, payload, trunk_sid, sid=None):
     """
     Initialize the OriginationUrlInstance
     
     :returns: OriginationUrlInstance
     :rtype: 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'],
     }
Ejemplo n.º 6
0
    def __init__(self, version, payload, sid=None):
        """
        Initialize the RatePlanInstance
        
        :returns: RatePlanInstance
        :rtype: RatePlanInstance
        """
        super(RatePlanInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload['sid'],
            'alias': payload['alias'],
            'account_sid': payload['account_sid'],
            'friendly_name': payload['friendly_name'],
            'data_metering': payload['data_metering'],
            'capabilities': payload['capabilities'],
            'voice_cap': deserialize.integer(payload['voice_cap']),
            'messaging_cap': deserialize.integer(payload['messaging_cap']),
            'commands_cap': deserialize.integer(payload['commands_cap']),
            'data_cap': deserialize.integer(payload['data_cap']),
            'cap_period': deserialize.integer(payload['cap_period']),
            'cap_unit': payload['cap_unit'],
            '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'],
        }
Ejemplo n.º 7
0
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the QueueInstance
        
        :returns: QueueInstance
        :rtype: 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'],
        }

        # Context
        self._context = None
        self._solution = {
            'account_sid': account_sid,
            'sid': sid or self._properties['sid'],
        }
Ejemplo n.º 8
0
 def __init__(self, version, payload, sid=None):
     """
     Initialize the ServiceInstance
     
     :returns: ServiceInstance
     :rtype: 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'],
         'typing_indicator_timeout': deserialize.integer(payload['typing_indicator_timeout']),
         'consumption_report_interval': deserialize.integer(payload['consumption_report_interval']),
         'webhooks': payload['webhooks'],
         'url': payload['url'],
         'links': payload['links'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 9
0
    def __init__(self,
                 version,
                 payload,
                 account_sid,
                 queue_sid,
                 call_sid=None):
        """
        Initialize the MemberInstance
        
        :returns: MemberInstance
        :rtype: 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'],
        }
Ejemplo n.º 10
0
 def __init__(self, version, payload, account_sid, queue_sid, call_sid=None):
     """
     Initialize the MemberInstance
     
     :returns: MemberInstance
     :rtype: 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'],
     }
Ejemplo n.º 11
0
 def __init__(self, version, payload, account_sid, sid=None):
     """
     Initialize the QueueInstance
     
     :returns: QueueInstance
     :rtype: 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'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'account_sid': account_sid,
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 12
0
 def __init__(self, version, payload, conversation_sid, sid=None):
     """
     Initialize the ParticipantInstance
     
     :returns: ParticipantInstance
     :rtype: ParticipantInstance
     """
     super(ParticipantInstance, self).__init__(version)
     
     # Marshaled Properties
     self._properties = {
         'sid': payload['sid'],
         'address': payload['address'],
         'status': payload['status'],
         'conversation_sid': payload['conversation_sid'],
         'date_created': deserialize.iso8601_datetime(payload['date_created']),
         'start_time': deserialize.iso8601_datetime(payload['start_time']),
         'end_time': deserialize.iso8601_datetime(payload['end_time']),
         'duration': deserialize.integer(payload['duration']),
         'account_sid': payload['account_sid'],
         'url': payload['url'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'conversation_sid': conversation_sid,
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 13
0
 def __init__(self, version, payload, workspace_sid, sid=None):
     """
     Initialize the TaskQueueInstance
     
     :returns: TaskQueueInstance
     :rtype: 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'],
         'url': payload['url'],
         'workspace_sid': payload['workspace_sid'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'workspace_sid': workspace_sid,
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 14
0
 def __init__(self, version, payload, account_sid):
     """
     Initialize the SandboxInstance
     
     :returns: SandboxInstance
     :rtype: SandboxInstance
     """
     super(SandboxInstance, self).__init__(version)
     
     # Marshaled Properties
     self._properties = {
         'date_created': deserialize.rfc2822_datetime(payload['date_created']),
         'date_updated': deserialize.rfc2822_datetime(payload['date_updated']),
         'pin': deserialize.integer(payload['pin']),
         'account_sid': payload['account_sid'],
         'phone_number': payload['phone_number'],
         'application_sid': payload['application_sid'],
         'api_version': payload['api_version'],
         'voice_url': payload['voice_url'],
         'voice_method': payload['voice_method'],
         'sms_url': payload['sms_url'],
         'sms_method': payload['sms_method'],
         'status_callback': payload['status_callback'],
         'status_callback_method': payload['status_callback_method'],
         'uri': payload['uri'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'account_sid': account_sid,
     }
Ejemplo n.º 15
0
 def __init__(self, version, payload, account_sid):
     """
     Initialize the SandboxInstance
     
     :returns: SandboxInstance
     :rtype: SandboxInstance
     """
     super(SandboxInstance, self).__init__(version)
     
     # Marshaled Properties
     self._properties = {
         'date_created': deserialize.rfc2822_datetime(payload['date_created']),
         'date_updated': deserialize.rfc2822_datetime(payload['date_updated']),
         'pin': deserialize.integer(payload['pin']),
         'account_sid': payload['account_sid'],
         'phone_number': payload['phone_number'],
         'application_sid': payload['application_sid'],
         'api_version': payload['api_version'],
         'voice_url': payload['voice_url'],
         'voice_method': payload['voice_method'],
         'sms_url': payload['sms_url'],
         'sms_method': payload['sms_method'],
         'status_callback': payload['status_callback'],
         'status_callback_method': payload['status_callback_method'],
         'uri': payload['uri'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'account_sid': account_sid,
     }
Ejemplo n.º 16
0
 def __init__(self, version, payload, workspace_sid, sid=None):
     """
     Initialize the TaskQueueInstance
     
     :returns: TaskQueueInstance
     :rtype: 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'],
         'url': payload['url'],
         'workspace_sid': payload['workspace_sid'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'workspace_sid': workspace_sid,
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 17
0
 def __init__(self, version, payload, workspace_sid, sid=None):
     """
     Initialize the WorkflowInstance
     
     :returns: WorkflowInstance
     :rtype: 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'],
     }
     
     # Context
     self._context = None
     self._solution = {
         'workspace_sid': workspace_sid,
         'sid': sid or self._properties['sid'],
     }
Ejemplo n.º 18
0
    def __init__(self, version, payload, account_sid, call_sid):
        """
        Initialize the FeedbackInstance
        
        :returns: FeedbackInstance
        :rtype: FeedbackInstance
        """
        super(FeedbackInstance, self).__init__(version)

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

        # Context
        self._context = None
        self._solution = {
            'account_sid': account_sid,
            'call_sid': call_sid,
        }
Ejemplo n.º 19
0
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the FeedbackSummaryInstance
        
        :returns: FeedbackSummaryInstance
        :rtype: 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'],
        }
Ejemplo n.º 20
0
    def __init__(self, version, payload, workspace_sid, sid=None):
        """
        Initialize the WorkflowInstance
        
        :returns: WorkflowInstance
        :rtype: 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'],
        }

        # Context
        self._context = None
        self._solution = {
            'workspace_sid': workspace_sid,
            'sid': sid or self._properties['sid'],
        }
Ejemplo n.º 21
0
    def __init__(self, version, payload, account_sid, sid=None):
        """
        Initialize the MessageInstance
        
        :returns: MessageInstance
        :rtype: 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'],
            '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'],
        }
Ejemplo n.º 22
0
 def __init__(self, version, payload, account_sid, sid=None):
     """
     Initialize the MessageInstance
     
     :returns: MessageInstance
     :rtype: 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'],
         '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'],
     }
Ejemplo n.º 23
0
    def __init__(self, version, payload, account_sid):
        """
        Initialize the ValidationRequestInstance
        
        :returns: ValidationRequestInstance
        :rtype: 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,
        }
Ejemplo n.º 24
0
    def __init__(self, version, payload, service_sid):
        """
        Initialize the NotificationInstance
        
        :returns: NotificationInstance
        :rtype: 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'],
            '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'],
            'sms': payload['sms'],
            'facebook_messenger': payload['facebook_messenger'],
        }

        # Context
        self._context = None
        self._solution = {
            'service_sid': service_sid,
        }
Ejemplo n.º 25
0
 def __init__(self, version, payload):
     """
     Initialize the CompletedInstance
     
     :returns: CompletedInstance
     :rtype: CompletedInstance
     """
     super(CompletedInstance, self).__init__(version)
     
     # Marshaled Properties
     self._properties = {
         'sid': payload['sid'],
         'status': payload['status'],
         'duration': deserialize.integer(payload['duration']),
         'date_created': deserialize.iso8601_datetime(payload['date_created']),
         'start_time': deserialize.iso8601_datetime(payload['start_time']),
         'end_time': deserialize.iso8601_datetime(payload['end_time']),
         'account_sid': payload['account_sid'],
         'url': payload['url'],
     }
     
     # Context
     self._context = None
     self._solution = {}
Ejemplo n.º 26
0
 def test_none(self):
     self.assertEqual(None, deserialize.integer(None))
Ejemplo n.º 27
0
 def test_empty_string(self):
     self.assertEqual('', deserialize.integer(''))
Ejemplo n.º 28
0
 def test_positive(self):
     self.assertEqual(1, deserialize.integer(1))
Ejemplo n.º 29
0
 def test_negative(self):
     self.assertEqual(-1, deserialize.integer(-1))
Ejemplo n.º 30
0
 def test_zero(self):
     self.assertEqual(0, deserialize.integer(0))
Ejemplo n.º 31
0
 def test_positive_string(self):
     self.assertEqual(1, deserialize.integer('1'))
Ejemplo n.º 32
0
 def test_zero_string(self):
     self.assertEqual(0, deserialize.integer('0'))
Ejemplo n.º 33
0
 def test_negative_string(self):
     self.assertEqual(-1, deserialize.integer('-1'))