B
    `O3                 @   s   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ G d	d
 d
e
ZG dd deZG dd deZG dd deZdS )za
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
    )deserialize)	serialize)values)InstanceContext)InstanceResource)ListResource)Pagec                   sJ   e Zd Z fddZejejejfddZdd Zdd Zd	d
 Z	  Z
S )FeedbackSummaryListc                s.   t t| | d|i| _djf | j| _dS )ay  
        Initialize the FeedbackSummaryList

        :param Version version: Version that contains the resource
        :param account_sid: The SID of the Account that created this resource

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList
        account_sidz2/Accounts/{account_sid}/Calls/FeedbackSummary.jsonN)superr	   __init__	_solutionformat_uri)selfversionr
   )	__class__ b/home/dcms/DCMS/lib/python3.7/site-packages/twilio/rest/api/v2010/account/call/feedback_summary.pyr      s    

zFeedbackSummaryList.__init__c             C   sL   t t|t||||d}| jjd| j|d}t| j|| jd dS )a  
        Create the FeedbackSummaryInstance

        :param date start_date: Only include feedback given on or after this date
        :param date end_date: Only include feedback given on or before this date
        :param bool include_subaccounts: `true` includes feedback from the specified account and its subaccounts
        :param unicode status_callback: The URL that we will request when the feedback summary is complete
        :param unicode status_callback_method: The HTTP method we use to make requests to the StatusCallback URL

        :returns: The created FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        )Z	StartDateZEndDateZIncludeSubaccountsZStatusCallbackZStatusCallbackMethodPOST)methoduridatar
   )r
   )	r   Zofr   iso8601_date_versioncreater   FeedbackSummaryInstancer   )r   
start_dateend_dateinclude_subaccountsZstatus_callbackZstatus_callback_methodr   payloadr   r   r   r   $   s    
zFeedbackSummaryList.createc             C   s   t | j| jd |dS )aD  
        Constructs a FeedbackSummaryContext

        :param sid: A string that uniquely identifies this feedback summary resource

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        r
   )r
   sid)FeedbackSummaryContextr   r   )r   r!   r   r   r   get>   s    	zFeedbackSummaryList.getc             C   s   t | j| jd |dS )aD  
        Constructs a FeedbackSummaryContext

        :param sid: A string that uniquely identifies this feedback summary resource

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        r
   )r
   r!   )r"   r   r   )r   r!   r   r   r   __call__I   s    	zFeedbackSummaryList.__call__c             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z&<Twilio.Api.V2010.FeedbackSummaryList>r   )r   r   r   r   __repr__T   s    zFeedbackSummaryList.__repr__)__name__
__module____qualname__r   r   Zunsetr   r#   r$   r%   __classcell__r   r   )r   r   r	      s   r	   c                   s,   e Zd Z fddZdd Zdd Z  ZS )FeedbackSummaryPagec                s   t t| || || _dS )a  
        Initialize the FeedbackSummaryPage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API
        :param account_sid: The SID of the Account that created this resource

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryPage
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryPage
        N)r   r*   r   r   )r   r   responseZsolution)r   r   r   r   `   s    zFeedbackSummaryPage.__init__c             C   s   t | j|| jd dS )a5  
        Build an instance of FeedbackSummaryInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        r
   )r
   )r   r   r   )r   r    r   r   r   get_instancep   s    	z FeedbackSummaryPage.get_instancec             C   s   dS )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        z&<Twilio.Api.V2010.FeedbackSummaryPage>r   )r   r   r   r   r%   {   s    zFeedbackSummaryPage.__repr__)r&   r'   r(   r   r,   r%   r)   r   r   )r   r   r*   ^   s   r*   c                   s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	r"   c                s0   t t| | ||d| _djf | j| _dS )a  
        Initialize the FeedbackSummaryContext

        :param Version version: Version that contains the resource
        :param account_sid: The unique sid that identifies this account
        :param sid: A string that uniquely identifies this feedback summary resource

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        )r
   r!   z8/Accounts/{account_sid}/Calls/FeedbackSummary/{sid}.jsonN)r   r"   r   r   r   r   )r   r   r
   r!   )r   r   r   r      s    zFeedbackSummaryContext.__init__c             C   s0   | j jd| jd}t| j || jd | jd dS )z
        Fetch the FeedbackSummaryInstance

        :returns: The fetched FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        GET)r   r   r
   r!   )r
   r!   )r   fetchr   r   r   )r   r    r   r   r   r.      s    zFeedbackSummaryContext.fetchc             C   s   | j jd| jdS )z
        Deletes the FeedbackSummaryInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        DELETE)r   r   )r   deleter   )r   r   r   r   r0      s    zFeedbackSummaryContext.deletec             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
         c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r   ).0kvr   r   r   	<genexpr>   s    z2FeedbackSummaryContext.__repr__.<locals>.<genexpr>z,<Twilio.Api.V2010.FeedbackSummaryContext {}>)joinr   itemsr   )r   contextr   r   r   r%      s    zFeedbackSummaryContext.__repr__)r&   r'   r(   r   r.   r0   r%   r)   r   r   )r   r   r"      s   	r"   c                   s   e Zd ZG dd deZd* fdd	Zedd Zedd	 Zed
d Z	edd Z
edd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zedd Zed d! Zed"d# Zd$d% Zd&d' Zd(d) Z  ZS )+r   c               @   s   e Zd ZdZdZdZdZdS )zFeedbackSummaryInstance.StatusZqueuedzin-progressZ	completedfailedN)r&   r'   r(   ZQUEUEDZIN_PROGRESSZ	COMPLETEDZFAILEDr   r   r   r   Status   s   r:   Nc                s   t t| | |dt|dt|dt|dt|dt|d|d|dt|d	t|d
t|d|dt|d|dd| _	d| _
||p| j	d d| _dS )z
        Initialize the FeedbackSummaryInstance

        :returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        r
   
