Skip to content

Commit 717b3a8

Browse files
box-sdk-buildbox-sdk-build
andauthored
fix: add verification_phone_number property to create sign request (box/box-openapi#515) (#391)
Co-authored-by: box-sdk-build <[email protected]>
1 parent 07b9be5 commit 717b3a8

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "41feeaa", "specHash": "3dc6f70", "version": "0.6.0" }
1+
{ "engineHash": "41feeaa", "specHash": "1080bb4", "version": "0.6.0" }

Sources/Schemas/SignRequestCreateSigner/SignRequestCreateSigner.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public class SignRequestCreateSigner: Codable {
1212
case redirectUrl = "redirect_url"
1313
case declinedRedirectUrl = "declined_redirect_url"
1414
case loginRequired = "login_required"
15+
case verificationPhoneNumber = "verification_phone_number"
1516
case password
1617
case signerGroupId = "signer_group_id"
1718
case suppressNotifications = "suppress_notifications"
@@ -58,6 +59,11 @@ public class SignRequestCreateSigner: Codable {
5859
/// a free Box account.
5960
public let loginRequired: Bool?
6061

62+
/// If set, this phone number will be used to verify the signer
63+
/// via two-factor authentication before they are able to sign the document.
64+
/// Cannot be selected in combination with `login_required`.
65+
public let verificationPhoneNumber: String?
66+
6167
/// If set, the signer is required to enter the password before they are able
6268
/// to sign a document. This field is write only.
6369
public let password: String?
@@ -102,6 +108,9 @@ public class SignRequestCreateSigner: Codable {
102108
/// before signing the request. If the signer does not have
103109
/// an existing account, they will have the option to create
104110
/// a free Box account.
111+
/// - verificationPhoneNumber: If set, this phone number will be used to verify the signer
112+
/// via two-factor authentication before they are able to sign the document.
113+
/// Cannot be selected in combination with `login_required`.
105114
/// - password: If set, the signer is required to enter the password before they are able
106115
/// to sign a document. This field is write only.
107116
/// - signerGroupId: If set, signers who have the same value will be assigned to the same input and to the same signer group.
@@ -112,7 +121,7 @@ public class SignRequestCreateSigner: Codable {
112121
/// determine which signers belongs to same group. A successful response will provide a generated UUID value
113122
/// instead for signers in the same signer group.
114123
/// - suppressNotifications: If true, no emails about the sign request will be sent
115-
public init(email: String? = nil, role: SignRequestCreateSignerRoleField? = nil, isInPerson: Bool? = nil, order: Int64? = nil, embedUrlExternalUserId: String? = nil, redirectUrl: String? = nil, declinedRedirectUrl: String? = nil, loginRequired: Bool? = nil, password: String? = nil, signerGroupId: String? = nil, suppressNotifications: Bool? = nil) {
124+
public init(email: String? = nil, role: SignRequestCreateSignerRoleField? = nil, isInPerson: Bool? = nil, order: Int64? = nil, embedUrlExternalUserId: String? = nil, redirectUrl: String? = nil, declinedRedirectUrl: String? = nil, loginRequired: Bool? = nil, verificationPhoneNumber: String? = nil, password: String? = nil, signerGroupId: String? = nil, suppressNotifications: Bool? = nil) {
116125
self.email = email
117126
self.role = role
118127
self.isInPerson = isInPerson
@@ -121,6 +130,7 @@ public class SignRequestCreateSigner: Codable {
121130
self.redirectUrl = redirectUrl
122131
self.declinedRedirectUrl = declinedRedirectUrl
123132
self.loginRequired = loginRequired
133+
self.verificationPhoneNumber = verificationPhoneNumber
124134
self.password = password
125135
self.signerGroupId = signerGroupId
126136
self.suppressNotifications = suppressNotifications
@@ -136,6 +146,7 @@ public class SignRequestCreateSigner: Codable {
136146
redirectUrl = try container.decodeIfPresent(String.self, forKey: .redirectUrl)
137147
declinedRedirectUrl = try container.decodeIfPresent(String.self, forKey: .declinedRedirectUrl)
138148
loginRequired = try container.decodeIfPresent(Bool.self, forKey: .loginRequired)
149+
verificationPhoneNumber = try container.decodeIfPresent(String.self, forKey: .verificationPhoneNumber)
139150
password = try container.decodeIfPresent(String.self, forKey: .password)
140151
signerGroupId = try container.decodeIfPresent(String.self, forKey: .signerGroupId)
141152
suppressNotifications = try container.decodeIfPresent(Bool.self, forKey: .suppressNotifications)
@@ -151,6 +162,7 @@ public class SignRequestCreateSigner: Codable {
151162
try container.encodeIfPresent(redirectUrl, forKey: .redirectUrl)
152163
try container.encodeIfPresent(declinedRedirectUrl, forKey: .declinedRedirectUrl)
153164
try container.encodeIfPresent(loginRequired, forKey: .loginRequired)
165+
try container.encodeIfPresent(verificationPhoneNumber, forKey: .verificationPhoneNumber)
154166
try container.encodeIfPresent(password, forKey: .password)
155167
try container.encodeIfPresent(signerGroupId, forKey: .signerGroupId)
156168
try container.encodeIfPresent(suppressNotifications, forKey: .suppressNotifications)

Sources/Schemas/SignRequestSigner/SignRequestSigner.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public class SignRequestSigner: SignRequestCreateSigner {
5858
/// before signing the request. If the signer does not have
5959
/// an existing account, they will have the option to create
6060
/// a free Box account.
61+
/// - verificationPhoneNumber: If set, this phone number will be used to verify the signer
62+
/// via two-factor authentication before they are able to sign the document.
63+
/// Cannot be selected in combination with `login_required`.
6164
/// - password: If set, the signer is required to enter the password before they are able
6265
/// to sign a document. This field is write only.
6366
/// - signerGroupId: If set, signers who have the same value will be assigned to the same input and to the same signer group.
@@ -78,14 +81,14 @@ public class SignRequestSigner: SignRequestCreateSigner {
7881
/// only if the `embed_url_external_user_id`
7982
/// parameter was passed in the
8083
/// `create Box Sign request` call.
81-
public init(email: String? = nil, role: SignRequestCreateSignerRoleField? = nil, isInPerson: Bool? = nil, order: Int64? = nil, embedUrlExternalUserId: String? = nil, redirectUrl: String? = nil, declinedRedirectUrl: String? = nil, loginRequired: Bool? = nil, password: String? = nil, signerGroupId: String? = nil, suppressNotifications: Bool? = nil, hasViewedDocument: Bool? = nil, signerDecision: SignRequestSignerSignerDecisionField? = nil, inputs: [SignRequestSignerInput]? = nil, embedUrl: String? = nil, iframeableEmbedUrl: String? = nil) {
84+
public init(email: String? = nil, role: SignRequestCreateSignerRoleField? = nil, isInPerson: Bool? = nil, order: Int64? = nil, embedUrlExternalUserId: String? = nil, redirectUrl: String? = nil, declinedRedirectUrl: String? = nil, loginRequired: Bool? = nil, verificationPhoneNumber: String? = nil, password: String? = nil, signerGroupId: String? = nil, suppressNotifications: Bool? = nil, hasViewedDocument: Bool? = nil, signerDecision: SignRequestSignerSignerDecisionField? = nil, inputs: [SignRequestSignerInput]? = nil, embedUrl: String? = nil, iframeableEmbedUrl: String? = nil) {
8285
self.hasViewedDocument = hasViewedDocument
8386
self.signerDecision = signerDecision
8487
self.inputs = inputs
8588
self.embedUrl = embedUrl
8689
self.iframeableEmbedUrl = iframeableEmbedUrl
8790

88-
super.init(email: email, role: role, isInPerson: isInPerson, order: order, embedUrlExternalUserId: embedUrlExternalUserId, redirectUrl: redirectUrl, declinedRedirectUrl: declinedRedirectUrl, loginRequired: loginRequired, password: password, signerGroupId: signerGroupId, suppressNotifications: suppressNotifications)
91+
super.init(email: email, role: role, isInPerson: isInPerson, order: order, embedUrlExternalUserId: embedUrlExternalUserId, redirectUrl: redirectUrl, declinedRedirectUrl: declinedRedirectUrl, loginRequired: loginRequired, verificationPhoneNumber: verificationPhoneNumber, password: password, signerGroupId: signerGroupId, suppressNotifications: suppressNotifications)
8992
}
9093

9194
required public init(from decoder: Decoder) throws {

0 commit comments

Comments
 (0)