patchConsent method

Future<ClientResponse<ConsentResponse, Errors>> patchConsent(
  1. String consentId,
  2. ConsentRequest request
)

Updates, via PATCH, the consent with the given Id.

@param {String} consentId The Id of the consent to update. @param {ConsentRequest} request The request that contains just the new consent information. @returns {Promise<ClientResponse

Implementation

Future<ClientResponse<ConsentResponse, Errors>> patchConsent(
    String consentId, ConsentRequest request) {
  return _start<ConsentResponse, Errors>()
      .withUri('/api/consent')
      .withUriSegment(consentId)
      .withJSONBody(request)
      .withMethod('PATCH')
      .withResponseHandler(
          defaultResponseHandlerBuilder((d) => ConsentResponse.fromJson(d)))
      .go();
}