Example #1
0
    def create(self, start_date, end_date, include_subaccounts=values.unset,
               status_callback=values.unset, status_callback_method=values.unset):
        """
        Create a new FeedbackSummaryInstance

        :param date start_date: Only include usage that has occurred on or after this date.
        :param date end_date: Only include usage that has occurred on or before this date.
        :param bool include_subaccounts: true to include feedback entries for the master account and all subaccounts.
        :param unicode status_callback: The URL that Twilio will request when the Feedback Summary is completed.
        :param unicode status_callback_method: The HTTP method Twilio will use to make requests to the StatusCallback URL.

        :returns: Newly created FeedbackSummaryInstance
        :rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
        """
        data = values.of({
            'StartDate': serialize.iso8601_date(start_date),
            'EndDate': serialize.iso8601_date(end_date),
            'IncludeSubaccounts': include_subaccounts,
            'StatusCallback': status_callback,
            'StatusCallbackMethod': status_callback_method,
        })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return FeedbackSummaryInstance(self._version, payload, account_sid=self._solution['account_sid'], )
Example #2
0
    def page(self, date_created_before=values.unset, date_created=values.unset,
             date_created_after=values.unset, page_token=values.unset,
             page_number=values.unset, page_size=values.unset):
        """
        Retrieve a single page of RecordingInstance records from the API.
        Request is executed immediately

        :param date date_created_before: Filter by date created
        :param date date_created: Filter by date created
        :param date date_created_after: Filter by date created
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of RecordingInstance
        :rtype: twilio.rest.api.v2010.account.conference.recording.RecordingPage
        """
        params = values.of({
            'DateCreated<': serialize.iso8601_date(date_created_before),
            'DateCreated': serialize.iso8601_date(date_created),
            'DateCreated>': serialize.iso8601_date(date_created_after),
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return RecordingPage(self._version, response, self._solution)
Example #3
0
    def page(self,
             log=values.unset,
             message_date_before=values.unset,
             message_date=values.unset,
             message_date_after=values.unset,
             page_token=values.unset,
             page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of NotificationInstance records from the API.
        Request is executed immediately

        :param unicode log: The log
        :param date message_date_before: The message_date
        :param date message_date: The message_date
        :param date message_date_after: The message_date
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of NotificationInstance
        :rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage
        """
        params = values.of({
            'Log':
            log,
            'MessageDate<':
            serialize.iso8601_date(message_date_before),
            'MessageDate':
            serialize.iso8601_date(message_date),
            'MessageDate>':
            serialize.iso8601_date(message_date_after),
            'PageToken':
            page_token,
            'Page':
            page_number,
            'PageSize':
            page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return NotificationPage(self._version, response, self._solution)
    def page(self,
             category=values.unset,
             start_date=values.unset,
             end_date=values.unset,
             include_subaccounts=values.unset,
             page_token=values.unset,
             page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of YesterdayInstance records from the API.
        Request is executed immediately

        :param YesterdayInstance.Category category: Only include usage of this usage category.
        :param date start_date: Only include usage that has occurred on or after this date.
        :param date end_date: Only include usage that has occurred on or before this date.
        :param bool include_subaccounts: The include_subaccounts
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of YesterdayInstance
        :rtype: twilio.rest.api.v2010.account.usage.record.yesterday.YesterdayPage
        """
        params = values.of({
            'Category': category,
            'StartDate': serialize.iso8601_date(start_date),
            'EndDate': serialize.iso8601_date(end_date),
            'IncludeSubaccounts': include_subaccounts,
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return YesterdayPage(self._version, response, self._solution)
Example #5
0
    def page(self,
             start_date=values.unset,
             end_date=values.unset,
             identity=values.unset,
             tag=values.unset,
             page_token=values.unset,
             page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of BindingInstance records from the API.
        Request is executed immediately

        :param date start_date: Only list Bindings created on or after the given date.
        :param date end_date: Only list Bindings created on or before the given date.
        :param unicode identity: Only list Bindings that have any of the specified Identities.
        :param unicode tag: Only list Bindings that have all of the specified Tags.
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of BindingInstance
        :rtype: twilio.rest.notify.v1.service.binding.BindingPage
        """
        params = values.of({
            'StartDate': serialize.iso8601_date(start_date),
            'EndDate': serialize.iso8601_date(end_date),
            'Identity': serialize.map(identity, lambda e: e),
            'Tag': serialize.map(tag, lambda e: e),
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return BindingPage(self._version, response, self._solution)
Example #6
0
    def page(self,
             log_level=values.unset,
             start_date=values.unset,
             end_date=values.unset,
             page_token=values.unset,
             page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of AlertInstance records from the API.
        Request is executed immediately

        :param unicode log_level: Only show alerts for this log-level.
        :param date start_date: Only show Alerts on or after this date.
        :param date end_date: Only show Alerts on or before this date.
        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of AlertInstance
        :rtype: twilio.rest.monitor.v1.alert.AlertPage
        """
        params = values.of({
            'LogLevel': log_level,
            'StartDate': serialize.iso8601_date(start_date),
            'EndDate': serialize.iso8601_date(end_date),
            'PageToken': page_token,
            'Page': page_number,
            'PageSize': page_size,
        })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return AlertPage(self._version, response, self._solution)