Skip to content

Commit

Permalink
feat(api): api update (#632)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Nov 22, 2024
1 parent b4341f2 commit 7fb9862
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 199
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7adcb56e4eaa83dfdaec0de182919a1ff97b44158393c7b1a2fa9557f0da7249.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5fb150851a7b999aa231fd826e5365716f9c7d487a3fc1bb0a9df65bdfdfeca3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -649,35 +649,35 @@ private constructor(

companion object {

@JvmField val OPEN = Status(JsonField.of("open"))

@JvmField val CLOSED = Status(JsonField.of("closed"))

@JvmField val OPEN = Status(JsonField.of("open"))

@JvmStatic fun of(value: String) = Status(JsonField.of(value))
}

enum class Known {
OPEN,
CLOSED,
OPEN,
}

enum class Value {
OPEN,
CLOSED,
OPEN,
_UNKNOWN,
}

fun value(): Value =
when (this) {
OPEN -> Value.OPEN
CLOSED -> Value.CLOSED
OPEN -> Value.OPEN
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
OPEN -> Known.OPEN
CLOSED -> Known.CLOSED
OPEN -> Known.OPEN
else -> throw IncreaseInvalidDataException("Unknown Status: $value")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,35 +430,35 @@ constructor(

companion object {

@JvmField val OPEN = Status(JsonField.of("open"))

@JvmField val CLOSED = Status(JsonField.of("closed"))

@JvmField val OPEN = Status(JsonField.of("open"))

@JvmStatic fun of(value: String) = Status(JsonField.of(value))
}

enum class Known {
OPEN,
CLOSED,
OPEN,
}

enum class Value {
OPEN,
CLOSED,
OPEN,
_UNKNOWN,
}

fun value(): Value =
when (this) {
OPEN -> Value.OPEN
CLOSED -> Value.CLOSED
OPEN -> Value.OPEN
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
OPEN -> Known.OPEN
CLOSED -> Known.CLOSED
OPEN -> Known.OPEN
else -> throw IncreaseInvalidDataException("Unknown Status: $value")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AccountListParamsTest {
.informationalEntityId("informational_entity_id")
.limit(123L)
.programId("program_id")
.status(AccountListParams.Status.OPEN)
.status(AccountListParams.Status.CLOSED)
.build()
}

Expand All @@ -49,7 +49,7 @@ class AccountListParamsTest {
.informationalEntityId("informational_entity_id")
.limit(123L)
.programId("program_id")
.status(AccountListParams.Status.OPEN)
.status(AccountListParams.Status.CLOSED)
.build()
val expected = QueryParams.builder()
AccountListParams.CreatedAt.builder()
Expand All @@ -65,7 +65,7 @@ class AccountListParamsTest {
expected.put("informational_entity_id", "informational_entity_id")
expected.put("limit", "123")
expected.put("program_id", "program_id")
expected.put("status", AccountListParams.Status.OPEN.toString())
expected.put("status", AccountListParams.Status.CLOSED.toString())
assertThat(params.getQueryParams()).isEqualTo(expected.build())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class AccountTest {
.interestRate("interest_rate")
.name("name")
.programId("program_id")
.status(Account.Status.OPEN)
.status(Account.Status.CLOSED)
.type(Account.Type.ACCOUNT)
.build()
assertThat(account).isNotNull
Expand All @@ -43,7 +43,7 @@ class AccountTest {
assertThat(account.interestRate()).isEqualTo("interest_rate")
assertThat(account.name()).isEqualTo("name")
assertThat(account.programId()).isEqualTo("program_id")
assertThat(account.status()).isEqualTo(Account.Status.OPEN)
assertThat(account.status()).isEqualTo(Account.Status.CLOSED)
assertThat(account.type()).isEqualTo(Account.Type.ACCOUNT)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class ErrorHandlingTest {
.interestRate("interest_rate")
.name("name")
.programId("program_id")
.status(Account.Status.OPEN)
.status(Account.Status.CLOSED)
.type(Account.Type.ACCOUNT)
.build()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ServiceParamsTest {
.interestRate("interest_rate")
.name("name")
.programId("program_id")
.status(Account.Status.OPEN)
.status(Account.Status.CLOSED)
.type(Account.Type.ACCOUNT)
.build()

Expand Down

0 comments on commit 7fb9862

Please sign in to comment.