Skip to content

Commit

Permalink
chore: simplify examples involving lists (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jan 15, 2025
1 parent 7c06a1c commit 855d967
Show file tree
Hide file tree
Showing 58 changed files with 1,060 additions and 1,290 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccountHolderCreateParamsTest {
)
.governmentId("114-123-1513")
.legalBusinessName("Acme, Inc.")
.phoneNumbers(listOf("+15555555555"))
.addPhoneNumber("+15555555555")
.dbaBusinessName("dba_business_name")
.parentCompany("parent_company")
.build()
Expand Down Expand Up @@ -68,7 +68,7 @@ class AccountHolderCreateParamsTest {
)
.governmentId("114-123-1513")
.legalBusinessName("Acme, Inc.")
.phoneNumbers(listOf("+15555555555"))
.addPhoneNumber("+15555555555")
.dbaBusinessName("dba_business_name")
.parentCompany("parent_company")
.build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ class AccountHolderCreateResponseTest {
.token("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.accountToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.status(AccountHolderCreateResponse.Status.ACCEPTED)
.statusReasons(
listOf(AccountHolderCreateResponse.StatusReasons.ADDRESS_VERIFICATION_FAILURE)
.addStatusReason(
AccountHolderCreateResponse.StatusReasons.ADDRESS_VERIFICATION_FAILURE
)
.created(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.externalId("external_id")
.requiredDocuments(
listOf(
RequiredDocument.builder()
.entityToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.statusReasons(listOf("string"))
.validDocuments(listOf("string"))
.build()
)
.addRequiredDocument(
RequiredDocument.builder()
.entityToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.addStatusReason("string")
.addValidDocument("string")
.build()
)
.build()
assertThat(accountHolderCreateResponse).isNotNull
Expand All @@ -46,8 +44,8 @@ class AccountHolderCreateResponseTest {
.containsExactly(
RequiredDocument.builder()
.entityToken("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.statusReasons(listOf("string"))
.validDocuments(listOf("string"))
.addStatusReason("string")
.addValidDocument("string")
.build()
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,72 +12,56 @@ class AccountHolderListDocumentsResponseTest {
fun createAccountHolderListDocumentsResponse() {
val accountHolderListDocumentsResponse =
AccountHolderListDocumentsResponse.builder()
.data(
listOf(
Document.builder()
.token("f41c975e-cad8-4e4f-a5cb-cef92ed91083")
.accountHolderToken("aab6ad9a-3630-4cd0-bbec-1a0fa5c7e149")
.documentType(Document.DocumentType.DRIVERS_LICENSE)
.entityToken("b50a84c9-8e86-4016-b1c7-0b9f71d4bb84")
.requiredDocumentUploads(
listOf(
Document.RequiredDocumentUpload.builder()
.token("e254beee-67db-4d8c-b610-306ee07de886")
.acceptedEntityStatusReasons(listOf("string"))
.created(OffsetDateTime.parse("2024-09-18T12:34:56Z"))
.imageType(Document.RequiredDocumentUpload.ImageType.FRONT)
.rejectedEntityStatusReasons(listOf("string"))
.status(
Document.RequiredDocumentUpload.DocumentUploadStatus
.ACCEPTED
)
.statusReasons(
listOf(
Document.RequiredDocumentUpload
.DocumentUploadStatusReasons
.DOCUMENT_MISSING_REQUIRED_DATA
)
)
.updated(OffsetDateTime.parse("2024-09-18T12:34:56Z"))
.uploadUrl(
"https://lithic-document-verification-uploads.com"
)
.build()
)
)
.build()
)
)
.build()
assertThat(accountHolderListDocumentsResponse).isNotNull
assertThat(accountHolderListDocumentsResponse.data())
.containsExactly(
Document.builder()
.token("f41c975e-cad8-4e4f-a5cb-cef92ed91083")
.accountHolderToken("aab6ad9a-3630-4cd0-bbec-1a0fa5c7e149")
.documentType(Document.DocumentType.DRIVERS_LICENSE)
.entityToken("b50a84c9-8e86-4016-b1c7-0b9f71d4bb84")
.requiredDocumentUploads(
listOf(
.addData(
Document.builder()
.token("f41c975e-cad8-4e4f-a5cb-cef92ed91083")
.accountHolderToken("aab6ad9a-3630-4cd0-bbec-1a0fa5c7e149")
.documentType(Document.DocumentType.DRIVERS_LICENSE)
.entityToken("b50a84c9-8e86-4016-b1c7-0b9f71d4bb84")
.addRequiredDocumentUpload(
Document.RequiredDocumentUpload.builder()
.token("e254beee-67db-4d8c-b610-306ee07de886")
.acceptedEntityStatusReasons(listOf("string"))
.addAcceptedEntityStatusReason("string")
.created(OffsetDateTime.parse("2024-09-18T12:34:56Z"))
.imageType(Document.RequiredDocumentUpload.ImageType.FRONT)
.rejectedEntityStatusReasons(listOf("string"))
.addRejectedEntityStatusReason("string")
.status(
Document.RequiredDocumentUpload.DocumentUploadStatus.ACCEPTED
)
.statusReasons(
listOf(
Document.RequiredDocumentUpload.DocumentUploadStatusReasons
.DOCUMENT_MISSING_REQUIRED_DATA
)
.addStatusReason(
Document.RequiredDocumentUpload.DocumentUploadStatusReasons
.DOCUMENT_MISSING_REQUIRED_DATA
)
.updated(OffsetDateTime.parse("2024-09-18T12:34:56Z"))
.uploadUrl("https://lithic-document-verification-uploads.com")
.build()
)
.build()
)
.build()
assertThat(accountHolderListDocumentsResponse).isNotNull
assertThat(accountHolderListDocumentsResponse.data())
.containsExactly(
Document.builder()
.token("f41c975e-cad8-4e4f-a5cb-cef92ed91083")
.accountHolderToken("aab6ad9a-3630-4cd0-bbec-1a0fa5c7e149")
.documentType(Document.DocumentType.DRIVERS_LICENSE)
.entityToken("b50a84c9-8e86-4016-b1c7-0b9f71d4bb84")
.addRequiredDocumentUpload(
Document.RequiredDocumentUpload.builder()
.token("e254beee-67db-4d8c-b610-306ee07de886")
.addAcceptedEntityStatusReason("string")
.created(OffsetDateTime.parse("2024-09-18T12:34:56Z"))
.imageType(Document.RequiredDocumentUpload.ImageType.FRONT)
.addRejectedEntityStatusReason("string")
.status(Document.RequiredDocumentUpload.DocumentUploadStatus.ACCEPTED)
.addStatusReason(
Document.RequiredDocumentUpload.DocumentUploadStatusReasons
.DOCUMENT_MISSING_REQUIRED_DATA
)
.updated(OffsetDateTime.parse("2024-09-18T12:34:56Z"))
.uploadUrl("https://lithic-document-verification-uploads.com")
.build()
)
.build()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AccountHolderSimulateEnrollmentDocumentReviewParamsTest {
AccountHolderSimulateEnrollmentDocumentReviewParams.builder()
.documentUploadToken("b11cd67b-0a52-4180-8365-314f3def5426")
.status(AccountHolderSimulateEnrollmentDocumentReviewParams.Status.UPLOADED)
.acceptedEntityStatusReasons(listOf("string"))
.addAcceptedEntityStatusReason("string")
.statusReason(
AccountHolderSimulateEnrollmentDocumentReviewParams.DocumentUploadStatusReasons
.DOCUMENT_MISSING_REQUIRED_DATA
Expand All @@ -26,7 +26,7 @@ class AccountHolderSimulateEnrollmentDocumentReviewParamsTest {
AccountHolderSimulateEnrollmentDocumentReviewParams.builder()
.documentUploadToken("b11cd67b-0a52-4180-8365-314f3def5426")
.status(AccountHolderSimulateEnrollmentDocumentReviewParams.Status.UPLOADED)
.acceptedEntityStatusReasons(listOf("string"))
.addAcceptedEntityStatusReason("string")
.statusReason(
AccountHolderSimulateEnrollmentDocumentReviewParams.DocumentUploadStatusReasons
.DOCUMENT_MISSING_REQUIRED_DATA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ class AccountHolderSimulateEnrollmentReviewParamsTest {
AccountHolderSimulateEnrollmentReviewParams.builder()
.accountHolderToken("1415964d-4400-4d79-9fb3-eee0faaee4e4")
.status(AccountHolderSimulateEnrollmentReviewParams.Status.ACCEPTED)
.statusReasons(
listOf(
AccountHolderSimulateEnrollmentReviewParams.StatusReason
.PRIMARY_BUSINESS_ENTITY_ID_VERIFICATION_FAILURE
)
.addStatusReason(
AccountHolderSimulateEnrollmentReviewParams.StatusReason
.PRIMARY_BUSINESS_ENTITY_ID_VERIFICATION_FAILURE
)
.build()
}
Expand All @@ -27,11 +25,9 @@ class AccountHolderSimulateEnrollmentReviewParamsTest {
AccountHolderSimulateEnrollmentReviewParams.builder()
.accountHolderToken("1415964d-4400-4d79-9fb3-eee0faaee4e4")
.status(AccountHolderSimulateEnrollmentReviewParams.Status.ACCEPTED)
.statusReasons(
listOf(
AccountHolderSimulateEnrollmentReviewParams.StatusReason
.PRIMARY_BUSINESS_ENTITY_ID_VERIFICATION_FAILURE
)
.addStatusReason(
AccountHolderSimulateEnrollmentReviewParams.StatusReason
.PRIMARY_BUSINESS_ENTITY_ID_VERIFICATION_FAILURE
)
.build()
val body = params.getBody()
Expand Down
Loading

0 comments on commit 855d967

Please sign in to comment.