Skip to content

Commit 8db563f

Browse files
committed
feat(api): no longer require website_url property on KYB object (#26)
1 parent df89dd4 commit 8db563f

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

lithic-java-core/src/main/kotlin/com/lithic/api/models/Kyb.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private constructor(
9393
fun tosTimestamp(): String = tosTimestamp.getRequired("tos_timestamp")
9494

9595
/** Company website URL. */
96-
fun websiteUrl(): String = websiteUrl.getRequired("website_url")
96+
fun websiteUrl(): Optional<String> = Optional.ofNullable(websiteUrl.getNullable("website_url"))
9797

9898
/** Specifies the type of KYB workflow to run. */
9999
fun workflow(): Workflow = workflow.getRequired("workflow")

lithic-java-core/src/test/kotlin/com/lithic/api/models/AccountHolderCreateParamsTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ class AccountHolderCreateParamsTest {
9797
"Software company selling solutions to the restaurant industry"
9898
)
9999
.tosTimestamp("2018-05-29T21:16:05Z")
100-
.websiteUrl("www.mybusiness.com")
101100
.workflow(Kyb.Workflow.KYB_BASIC)
102101
.kybPassedTimestamp("2018-05-29T21:16:05Z")
102+
.websiteUrl("www.mybusiness.com")
103103
.build()
104104
)
105105
.build()
@@ -197,9 +197,9 @@ class AccountHolderCreateParamsTest {
197197
"Software company selling solutions to the restaurant industry"
198198
)
199199
.tosTimestamp("2018-05-29T21:16:05Z")
200-
.websiteUrl("www.mybusiness.com")
201200
.workflow(Kyb.Workflow.KYB_BASIC)
202201
.kybPassedTimestamp("2018-05-29T21:16:05Z")
202+
.websiteUrl("www.mybusiness.com")
203203
.build()
204204
)
205205
.build()

lithic-java-core/src/test/kotlin/com/lithic/api/models/KybTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ class KybTest {
9393
)
9494
.natureOfBusiness("Software company selling solutions to the restaurant industry")
9595
.tosTimestamp("2018-05-29T21:16:05Z")
96-
.websiteUrl("www.mybusiness.com")
9796
.workflow(Kyb.Workflow.KYB_BASIC)
9897
.kybPassedTimestamp("2018-05-29T21:16:05Z")
98+
.websiteUrl("www.mybusiness.com")
9999
.build()
100100
assertThat(kyb).isNotNull
101101
assertThat(kyb.beneficialOwnerEntities())
@@ -183,8 +183,8 @@ class KybTest {
183183
assertThat(kyb.natureOfBusiness())
184184
.isEqualTo("Software company selling solutions to the restaurant industry")
185185
assertThat(kyb.tosTimestamp()).isEqualTo("2018-05-29T21:16:05Z")
186-
assertThat(kyb.websiteUrl()).isEqualTo("www.mybusiness.com")
187186
assertThat(kyb.workflow()).isEqualTo(Kyb.Workflow.KYB_BASIC)
188187
assertThat(kyb.kybPassedTimestamp()).contains("2018-05-29T21:16:05Z")
188+
assertThat(kyb.websiteUrl()).contains("www.mybusiness.com")
189189
}
190190
}

lithic-java-core/src/test/kotlin/com/lithic/api/services/blocking/AccountHolderServiceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ class AccountHolderServiceTest {
109109
"Software company selling solutions to the restaurant industry"
110110
)
111111
.tosTimestamp("2018-05-29T21:16:05Z")
112-
.websiteUrl("www.mybusiness.com")
113112
.workflow(Kyb.Workflow.KYB_BASIC)
114113
.kybPassedTimestamp("2018-05-29T21:16:05Z")
114+
.websiteUrl("www.mybusiness.com")
115115
.build()
116116
)
117117
.build()

0 commit comments

Comments
 (0)