def update(self,identity,params=None, headers=None):
path = self._sub_url_params('<STR_LIT>', {<EOL>'<STR_LIT>': identity,<EOL>})<EOL>if params is not None:<EOL><INDENT>params = {self._envelope_key(): params}<EOL><DEDENT>response = self._perform_request('<STR_LIT>', path, params, headers,<EOL>retry_failures=True)<EOL>return self._resource_for(response)<EOL>
Update a subscription.

        Updates a subscription object.

        This fails with:

        - `validation_failed` if invalid data is provided when attempting to
        update a subscription.

        - `subscription_not_active` if the subscription is no longer active.

        - `subscription_already_ended` if the subscription has taken all
        payments.

        - `mandate_payments_require_approval` if the amount is being changed
        and the mandate requires approval.

        - `number_of_subscription_amendments_exceeded` error if the
        subscription amount has already been changed 10 times.

        - `forbidden` if the amount is being changed, and the subscription was
        created by an app and you are not authenticated as that app, or if the
        subscription was not created by an app and you are authenticated as an
        app

        - `resource_created_by_another_app` if the app fee is being changed,
        and the subscription was created by an app other than the app you are
        authenticated as


        Args:
              identity (string): Unique identifier, beginning with "SB".
              params (dict, optional): Request body.

        Returns:
              ListResponse of Subscription instances