Example #1
0
    def get_waiver_summaries_raw(self,
                                 limit=20,
                                 verified=None,
                                 template_id='',
                                 from_dts='',
                                 to_dts=''):
        """Execute a query to find waivers, the returned objects will be waiver summaries (raw version)

        :param limit: Limit query to this number of the most recent waivers.
        :type limit: ``integer``

        :param verified: Limit query to verified by email (true) or not verified (false) or both (None).
        :type verified: ``boolean``

        :param template_id: Limit query to signed waivers of the given waiver template ID.
        :type template_id: ``string``

        :param from_dts: Limit query to waivers between this ISO 8601 date and the toDts parameter.
        :type from_dts: ``string``

        :param to_dts: Limit query to waivers between this ISO 8601 date and the fromDts parameter.
        :type to_dts: ``string``

        :return: The raw body and status code of the response from the server
        :rtype: smartwaiver.responses.SmartwaiverRawResponse
        """

        url = SmartwaiverRoutes.get_waiver_summaries(limit, verified,
                                                     template_id, from_dts,
                                                     to_dts)
        return responses.SmartwaiverRawResponse(
            requests.get(url, headers=self._headers))
Example #2
0
    def get_webhook_config_raw(self):
        """Get your account's current webhook configuration (raw version)

        :return: The raw body and status code of the response from the server
        :rtype: smartwaiver.responses.SmartwaiverRawResponse
        """

        url = SmartwaiverRoutes.get_webhook_config()
        return responses.SmartwaiverRawResponse(
            requests.get(url, headers=self._headers))
Example #3
0
    def get_waiver_templates_raw(self):
        """Get a list of waiver templates for this account (raw version)

        :return: The raw body and status code of the response from the server
        :rtype: smartwaiver.responses.SmartwaiverRawResponse
        """

        url = SmartwaiverRoutes.get_waiver_templates()
        return responses.SmartwaiverRawResponse(
            requests.get(url, headers=self._headers))
Example #4
0
    def get_waiver_template_raw(self, template_id):
        """Get a specific waiver template by providing the unique identifier (raw version)

        :param template_id: The unique identifier of the specific waiver template
        :type template_id: ``string``

        :return: The raw body and status code of the response from the server
        :rtype: smartwaiver.responses.SmartwaiverRawResponse
        """

        url = SmartwaiverRoutes.get_waiver_template(template_id)
        return responses.SmartwaiverRawResponse(
            requests.get(url, headers=self._headers))
Example #5
0
    def get_waiver_raw(self, waiver_id, pdf=False):
        """Get a specific waiver by the unique identifier (raw version)

        :param waiver_id: The Unique identifier of the waiver to retrieve
        :type waiver_id: ``string``

        :param pdf: Whether to include the Base64 Encoded PDF
        :type pdf: ``boolean``

        :return: The raw body and status code of the response from the server
        :rtype: smartwaiver.responses.SmartwaiverRawResponse
        """

        url = SmartwaiverRoutes.get_waiver(waiver_id, pdf)
        return responses.SmartwaiverRawResponse(
            requests.get(url, headers=self._headers))
Example #6
0
    def set_webhook_config_raw(self, endpoint, email_validation_required):
        """Set your account's webhook configuration (raw version)

        :param endpoint: The URL endpoint for the webhook
        :type endpoint: ``string``

        :param email_validation_required: When to send the webhook, see :class:`SmartwaiverWebhook` for constants to use
        :type email_validation_required: ``string``

        :return: The raw body and status code of the response from the server
        :rtype: smartwaiver.responses.SmartwaiverRawResponse
        """

        config = {
            'endpoint': endpoint,
            'emailValidationRequired': email_validation_required
        }
        url = SmartwaiverRoutes.set_webhook_config()
        return responses.SmartwaiverRawResponse(
            requests.put(url, headers=self._headers, json=config))