Skip to content

Commit

Permalink
feat(api): update financial_account_type and documentation (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot authored Feb 19, 2024
1 parent f57f00d commit b30ed81
Show file tree
Hide file tree
Showing 14 changed files with 225 additions and 191 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,39 +394,39 @@ private constructor(

@JvmField val ISSUING = FinancialAccountType(JsonField.of("ISSUING"))

@JvmField val RESERVE = FinancialAccountType(JsonField.of("RESERVE"))

@JvmField val OPERATING = FinancialAccountType(JsonField.of("OPERATING"))

@JvmField val RESERVE = FinancialAccountType(JsonField.of("RESERVE"))

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

enum class Known {
ISSUING,
RESERVE,
OPERATING,
RESERVE,
}

enum class Value {
ISSUING,
RESERVE,
OPERATING,
RESERVE,
_UNKNOWN,
}

fun value(): Value =
when (this) {
ISSUING -> Value.ISSUING
RESERVE -> Value.RESERVE
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
ISSUING -> Known.ISSUING
RESERVE -> Known.RESERVE
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,32 +158,38 @@ constructor(

@JvmField val ISSUING = FinancialAccountType(JsonField.of("ISSUING"))

@JvmField val OPERATING = FinancialAccountType(JsonField.of("OPERATING"))

@JvmField val RESERVE = FinancialAccountType(JsonField.of("RESERVE"))

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

enum class Known {
ISSUING,
OPERATING,
RESERVE,
}

enum class Value {
ISSUING,
OPERATING,
RESERVE,
_UNKNOWN,
}

fun value(): Value =
when (this) {
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,39 +398,39 @@ private constructor(

@JvmField val ISSUING = FinancialAccountType(JsonField.of("ISSUING"))

@JvmField val RESERVE = FinancialAccountType(JsonField.of("RESERVE"))

@JvmField val OPERATING = FinancialAccountType(JsonField.of("OPERATING"))

@JvmField val RESERVE = FinancialAccountType(JsonField.of("RESERVE"))

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

enum class Known {
ISSUING,
RESERVE,
OPERATING,
RESERVE,
}

enum class Value {
ISSUING,
RESERVE,
OPERATING,
RESERVE,
_UNKNOWN,
}

fun value(): Value =
when (this) {
ISSUING -> Value.ISSUING
RESERVE -> Value.RESERVE
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
ISSUING -> Known.ISSUING
RESERVE -> Known.RESERVE
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,32 +183,38 @@ constructor(

@JvmField val ISSUING = FinancialAccountType(JsonField.of("ISSUING"))

@JvmField val OPERATING = FinancialAccountType(JsonField.of("OPERATING"))

@JvmField val RESERVE = FinancialAccountType(JsonField.of("RESERVE"))

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

enum class Known {
ISSUING,
OPERATING,
RESERVE,
}

enum class Value {
ISSUING,
OPERATING,
RESERVE,
_UNKNOWN,
}

fun value(): Value =
when (this) {
ISSUING -> Value.ISSUING
OPERATING -> Value.OPERATING
RESERVE -> Value.RESERVE
else -> Value._UNKNOWN
}

fun known(): Known =
when (this) {
ISSUING -> Known.ISSUING
OPERATING -> Known.OPERATING
RESERVE -> Known.RESERVE
else -> throw LithicInvalidDataException("Unknown FinancialAccountType: $value")
}
Expand Down
28 changes: 18 additions & 10 deletions lithic-java-core/src/main/kotlin/com/lithic/api/models/Card.kt
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ private constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. To
* support recurring monthly payments, which can occur on different day every month, the time
* window we consider for monthly velocity starts 6 days after the current calendar date one
* month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is
* under the spend limit.
*/
Expand Down Expand Up @@ -233,10 +235,12 @@ private constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month. To
* support recurring monthly payments, which can occur on different day every month, the time
* window we consider for monthly velocity starts 6 days after the current calendar date one
* month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual transaction is
* under the spend limit.
*/
Expand Down Expand Up @@ -596,11 +600,13 @@ private constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
* card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* To support recurring monthly payments, which can occur on different day every month, the
* time window we consider for monthly velocity starts 6 days after the current calendar
* date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand All @@ -610,11 +616,13 @@ private constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
* card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* To support recurring monthly payments, which can occur on different day every month, the
* time window we consider for monthly velocity starts 6 days after the current calendar
* date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,13 @@ constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
* card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* To support recurring monthly payments, which can occur on different day every month, the
* time window we consider for monthly velocity starts 6 days after the current calendar
* date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down Expand Up @@ -487,11 +489,14 @@ constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing
* year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of
* the card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing
* month. Month is calculated as this calendar date one month prior.
* month. To support recurring monthly payments, which can occur on different day every
* month, the time window we consider for monthly velocity starts 6 days after the
* current calendar date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down Expand Up @@ -774,11 +779,13 @@ constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
* card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* To support recurring monthly payments, which can occur on different day every month, the
* time window we consider for monthly velocity starts 6 days after the current calendar
* date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,13 @@ constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
* card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* To support recurring monthly payments, which can occur on different day every month, the
* time window we consider for monthly velocity starts 6 days after the current calendar
* date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down Expand Up @@ -264,11 +266,14 @@ constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing
* year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of
* the card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing
* month. Month is calculated as this calendar date one month prior.
* month. To support recurring monthly payments, which can occur on different day every
* month, the time window we consider for monthly velocity starts 6 days after the
* current calendar date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down Expand Up @@ -440,11 +445,13 @@ constructor(
/**
* Spend limit duration values:
*
* - `ANNUALLY` - Card will authorize transactions up to spend limit in a calendar year.
* - `ANNUALLY` - Card will authorize transactions up to spend limit for the trailing year.
* - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime of the
* card.
* - `MONTHLY` - Card will authorize transactions up to spend limit for the trailing month.
* Month is calculated as this calendar date one month prior.
* To support recurring monthly payments, which can occur on different day every month, the
* time window we consider for monthly velocity starts 6 days after the current calendar
* date one month prior.
* - `TRANSACTION` - Card will authorize multiple transactions if each individual
* transaction is under the spend limit.
*/
Expand Down
Loading

0 comments on commit b30ed81

Please sign in to comment.