public function testCreate()
 {
     $info = new AgreementStatusUpdateInfo('balls', true);
     $a = $info->toArray();
     $this->assertTrue($a['notifySigner']);
     $this->assertEquals('cancel', $a['value']);
     $this->assertEquals('balls', $a['comment']);
 }
Ejemplo n.º 2
0
 /**
  * @param $agreementId
  * @param AgreementStatusUpdateInfo $info
  * @return AgreementStatusUpdateResponse
  */
 public function status($agreementId, AgreementStatusUpdateInfo $info)
 {
     $this->endPoint = $agreementId . '/status';
     $this->headers = ['Access-Token' => $this->token->getAccessToken(), 'agreementId' => $agreementId];
     $this->data = $info->toArray();
     $request = $this->getTransport();
     $response = $request->put($this);
     if ($response instanceof Error) {
         return $response;
     }
     return new AgreementStatusUpdateResponse($response);
 }