com.increase.api.models.SimulationInboundAchTransferCreateParams.kt Maven / Gradle / Ivy
// File generated from our OpenAPI spec by Stainless.
package com.increase.api.models
import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import com.increase.api.core.Enum
import com.increase.api.core.ExcludeMissing
import com.increase.api.core.JsonField
import com.increase.api.core.JsonValue
import com.increase.api.core.NoAutoDetect
import com.increase.api.core.http.Headers
import com.increase.api.core.http.QueryParams
import com.increase.api.core.toImmutable
import com.increase.api.errors.IncreaseInvalidDataException
import com.increase.api.models.*
import java.time.OffsetDateTime
import java.util.Objects
class SimulationInboundAchTransferCreateParams
constructor(
private val accountNumberId: String,
private val amount: Long,
private val companyDescriptiveDate: String?,
private val companyDiscretionaryData: String?,
private val companyEntryDescription: String?,
private val companyId: String?,
private val companyName: String?,
private val receiverIdNumber: String?,
private val receiverName: String?,
private val resolveAt: OffsetDateTime?,
private val standardEntryClassCode: StandardEntryClassCode?,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
private val additionalBodyProperties: Map,
) {
fun accountNumberId(): String = accountNumberId
fun amount(): Long = amount
fun companyDescriptiveDate(): String? = companyDescriptiveDate
fun companyDiscretionaryData(): String? = companyDiscretionaryData
fun companyEntryDescription(): String? = companyEntryDescription
fun companyId(): String? = companyId
fun companyName(): String? = companyName
fun receiverIdNumber(): String? = receiverIdNumber
fun receiverName(): String? = receiverName
fun resolveAt(): OffsetDateTime? = resolveAt
fun standardEntryClassCode(): StandardEntryClassCode? = standardEntryClassCode
internal fun getBody(): SimulationInboundAchTransferCreateBody {
return SimulationInboundAchTransferCreateBody(
accountNumberId,
amount,
companyDescriptiveDate,
companyDiscretionaryData,
companyEntryDescription,
companyId,
companyName,
receiverIdNumber,
receiverName,
resolveAt,
standardEntryClassCode,
additionalBodyProperties,
)
}
internal fun getHeaders(): Headers = additionalHeaders
internal fun getQueryParams(): QueryParams = additionalQueryParams
@JsonDeserialize(builder = SimulationInboundAchTransferCreateBody.Builder::class)
@NoAutoDetect
class SimulationInboundAchTransferCreateBody
internal constructor(
private val accountNumberId: String?,
private val amount: Long?,
private val companyDescriptiveDate: String?,
private val companyDiscretionaryData: String?,
private val companyEntryDescription: String?,
private val companyId: String?,
private val companyName: String?,
private val receiverIdNumber: String?,
private val receiverName: String?,
private val resolveAt: OffsetDateTime?,
private val standardEntryClassCode: StandardEntryClassCode?,
private val additionalProperties: Map,
) {
/** The identifier of the Account Number the inbound ACH Transfer is for. */
@JsonProperty("account_number_id") fun accountNumberId(): String? = accountNumberId
/**
* The transfer amount in cents. A positive amount originates a credit transfer pushing
* funds to the receiving account. A negative amount originates a debit transfer pulling
* funds from the receiving account.
*/
@JsonProperty("amount") fun amount(): Long? = amount
/** The description of the date of the transfer. */
@JsonProperty("company_descriptive_date")
fun companyDescriptiveDate(): String? = companyDescriptiveDate
/** Data associated with the transfer set by the sender. */
@JsonProperty("company_discretionary_data")
fun companyDiscretionaryData(): String? = companyDiscretionaryData
/** The description of the transfer set by the sender. */
@JsonProperty("company_entry_description")
fun companyEntryDescription(): String? = companyEntryDescription
/** The sender's company ID. */
@JsonProperty("company_id") fun companyId(): String? = companyId
/** The name of the sender. */
@JsonProperty("company_name") fun companyName(): String? = companyName
/** The ID of the receiver of the transfer. */
@JsonProperty("receiver_id_number") fun receiverIdNumber(): String? = receiverIdNumber
/** The name of the receiver of the transfer. */
@JsonProperty("receiver_name") fun receiverName(): String? = receiverName
/**
* The time at which the transfer should be resolved. If not provided will resolve
* immediately.
*/
@JsonProperty("resolve_at") fun resolveAt(): OffsetDateTime? = resolveAt
/** The standard entry class code for the transfer. */
@JsonProperty("standard_entry_class_code")
fun standardEntryClassCode(): StandardEntryClassCode? = standardEntryClassCode
@JsonAnyGetter
@ExcludeMissing
fun _additionalProperties(): Map = additionalProperties
fun toBuilder() = Builder().from(this)
companion object {
fun builder() = Builder()
}
class Builder {
private var accountNumberId: String? = null
private var amount: Long? = null
private var companyDescriptiveDate: String? = null
private var companyDiscretionaryData: String? = null
private var companyEntryDescription: String? = null
private var companyId: String? = null
private var companyName: String? = null
private var receiverIdNumber: String? = null
private var receiverName: String? = null
private var resolveAt: OffsetDateTime? = null
private var standardEntryClassCode: StandardEntryClassCode? = null
private var additionalProperties: MutableMap = mutableMapOf()
internal fun from(
simulationInboundAchTransferCreateBody: SimulationInboundAchTransferCreateBody
) = apply {
this.accountNumberId = simulationInboundAchTransferCreateBody.accountNumberId
this.amount = simulationInboundAchTransferCreateBody.amount
this.companyDescriptiveDate =
simulationInboundAchTransferCreateBody.companyDescriptiveDate
this.companyDiscretionaryData =
simulationInboundAchTransferCreateBody.companyDiscretionaryData
this.companyEntryDescription =
simulationInboundAchTransferCreateBody.companyEntryDescription
this.companyId = simulationInboundAchTransferCreateBody.companyId
this.companyName = simulationInboundAchTransferCreateBody.companyName
this.receiverIdNumber = simulationInboundAchTransferCreateBody.receiverIdNumber
this.receiverName = simulationInboundAchTransferCreateBody.receiverName
this.resolveAt = simulationInboundAchTransferCreateBody.resolveAt
this.standardEntryClassCode =
simulationInboundAchTransferCreateBody.standardEntryClassCode
additionalProperties(simulationInboundAchTransferCreateBody.additionalProperties)
}
/** The identifier of the Account Number the inbound ACH Transfer is for. */
@JsonProperty("account_number_id")
fun accountNumberId(accountNumberId: String) = apply {
this.accountNumberId = accountNumberId
}
/**
* The transfer amount in cents. A positive amount originates a credit transfer pushing
* funds to the receiving account. A negative amount originates a debit transfer pulling
* funds from the receiving account.
*/
@JsonProperty("amount") fun amount(amount: Long) = apply { this.amount = amount }
/** The description of the date of the transfer. */
@JsonProperty("company_descriptive_date")
fun companyDescriptiveDate(companyDescriptiveDate: String) = apply {
this.companyDescriptiveDate = companyDescriptiveDate
}
/** Data associated with the transfer set by the sender. */
@JsonProperty("company_discretionary_data")
fun companyDiscretionaryData(companyDiscretionaryData: String) = apply {
this.companyDiscretionaryData = companyDiscretionaryData
}
/** The description of the transfer set by the sender. */
@JsonProperty("company_entry_description")
fun companyEntryDescription(companyEntryDescription: String) = apply {
this.companyEntryDescription = companyEntryDescription
}
/** The sender's company ID. */
@JsonProperty("company_id")
fun companyId(companyId: String) = apply { this.companyId = companyId }
/** The name of the sender. */
@JsonProperty("company_name")
fun companyName(companyName: String) = apply { this.companyName = companyName }
/** The ID of the receiver of the transfer. */
@JsonProperty("receiver_id_number")
fun receiverIdNumber(receiverIdNumber: String) = apply {
this.receiverIdNumber = receiverIdNumber
}
/** The name of the receiver of the transfer. */
@JsonProperty("receiver_name")
fun receiverName(receiverName: String) = apply { this.receiverName = receiverName }
/**
* The time at which the transfer should be resolved. If not provided will resolve
* immediately.
*/
@JsonProperty("resolve_at")
fun resolveAt(resolveAt: OffsetDateTime) = apply { this.resolveAt = resolveAt }
/** The standard entry class code for the transfer. */
@JsonProperty("standard_entry_class_code")
fun standardEntryClassCode(standardEntryClassCode: StandardEntryClassCode) = apply {
this.standardEntryClassCode = standardEntryClassCode
}
fun additionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.clear()
this.additionalProperties.putAll(additionalProperties)
}
@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
this.additionalProperties.put(key, value)
}
fun putAllAdditionalProperties(additionalProperties: Map) = apply {
this.additionalProperties.putAll(additionalProperties)
}
fun build(): SimulationInboundAchTransferCreateBody =
SimulationInboundAchTransferCreateBody(
checkNotNull(accountNumberId) {
"`accountNumberId` is required but was not set"
},
checkNotNull(amount) { "`amount` is required but was not set" },
companyDescriptiveDate,
companyDiscretionaryData,
companyEntryDescription,
companyId,
companyName,
receiverIdNumber,
receiverName,
resolveAt,
standardEntryClassCode,
additionalProperties.toImmutable(),
)
}
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is SimulationInboundAchTransferCreateBody && this.accountNumberId == other.accountNumberId && this.amount == other.amount && this.companyDescriptiveDate == other.companyDescriptiveDate && this.companyDiscretionaryData == other.companyDiscretionaryData && this.companyEntryDescription == other.companyEntryDescription && this.companyId == other.companyId && this.companyName == other.companyName && this.receiverIdNumber == other.receiverIdNumber && this.receiverName == other.receiverName && this.resolveAt == other.resolveAt && this.standardEntryClassCode == other.standardEntryClassCode && this.additionalProperties == other.additionalProperties /* spotless:on */
}
private var hashCode: Int = 0
override fun hashCode(): Int {
if (hashCode == 0) {
hashCode = /* spotless:off */ Objects.hash(accountNumberId, amount, companyDescriptiveDate, companyDiscretionaryData, companyEntryDescription, companyId, companyName, receiverIdNumber, receiverName, resolveAt, standardEntryClassCode, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun toString() =
"SimulationInboundAchTransferCreateBody{accountNumberId=$accountNumberId, amount=$amount, companyDescriptiveDate=$companyDescriptiveDate, companyDiscretionaryData=$companyDiscretionaryData, companyEntryDescription=$companyEntryDescription, companyId=$companyId, companyName=$companyName, receiverIdNumber=$receiverIdNumber, receiverName=$receiverName, resolveAt=$resolveAt, standardEntryClassCode=$standardEntryClassCode, additionalProperties=$additionalProperties}"
}
fun _additionalHeaders(): Headers = additionalHeaders
fun _additionalQueryParams(): QueryParams = additionalQueryParams
fun _additionalBodyProperties(): Map = additionalBodyProperties
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is SimulationInboundAchTransferCreateParams && this.accountNumberId == other.accountNumberId && this.amount == other.amount && this.companyDescriptiveDate == other.companyDescriptiveDate && this.companyDiscretionaryData == other.companyDiscretionaryData && this.companyEntryDescription == other.companyEntryDescription && this.companyId == other.companyId && this.companyName == other.companyName && this.receiverIdNumber == other.receiverIdNumber && this.receiverName == other.receiverName && this.resolveAt == other.resolveAt && this.standardEntryClassCode == other.standardEntryClassCode && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams && this.additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
}
override fun hashCode(): Int {
return /* spotless:off */ Objects.hash(accountNumberId, amount, companyDescriptiveDate, companyDiscretionaryData, companyEntryDescription, companyId, companyName, receiverIdNumber, receiverName, resolveAt, standardEntryClassCode, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
}
override fun toString() =
"SimulationInboundAchTransferCreateParams{accountNumberId=$accountNumberId, amount=$amount, companyDescriptiveDate=$companyDescriptiveDate, companyDiscretionaryData=$companyDiscretionaryData, companyEntryDescription=$companyEntryDescription, companyId=$companyId, companyName=$companyName, receiverIdNumber=$receiverIdNumber, receiverName=$receiverName, resolveAt=$resolveAt, standardEntryClassCode=$standardEntryClassCode, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
fun toBuilder() = Builder().from(this)
companion object {
fun builder() = Builder()
}
@NoAutoDetect
class Builder {
private var accountNumberId: String? = null
private var amount: Long? = null
private var companyDescriptiveDate: String? = null
private var companyDiscretionaryData: String? = null
private var companyEntryDescription: String? = null
private var companyId: String? = null
private var companyName: String? = null
private var receiverIdNumber: String? = null
private var receiverName: String? = null
private var resolveAt: OffsetDateTime? = null
private var standardEntryClassCode: StandardEntryClassCode? = null
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
private var additionalBodyProperties: MutableMap = mutableMapOf()
internal fun from(
simulationInboundAchTransferCreateParams: SimulationInboundAchTransferCreateParams
) = apply {
this.accountNumberId = simulationInboundAchTransferCreateParams.accountNumberId
this.amount = simulationInboundAchTransferCreateParams.amount
this.companyDescriptiveDate =
simulationInboundAchTransferCreateParams.companyDescriptiveDate
this.companyDiscretionaryData =
simulationInboundAchTransferCreateParams.companyDiscretionaryData
this.companyEntryDescription =
simulationInboundAchTransferCreateParams.companyEntryDescription
this.companyId = simulationInboundAchTransferCreateParams.companyId
this.companyName = simulationInboundAchTransferCreateParams.companyName
this.receiverIdNumber = simulationInboundAchTransferCreateParams.receiverIdNumber
this.receiverName = simulationInboundAchTransferCreateParams.receiverName
this.resolveAt = simulationInboundAchTransferCreateParams.resolveAt
this.standardEntryClassCode =
simulationInboundAchTransferCreateParams.standardEntryClassCode
additionalHeaders(simulationInboundAchTransferCreateParams.additionalHeaders)
additionalQueryParams(simulationInboundAchTransferCreateParams.additionalQueryParams)
additionalBodyProperties(
simulationInboundAchTransferCreateParams.additionalBodyProperties
)
}
/** The identifier of the Account Number the inbound ACH Transfer is for. */
fun accountNumberId(accountNumberId: String) = apply {
this.accountNumberId = accountNumberId
}
/**
* The transfer amount in cents. A positive amount originates a credit transfer pushing
* funds to the receiving account. A negative amount originates a debit transfer pulling
* funds from the receiving account.
*/
fun amount(amount: Long) = apply { this.amount = amount }
/** The description of the date of the transfer. */
fun companyDescriptiveDate(companyDescriptiveDate: String) = apply {
this.companyDescriptiveDate = companyDescriptiveDate
}
/** Data associated with the transfer set by the sender. */
fun companyDiscretionaryData(companyDiscretionaryData: String) = apply {
this.companyDiscretionaryData = companyDiscretionaryData
}
/** The description of the transfer set by the sender. */
fun companyEntryDescription(companyEntryDescription: String) = apply {
this.companyEntryDescription = companyEntryDescription
}
/** The sender's company ID. */
fun companyId(companyId: String) = apply { this.companyId = companyId }
/** The name of the sender. */
fun companyName(companyName: String) = apply { this.companyName = companyName }
/** The ID of the receiver of the transfer. */
fun receiverIdNumber(receiverIdNumber: String) = apply {
this.receiverIdNumber = receiverIdNumber
}
/** The name of the receiver of the transfer. */
fun receiverName(receiverName: String) = apply { this.receiverName = receiverName }
/**
* The time at which the transfer should be resolved. If not provided will resolve
* immediately.
*/
fun resolveAt(resolveAt: OffsetDateTime) = apply { this.resolveAt = resolveAt }
/** The standard entry class code for the transfer. */
fun standardEntryClassCode(standardEntryClassCode: StandardEntryClassCode) = apply {
this.standardEntryClassCode = standardEntryClassCode
}
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
}
fun additionalHeaders(additionalHeaders: Map>) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
}
fun putAdditionalHeader(name: String, value: String) = apply {
additionalHeaders.put(name, value)
}
fun putAdditionalHeaders(name: String, values: Iterable) = apply {
additionalHeaders.put(name, values)
}
fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.putAll(additionalHeaders)
}
fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
this.additionalHeaders.putAll(additionalHeaders)
}
fun replaceAdditionalHeaders(name: String, value: String) = apply {
additionalHeaders.replace(name, value)
}
fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
additionalHeaders.replace(name, values)
}
fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.replaceAll(additionalHeaders)
}
fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
this.additionalHeaders.replaceAll(additionalHeaders)
}
fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
fun removeAllAdditionalHeaders(names: Set) = apply {
additionalHeaders.removeAll(names)
}
fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.clear()
putAllAdditionalQueryParams(additionalQueryParams)
}
fun additionalQueryParams(additionalQueryParams: Map>) = apply {
this.additionalQueryParams.clear()
putAllAdditionalQueryParams(additionalQueryParams)
}
fun putAdditionalQueryParam(key: String, value: String) = apply {
additionalQueryParams.put(key, value)
}
fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
additionalQueryParams.put(key, values)
}
fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.putAll(additionalQueryParams)
}
fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
apply {
this.additionalQueryParams.putAll(additionalQueryParams)
}
fun replaceAdditionalQueryParams(key: String, value: String) = apply {
additionalQueryParams.replace(key, value)
}
fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
additionalQueryParams.replace(key, values)
}
fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.replaceAll(additionalQueryParams)
}
fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
apply {
this.additionalQueryParams.replaceAll(additionalQueryParams)
}
fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
fun removeAllAdditionalQueryParams(keys: Set) = apply {
additionalQueryParams.removeAll(keys)
}
fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
this.additionalBodyProperties.clear()
putAllAdditionalBodyProperties(additionalBodyProperties)
}
fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
additionalBodyProperties.put(key, value)
}
fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
apply {
this.additionalBodyProperties.putAll(additionalBodyProperties)
}
fun removeAdditionalBodyProperty(key: String) = apply {
additionalBodyProperties.remove(key)
}
fun removeAllAdditionalBodyProperties(keys: Set) = apply {
keys.forEach(::removeAdditionalBodyProperty)
}
fun build(): SimulationInboundAchTransferCreateParams =
SimulationInboundAchTransferCreateParams(
checkNotNull(accountNumberId) { "`accountNumberId` is required but was not set" },
checkNotNull(amount) { "`amount` is required but was not set" },
companyDescriptiveDate,
companyDiscretionaryData,
companyEntryDescription,
companyId,
companyName,
receiverIdNumber,
receiverName,
resolveAt,
standardEntryClassCode,
additionalHeaders.build(),
additionalQueryParams.build(),
additionalBodyProperties.toImmutable(),
)
}
class StandardEntryClassCode
@JsonCreator
private constructor(
private val value: JsonField,
) : Enum {
@com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
return /* spotless:off */ other is StandardEntryClassCode && this.value == other.value /* spotless:on */
}
override fun hashCode() = value.hashCode()
override fun toString() = value.toString()
companion object {
val CORPORATE_CREDIT_OR_DEBIT =
StandardEntryClassCode(JsonField.of("corporate_credit_or_debit"))
val CORPORATE_TRADE_EXCHANGE =
StandardEntryClassCode(JsonField.of("corporate_trade_exchange"))
val PREARRANGED_PAYMENTS_AND_DEPOSIT =
StandardEntryClassCode(JsonField.of("prearranged_payments_and_deposit"))
val INTERNET_INITIATED = StandardEntryClassCode(JsonField.of("internet_initiated"))
val POINT_OF_SALE = StandardEntryClassCode(JsonField.of("point_of_sale"))
val TELEPHONE_INITIATED = StandardEntryClassCode(JsonField.of("telephone_initiated"))
val CUSTOMER_INITIATED = StandardEntryClassCode(JsonField.of("customer_initiated"))
val ACCOUNTS_RECEIVABLE = StandardEntryClassCode(JsonField.of("accounts_receivable"))
val MACHINE_TRANSFER = StandardEntryClassCode(JsonField.of("machine_transfer"))
val SHARED_NETWORK_TRANSACTION =
StandardEntryClassCode(JsonField.of("shared_network_transaction"))
val REPRESENTED_CHECK = StandardEntryClassCode(JsonField.of("represented_check"))
val BACK_OFFICE_CONVERSION =
StandardEntryClassCode(JsonField.of("back_office_conversion"))
val POINT_OF_PURCHASE = StandardEntryClassCode(JsonField.of("point_of_purchase"))
val CHECK_TRUNCATION = StandardEntryClassCode(JsonField.of("check_truncation"))
val DESTROYED_CHECK = StandardEntryClassCode(JsonField.of("destroyed_check"))
val INTERNATIONAL_ACH_TRANSACTION =
StandardEntryClassCode(JsonField.of("international_ach_transaction"))
fun of(value: String) = StandardEntryClassCode(JsonField.of(value))
}
enum class Known {
CORPORATE_CREDIT_OR_DEBIT,
CORPORATE_TRADE_EXCHANGE,
PREARRANGED_PAYMENTS_AND_DEPOSIT,
INTERNET_INITIATED,
POINT_OF_SALE,
TELEPHONE_INITIATED,
CUSTOMER_INITIATED,
ACCOUNTS_RECEIVABLE,
MACHINE_TRANSFER,
SHARED_NETWORK_TRANSACTION,
REPRESENTED_CHECK,
BACK_OFFICE_CONVERSION,
POINT_OF_PURCHASE,
CHECK_TRUNCATION,
DESTROYED_CHECK,
INTERNATIONAL_ACH_TRANSACTION,
}
enum class Value {
CORPORATE_CREDIT_OR_DEBIT,
CORPORATE_TRADE_EXCHANGE,
PREARRANGED_PAYMENTS_AND_DEPOSIT,
INTERNET_INITIATED,
POINT_OF_SALE,
TELEPHONE_INITIATED,
CUSTOMER_INITIATED,
ACCOUNTS_RECEIVABLE,
MACHINE_TRANSFER,
SHARED_NETWORK_TRANSACTION,
REPRESENTED_CHECK,
BACK_OFFICE_CONVERSION,
POINT_OF_PURCHASE,
CHECK_TRUNCATION,
DESTROYED_CHECK,
INTERNATIONAL_ACH_TRANSACTION,
_UNKNOWN,
}
fun value(): Value =
when (this) {
CORPORATE_CREDIT_OR_DEBIT -> Value.CORPORATE_CREDIT_OR_DEBIT
CORPORATE_TRADE_EXCHANGE -> Value.CORPORATE_TRADE_EXCHANGE
PREARRANGED_PAYMENTS_AND_DEPOSIT -> Value.PREARRANGED_PAYMENTS_AND_DEPOSIT
INTERNET_INITIATED -> Value.INTERNET_INITIATED
POINT_OF_SALE -> Value.POINT_OF_SALE
TELEPHONE_INITIATED -> Value.TELEPHONE_INITIATED
CUSTOMER_INITIATED -> Value.CUSTOMER_INITIATED
ACCOUNTS_RECEIVABLE -> Value.ACCOUNTS_RECEIVABLE
MACHINE_TRANSFER -> Value.MACHINE_TRANSFER
SHARED_NETWORK_TRANSACTION -> Value.SHARED_NETWORK_TRANSACTION
REPRESENTED_CHECK -> Value.REPRESENTED_CHECK
BACK_OFFICE_CONVERSION -> Value.BACK_OFFICE_CONVERSION
POINT_OF_PURCHASE -> Value.POINT_OF_PURCHASE
CHECK_TRUNCATION -> Value.CHECK_TRUNCATION
DESTROYED_CHECK -> Value.DESTROYED_CHECK
INTERNATIONAL_ACH_TRANSACTION -> Value.INTERNATIONAL_ACH_TRANSACTION
else -> Value._UNKNOWN
}
fun known(): Known =
when (this) {
CORPORATE_CREDIT_OR_DEBIT -> Known.CORPORATE_CREDIT_OR_DEBIT
CORPORATE_TRADE_EXCHANGE -> Known.CORPORATE_TRADE_EXCHANGE
PREARRANGED_PAYMENTS_AND_DEPOSIT -> Known.PREARRANGED_PAYMENTS_AND_DEPOSIT
INTERNET_INITIATED -> Known.INTERNET_INITIATED
POINT_OF_SALE -> Known.POINT_OF_SALE
TELEPHONE_INITIATED -> Known.TELEPHONE_INITIATED
CUSTOMER_INITIATED -> Known.CUSTOMER_INITIATED
ACCOUNTS_RECEIVABLE -> Known.ACCOUNTS_RECEIVABLE
MACHINE_TRANSFER -> Known.MACHINE_TRANSFER
SHARED_NETWORK_TRANSACTION -> Known.SHARED_NETWORK_TRANSACTION
REPRESENTED_CHECK -> Known.REPRESENTED_CHECK
BACK_OFFICE_CONVERSION -> Known.BACK_OFFICE_CONVERSION
POINT_OF_PURCHASE -> Known.POINT_OF_PURCHASE
CHECK_TRUNCATION -> Known.CHECK_TRUNCATION
DESTROYED_CHECK -> Known.DESTROYED_CHECK
INTERNATIONAL_ACH_TRANSACTION -> Known.INTERNATIONAL_ACH_TRANSACTION
else -> throw IncreaseInvalidDataException("Unknown StandardEntryClassCode: $value")
}
fun asString(): String = _value().asStringOrThrow()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy