Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ constructor(
private var validated: Boolean = false

fun validate(): AccessTokenCreateBody = apply {
if (!validated) {
code()
clientId()
clientSecret()
redirectUri()
validated = true
if (validated) {
return@apply
}

code()
clientId()
clientSecret()
redirectUri()
validated = true
}

fun toBuilder() = Builder().from(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,18 @@ private constructor(
private var validated: Boolean = false

fun validate(): AccountCreateResponse = apply {
if (!validated) {
accessToken()
accountId()
authenticationType()
companyId()
connectionId()
products()
providerId()
validated = true
if (validated) {
return@apply
}

accessToken()
accountId()
authenticationType()
companyId()
connectionId()
products()
providerId()
validated = true
}

fun toBuilder() = Builder().from(this)
Expand Down
Loading