call_countcall_feedback_countdate_createddate_updatedr   r   issuesquality_score_averagequality_score_median quality_score_standard_deviationr!   r   status)r
   r;   r<   r=   r>   r   r   r?   r@   rA   rB   r!   r   rC   N)r
   r!   )r   r   r   r#   r   integerZrfc2822_datetimeiso8601_datetimedecimal_properties_contextr   )r   r   r    r
   r!   )r   r   r   r      s"    z FeedbackSummaryInstance.__init__c             C   s.   | j dkr(t| j| jd | jd d| _ | j S )aU  
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: FeedbackSummaryContext for this FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
        Nr
   r!   )r
   r!   )rH   r"   r   r   )r   r   r   r   _proxy   s    	
zFeedbackSummaryInstance._proxyc             C   s
   | j d S )z_
        :returns: The unique sid that identifies this account
        :rtype: unicode
        r
   )rG   )r   r   r   r   r
      s    z#FeedbackSummaryInstance.account_sidc             C   s
   | j d S )zM
        :returns: The total number of calls
        :rtype: unicode
        r;   )rG   )r   r   r   r   r;      s    z"FeedbackSummaryInstance.call_countc             C   s
   | j d S )zc
        :returns: The total number of calls with a feedback entry
        :rtype: unicode
        r<   )rG   )r   r   r   r   r<     s    z+FeedbackSummaryInstance.call_feedback_countc             C   s
   | j d S )zW
        :returns: The date this resource was created
        :rtype: datetime
        r=   )rG   )r   r   r   r   r=     s    z$FeedbackSummaryInstance.date_createdc             C   s
   | j d S )z\
        :returns: The date this resource was last updated
        :rtype: datetime
        r>   )rG   )r   r   r   r   r>     s    z$FeedbackSummaryInstance.date_updatedc             C   s
   | j d S )zb
        :returns: The latest feedback entry date in the summary
        :rtype: datetime
        r   )rG   )r   r   r   r   r     s    z FeedbackSummaryInstance.end_datec             C   s
   | j d S )zb
        :returns: Whether the feedback summary includes subaccounts
        :rtype: bool
        r   )rG   )r   r   r   r   r   $  s    z+FeedbackSummaryInstance.include_subaccountsc             C   s
   | j d S )zV
        :returns: Issues experienced during the call
        :rtype: unicode
        r?   )rG   )r   r   r   r   r?   ,  s    zFeedbackSummaryInstance.issuesc             C   s
   | j d S )zd
        :returns: The average QualityScore of the feedback entries
        :rtype: unicode
        r@   )rG   )r   r   r   r   r@   4  s    z-FeedbackSummaryInstance.quality_score_averagec             C   s
   | j d S )zc
        :returns: The median QualityScore of the feedback entries
        :rtype: unicode
        rA   )rG   )r   r   r   r   rA   <  s    z,FeedbackSummaryInstance.quality_score_medianc             C   s
   | j d S )z`
        :returns: The standard deviation of the quality scores
        :rtype: unicode
        rB   )rG   )r   r   r   r   rB   D  s    z8FeedbackSummaryInstance.quality_score_standard_deviationc             C   s
   | j d S )zi
        :returns: A string that uniquely identifies this feedback entry
        :rtype: unicode
        r!   )rG   )r   r   r   r   r!   L  s    zFeedbackSummaryInstance.sidc             C   s
   | j d S )zd
        :returns: The earliest feedback entry date in the summary
        :rtype: datetime
        r   )rG   )r   r   r   r   r   T  s    z"FeedbackSummaryInstance.start_datec             C   s
   | j d S )zm
        :returns: The status of the feedback summary
        :rtype: FeedbackSummaryInstance.Status
        rC   )rG   )r   r   r   r   rC   \  s    zFeedbackSummaryInstance.statusc             C   s
   | j  S )z
        Fetch the FeedbackSummaryInstance

        :returns: The fetched FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        )rI   r.   )r   r   r   r   r.   d  s    zFeedbackSummaryInstance.fetchc             C   s
   | j  S )z
        Deletes the FeedbackSummaryInstance

        :returns: True if delete succeeds, False otherwise
        :rtype: bool
        )rI   r0   )r   r   r   r   r0   m  s    zFeedbackSummaryInstance.deletec             C   s$   d dd | j D }d|S )zz
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        r1   c             s   s   | ]\}}d  ||V  qdS )z{}={}N)r   )r2   r3   r4   r   r   r   r5   }  s    z3FeedbackSummaryInstance.__repr__.<locals>.<genexpr>z-<Twilio.Api.V2010.FeedbackSummaryInstance {}>)r6   r   r7   r   )r   r8   r   r   r   r%   v  s    z FeedbackSummaryInstance.__repr__)N)r&   r'   r(   objectr:   r   propertyrI   r
   r;   r<   r=   r>   r   r   r?   r@   rA   rB   r!   r   rC   r.   r0   r%   r)   r   r   )r   r   r      s(   		r   N)__doc__Ztwilio.baser   r   r   Ztwilio.base.instance_contextr   Ztwilio.base.instance_resourcer   Ztwilio.base.list_resourcer   Ztwilio.base.pager   r	   r*   r"   r   r   r   r   r   <module>   s   L'7