Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.

Commit 66b1950

Browse files
Merge pull request #64 from radhack/addAllowDecline
Add allow decline
2 parents 9649c0e + 6ba4802 commit 66b1950

4 files changed

Lines changed: 34 additions & 8 deletions

File tree

library/HelloSign/AbstractResource.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ abstract class AbstractResource extends AbstractObject
5656
* @var boolean
5757
*/
5858
protected $test_mode = false;
59+
60+
/**
61+
* Whether the sender will allow the signer to decline to sign
62+
*
63+
* Defaults to false.
64+
*
65+
* @var boolean
66+
*/
67+
protected $allow_decline = false;
5968

6069
/**
6170
* The title the specified Account uses for the SignatureRequest
@@ -132,6 +141,26 @@ public function disableTestMode()
132141
$this->test_mode = false;
133142
return $this;
134143
}
144+
145+
/**
146+
* @return SignatureRequest
147+
* @ignore
148+
*/
149+
public function enableAllowDecline()
150+
{
151+
$this->allow_decline = true;
152+
return $this;
153+
}
154+
155+
/**
156+
* @return SignatureRequest
157+
* @ignore
158+
*/
159+
public function disableAllowDecline()
160+
{
161+
$this->allow_decline = false;
162+
return $this;
163+
}
135164

136165
/**
137166
* @param string $title

library/HelloSign/AbstractSignatureRequestWrapper.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,11 @@ public function toParams()
131131
{
132132
return $this->toArray(array(
133133
'except' => array(
134-
'request',
135-
'allow_decline'
134+
'request'
136135
)
137136
)) + $this->request->toParams(array(
138137
'except' => array(
139-
'title',
140-
'allow_decline'
138+
'title'
141139
)
142140
));
143141
}

library/HelloSign/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
class Client
4242
{
4343

44-
const VERSION = '3.5.0';
44+
const VERSION = '3.5.2';
4545

4646
const API_URL = "https://api.hellosign.com/v3/";
4747

library/HelloSign/EmbeddedSignatureRequest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ public function toParams()
5252
* our defaults.
5353
*/
5454
return $this->request->toParams(array(
55-
'except' => array('allow_decline')
55+
'except' => array('')
5656
)) + $this->toArray(array(
5757
'except' => array(
58-
'request',
59-
'allow_decline'
58+
'request'
6059
)
6160
));
6261
}

0 commit comments

Comments
 (0)