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 @@ -12,11 +12,10 @@ class AccountNumberTest {
fun createAccountNumber() {
val accountNumber =
AccountNumber.builder()
.id("id")
.accountId("account_id")
.accountNumber("account_number")
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.idempotencyKey("idempotency_key")
.id("account_number_v18nkfqm6afpsrvy82b2")
.accountId("account_in71c4amph0vgo2qllky")
.accountNumber("987654321")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.inboundAch(
AccountNumber.InboundAch.builder()
.debitStatus(AccountNumber.InboundAch.DebitStatus.ALLOWED)
Expand All @@ -27,18 +26,17 @@ class AccountNumberTest {
.status(AccountNumber.InboundChecks.Status.ALLOWED)
.build()
)
.name("name")
.routingNumber("routing_number")
.name("ACH")
.routingNumber("101050001")
.status(AccountNumber.Status.ACTIVE)
.type(AccountNumber.Type.ACCOUNT_NUMBER)
.build()
assertThat(accountNumber).isNotNull
assertThat(accountNumber.id()).isEqualTo("id")
assertThat(accountNumber.accountId()).isEqualTo("account_id")
assertThat(accountNumber.accountNumber()).isEqualTo("account_number")
assertThat(accountNumber.id()).isEqualTo("account_number_v18nkfqm6afpsrvy82b2")
assertThat(accountNumber.accountId()).isEqualTo("account_in71c4amph0vgo2qllky")
assertThat(accountNumber.accountNumber()).isEqualTo("987654321")
assertThat(accountNumber.createdAt())
.isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(accountNumber.idempotencyKey()).contains("idempotency_key")
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(accountNumber.inboundAch())
.isEqualTo(
AccountNumber.InboundAch.builder()
Expand All @@ -51,8 +49,8 @@ class AccountNumberTest {
.status(AccountNumber.InboundChecks.Status.ALLOWED)
.build()
)
assertThat(accountNumber.name()).isEqualTo("name")
assertThat(accountNumber.routingNumber()).isEqualTo("routing_number")
assertThat(accountNumber.name()).isEqualTo("ACH")
assertThat(accountNumber.routingNumber()).isEqualTo("101050001")
assertThat(accountNumber.status()).isEqualTo(AccountNumber.Status.ACTIVE)
assertThat(accountNumber.type()).isEqualTo(AccountNumber.Type.ACCOUNT_NUMBER)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ class AccountStatementTest {
fun createAccountStatement() {
val accountStatement =
AccountStatement.builder()
.id("id")
.accountId("account_id")
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.endingBalance(0L)
.fileId("file_id")
.id("account_statement_lkc03a4skm2k7f38vj15")
.accountId("account_in71c4amph0vgo2qllky")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.endingBalance(100L)
.fileId("file_makxrc67oh9l6sg7w9yc")
.startingBalance(0L)
.statementPeriodEnd(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.statementPeriodStart(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.statementPeriodEnd(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.statementPeriodStart(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.type(AccountStatement.Type.ACCOUNT_STATEMENT)
.build()
assertThat(accountStatement).isNotNull
assertThat(accountStatement.id()).isEqualTo("id")
assertThat(accountStatement.accountId()).isEqualTo("account_id")
assertThat(accountStatement.id()).isEqualTo("account_statement_lkc03a4skm2k7f38vj15")
assertThat(accountStatement.accountId()).isEqualTo("account_in71c4amph0vgo2qllky")
assertThat(accountStatement.createdAt())
.isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(accountStatement.endingBalance()).isEqualTo(0L)
assertThat(accountStatement.fileId()).isEqualTo("file_id")
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(accountStatement.endingBalance()).isEqualTo(100L)
assertThat(accountStatement.fileId()).isEqualTo("file_makxrc67oh9l6sg7w9yc")
assertThat(accountStatement.startingBalance()).isEqualTo(0L)
assertThat(accountStatement.statementPeriodEnd())
.isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(accountStatement.statementPeriodStart())
.isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(accountStatement.type()).isEqualTo(AccountStatement.Type.ACCOUNT_STATEMENT)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,30 @@ class AccountTest {
fun createAccount() {
val account =
Account.builder()
.id("id")
.id("account_in71c4amph0vgo2qllky")
.bank(Account.Bank.BLUE_RIDGE_BANK)
.closedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.currency(Account.Currency.CAD)
.entityId("entity_id")
.idempotencyKey("idempotency_key")
.informationalEntityId("informational_entity_id")
.interestAccrued("interest_accrued")
.interestAccruedAt(LocalDate.parse("2019-12-27"))
.interestRate("interest_rate")
.name("name")
.programId("program_id")
.entityId("entity_n8y8tnk2p9339ti393yi")
.interestAccrued("0.01")
.interestAccruedAt(LocalDate.parse("2020-01-31"))
.interestRate("0.055")
.name("My first account!")
.programId("program_i2v2os4mwza1oetokh9i")
.status(Account.Status.CLOSED)
.type(Account.Type.ACCOUNT)
.build()
assertThat(account).isNotNull
assertThat(account.id()).isEqualTo("id")
assertThat(account.id()).isEqualTo("account_in71c4amph0vgo2qllky")
assertThat(account.bank()).isEqualTo(Account.Bank.BLUE_RIDGE_BANK)
assertThat(account.closedAt()).contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(account.createdAt()).isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(account.createdAt()).isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(account.currency()).isEqualTo(Account.Currency.CAD)
assertThat(account.entityId()).contains("entity_id")
assertThat(account.idempotencyKey()).contains("idempotency_key")
assertThat(account.informationalEntityId()).contains("informational_entity_id")
assertThat(account.interestAccrued()).isEqualTo("interest_accrued")
assertThat(account.interestAccruedAt()).contains(LocalDate.parse("2019-12-27"))
assertThat(account.interestRate()).isEqualTo("interest_rate")
assertThat(account.name()).isEqualTo("name")
assertThat(account.programId()).isEqualTo("program_id")
assertThat(account.entityId()).contains("entity_n8y8tnk2p9339ti393yi")
assertThat(account.interestAccrued()).isEqualTo("0.01")
assertThat(account.interestAccruedAt()).contains(LocalDate.parse("2020-01-31"))
assertThat(account.interestRate()).isEqualTo("0.055")
assertThat(account.name()).isEqualTo("My first account!")
assertThat(account.programId()).isEqualTo("program_i2v2os4mwza1oetokh9i")
assertThat(account.status()).isEqualTo(Account.Status.CLOSED)
assertThat(account.type()).isEqualTo(Account.Type.ACCOUNT)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ class AccountTransferTest {
fun createAccountTransfer() {
val accountTransfer =
AccountTransfer.builder()
.id("id")
.accountId("account_id")
.amount(0L)
.id("account_transfer_7k9qe1ysdgqztnt63l7n")
.accountId("account_in71c4amph0vgo2qllky")
.amount(100L)
.approval(
AccountTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.approvedBy("approved_by")
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.build()
)
.cancellation(
Expand All @@ -27,7 +26,7 @@ class AccountTransferTest {
.canceledBy("canceled_by")
.build()
)
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.createdBy(
AccountTransfer.CreatedBy.builder()
.apiKey(
Expand All @@ -41,29 +40,30 @@ class AccountTransferTest {
.name("name")
.build()
)
.user(AccountTransfer.CreatedBy.User.builder().email("email").build())
.user(
AccountTransfer.CreatedBy.User.builder()
.email("user@example.com")
.build()
)
.build()
)
.currency(AccountTransfer.Currency.CAD)
.description("description")
.destinationAccountId("destination_account_id")
.destinationTransactionId("destination_transaction_id")
.idempotencyKey("idempotency_key")
.description("Move money into savings")
.destinationAccountId("account_uf16sut2ct5bevmq3eh")
.destinationTransactionId("transaction_j3itv8dtk5o8pw3p1xj4")
.network(AccountTransfer.Network.ACCOUNT)
.pendingTransactionId("pending_transaction_id")
.status(AccountTransfer.Status.PENDING_APPROVAL)
.transactionId("transaction_id")
.transactionId("transaction_uyrp7fld2ium70oa7oi")
.type(AccountTransfer.Type.ACCOUNT_TRANSFER)
.build()
assertThat(accountTransfer).isNotNull
assertThat(accountTransfer.id()).isEqualTo("id")
assertThat(accountTransfer.accountId()).isEqualTo("account_id")
assertThat(accountTransfer.amount()).isEqualTo(0L)
assertThat(accountTransfer.id()).isEqualTo("account_transfer_7k9qe1ysdgqztnt63l7n")
assertThat(accountTransfer.accountId()).isEqualTo("account_in71c4amph0vgo2qllky")
assertThat(accountTransfer.amount()).isEqualTo(100L)
assertThat(accountTransfer.approval())
.contains(
AccountTransfer.Approval.builder()
.approvedAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.approvedBy("approved_by")
.approvedAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.build()
)
assertThat(accountTransfer.cancellation())
Expand All @@ -74,7 +74,7 @@ class AccountTransferTest {
.build()
)
assertThat(accountTransfer.createdAt())
.isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(accountTransfer.createdBy())
.contains(
AccountTransfer.CreatedBy.builder()
Expand All @@ -87,19 +87,19 @@ class AccountTransferTest {
.oauthApplication(
AccountTransfer.CreatedBy.OAuthApplication.builder().name("name").build()
)
.user(AccountTransfer.CreatedBy.User.builder().email("email").build())
.user(
AccountTransfer.CreatedBy.User.builder().email("user@example.com").build()
)
.build()
)
assertThat(accountTransfer.currency()).isEqualTo(AccountTransfer.Currency.CAD)
assertThat(accountTransfer.description()).isEqualTo("description")
assertThat(accountTransfer.destinationAccountId()).isEqualTo("destination_account_id")
assertThat(accountTransfer.description()).isEqualTo("Move money into savings")
assertThat(accountTransfer.destinationAccountId()).isEqualTo("account_uf16sut2ct5bevmq3eh")
assertThat(accountTransfer.destinationTransactionId())
.contains("destination_transaction_id")
assertThat(accountTransfer.idempotencyKey()).contains("idempotency_key")
.contains("transaction_j3itv8dtk5o8pw3p1xj4")
assertThat(accountTransfer.network()).isEqualTo(AccountTransfer.Network.ACCOUNT)
assertThat(accountTransfer.pendingTransactionId()).contains("pending_transaction_id")
assertThat(accountTransfer.status()).isEqualTo(AccountTransfer.Status.PENDING_APPROVAL)
assertThat(accountTransfer.transactionId()).contains("transaction_id")
assertThat(accountTransfer.transactionId()).contains("transaction_uyrp7fld2ium70oa7oi")
assertThat(accountTransfer.type()).isEqualTo(AccountTransfer.Type.ACCOUNT_TRANSFER)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,19 @@ class AchPrenotificationTest {
fun createAchPrenotification() {
val achPrenotification =
AchPrenotification.builder()
.id("id")
.accountNumber("account_number")
.addendum("addendum")
.companyDescriptiveDate("company_descriptive_date")
.companyDiscretionaryData("company_discretionary_data")
.companyEntryDescription("company_entry_description")
.companyName("company_name")
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.id("ach_prenotification_ubjf9qqsxl3obbcn1u34")
.accountNumber("987654321")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.creditDebitIndicator(AchPrenotification.CreditDebitIndicator.CREDIT)
.effectiveDate(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.idempotencyKey("idempotency_key")
.notificationsOfChange(
listOf(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
AchPrenotification.NotificationsOfChange.ChangeCode
.INCORRECT_ACCOUNT_NUMBER
)
.correctedData("corrected_data")
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.correctedData("32")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.build()
)
)
Expand All @@ -44,35 +37,25 @@ class AchPrenotificationTest {
)
.build()
)
.routingNumber("routing_number")
.routingNumber("101050001")
.status(AchPrenotification.Status.PENDING_SUBMITTING)
.type(AchPrenotification.Type.ACH_PRENOTIFICATION)
.build()
assertThat(achPrenotification).isNotNull
assertThat(achPrenotification.id()).isEqualTo("id")
assertThat(achPrenotification.accountNumber()).isEqualTo("account_number")
assertThat(achPrenotification.addendum()).contains("addendum")
assertThat(achPrenotification.companyDescriptiveDate()).contains("company_descriptive_date")
assertThat(achPrenotification.companyDiscretionaryData())
.contains("company_discretionary_data")
assertThat(achPrenotification.companyEntryDescription())
.contains("company_entry_description")
assertThat(achPrenotification.companyName()).contains("company_name")
assertThat(achPrenotification.id()).isEqualTo("ach_prenotification_ubjf9qqsxl3obbcn1u34")
assertThat(achPrenotification.accountNumber()).isEqualTo("987654321")
assertThat(achPrenotification.createdAt())
.isEqualTo(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.isEqualTo(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
assertThat(achPrenotification.creditDebitIndicator())
.contains(AchPrenotification.CreditDebitIndicator.CREDIT)
assertThat(achPrenotification.effectiveDate())
.contains(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
assertThat(achPrenotification.idempotencyKey()).contains("idempotency_key")
assertThat(achPrenotification.notificationsOfChange())
.containsExactly(
AchPrenotification.NotificationsOfChange.builder()
.changeCode(
AchPrenotification.NotificationsOfChange.ChangeCode.INCORRECT_ACCOUNT_NUMBER
)
.correctedData("corrected_data")
.createdAt(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
.correctedData("32")
.createdAt(OffsetDateTime.parse("2020-01-31T23:59:59Z"))
.build()
)
assertThat(achPrenotification.prenotificationReturn())
Expand All @@ -84,7 +67,7 @@ class AchPrenotificationTest {
)
.build()
)
assertThat(achPrenotification.routingNumber()).isEqualTo("routing_number")
assertThat(achPrenotification.routingNumber()).isEqualTo("101050001")
assertThat(achPrenotification.status())
.isEqualTo(AchPrenotification.Status.PENDING_SUBMITTING)
assertThat(achPrenotification.type()).isEqualTo(AchPrenotification.Type.ACH_PRENOTIFICATION)
Expand Down
Loading