Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terms validation #229

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 11 additions & 4 deletions IngresseSDK/Services/Users/Requests/CreateUserRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public struct CreateUserRequest: Encodable {
birthdate: String,
gender: Self.Body.UserGender,
aditionalFields: String?,
news: Bool?) {
news: Bool?,
terms: Bool?) {

self.body = Body(name: name,
lastName: lastName,
Expand All @@ -31,7 +32,8 @@ public struct CreateUserRequest: Encodable {
birthdate: birthdate,
gender: gender.value,
aditionalFields: aditionalFields,
news: news)
news: news,
terms: terms)
}

public struct Body: Encodable {
Expand All @@ -48,6 +50,7 @@ public struct CreateUserRequest: Encodable {
public let gender: String
public let aditionalFields: String?
public let news: Bool?
public let terms: Bool?

public init(name: String,
lastName: String,
Expand All @@ -60,7 +63,8 @@ public struct CreateUserRequest: Encodable {
birthdate: String,
gender: Self.UserGender,
aditionalFields: String?,
news: Bool?) {
news: Bool?,
terms: Bool?) {
self.name = name
self.lastName = lastName
self.email = email
Expand All @@ -73,6 +77,7 @@ public struct CreateUserRequest: Encodable {
self.gender = gender.value
self.aditionalFields = aditionalFields
self.news = news
self.terms = terms
}

public init(name: String,
Expand All @@ -86,7 +91,8 @@ public struct CreateUserRequest: Encodable {
birthdate: String,
gender: String,
aditionalFields: String?,
news: Bool?) {
news: Bool?,
terms: Bool?) {

self.name = name
self.lastName = lastName
Expand All @@ -100,6 +106,7 @@ public struct CreateUserRequest: Encodable {
self.gender = gender
self.aditionalFields = aditionalFields
self.news = news
self.terms = terms
}

public struct Identity: Encodable {
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 05facf585bec10881faeafcf37d9ad0cc174321b

COCOAPODS: 1.12.0
COCOAPODS: 1.12.1