zoho / zsign-php-sdk

This SDK provides wrapper functions for Zoho Sign v1 API's Document Management and Template Management.
4 stars 7 forks source link

Extend function #1

Open CG-root opened 3 years ago

CG-root commented 3 years ago

Can you please add the extend functionality ?

API : https://sign.zoho.com/api/v1/requests//extend Request Method: PUT params: expire_by: 10 November 2022

anokes commented 1 year ago
static function extendRequest($request_id, $date)
{
    $response = ApiClient::callSignAPI(
            "/api/v1/requests/$request_id/extend?expire_by=".$date, // api
            ApiClient::PUT,                             // post
            null,                                   // queryparams
            null                                        // post data
        );

    return $response;
}
CG-root commented 1 year ago

Hi @anokes, This API call works. However, I was able to change the date when sending the expire_by parameter in the requests body.

Like that

static function extendRequest($requestId, $date)
  {
    $payload = [
      "expire_by" => $date,
    ];

    $response = ApiClient::callSignAPI(
      "/api/v1/requests/$requestId/extend",
      ApiClient::PUT,
      null,
      $payload
    );

    return $response;
  }

Where the value of the date is as follows: 25 May 2024 (d M Y)

Can you kindly integrate the code to be part of the SDK?

Many thanks !!