Skip to content
Open
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
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 239
openapi_spec_hash: 49d468466a752f8ea72af00d00683f50
openapi_spec_hash: 7b109b214bd03821baded6e131a8282f
config_hash: 1ca082e374ef7000e2a5971e8da740e0
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class CardDispute
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val id: JsonField<String>,
private val accountId: JsonField<String>,
private val amount: JsonField<Long>,
private val cardId: JsonField<String>,
private val createdAt: JsonField<OffsetDateTime>,
Expand All @@ -50,6 +51,7 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("id") @ExcludeMissing id: JsonField<String> = JsonMissing.of(),
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField<String> = JsonMissing.of(),
@JsonProperty("amount") @ExcludeMissing amount: JsonField<Long> = JsonMissing.of(),
@JsonProperty("card_id") @ExcludeMissing cardId: JsonField<String> = JsonMissing.of(),
@JsonProperty("created_at")
Expand Down Expand Up @@ -78,6 +80,7 @@ private constructor(
withdrawal: JsonField<Withdrawal> = JsonMissing.of(),
) : this(
id,
accountId,
amount,
cardId,
createdAt,
Expand All @@ -103,6 +106,14 @@ private constructor(
*/
fun id(): String = id.getRequired("id")

/**
* The Account that the Card Dispute is associated with.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun accountId(): String = accountId.getRequired("account_id")

/**
* The amount of the dispute.
*
Expand Down Expand Up @@ -231,6 +242,13 @@ private constructor(
*/
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField<String> = id

/**
* Returns the raw JSON value of [accountId].
*
* Unlike [accountId], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField<String> = accountId

/**
* Returns the raw JSON value of [amount].
*
Expand Down Expand Up @@ -361,6 +379,7 @@ private constructor(
* The following fields are required:
* ```java
* .id()
* .accountId()
* .amount()
* .cardId()
* .createdAt()
Expand All @@ -384,6 +403,7 @@ private constructor(
class Builder internal constructor() {

private var id: JsonField<String>? = null
private var accountId: JsonField<String>? = null
private var amount: JsonField<Long>? = null
private var cardId: JsonField<String>? = null
private var createdAt: JsonField<OffsetDateTime>? = null
Expand All @@ -403,6 +423,7 @@ private constructor(
@JvmSynthetic
internal fun from(cardDispute: CardDispute) = apply {
id = cardDispute.id
accountId = cardDispute.accountId
amount = cardDispute.amount
cardId = cardDispute.cardId
createdAt = cardDispute.createdAt
Expand Down Expand Up @@ -431,6 +452,18 @@ private constructor(
*/
fun id(id: JsonField<String>) = apply { this.id = id }

/** The Account that the Card Dispute is associated with. */
fun accountId(accountId: String) = accountId(JsonField.of(accountId))

/**
* Sets [Builder.accountId] to an arbitrary JSON value.
*
* You should usually call [Builder.accountId] with a well-typed [String] value instead.
* This method is primarily for setting the field to an undocumented or not yet supported
* value.
*/
fun accountId(accountId: JsonField<String>) = apply { this.accountId = accountId }

/** The amount of the dispute. */
fun amount(amount: Long) = amount(JsonField.of(amount))

Expand Down Expand Up @@ -672,6 +705,7 @@ private constructor(
* The following fields are required:
* ```java
* .id()
* .accountId()
* .amount()
* .cardId()
* .createdAt()
Expand All @@ -693,6 +727,7 @@ private constructor(
fun build(): CardDispute =
CardDispute(
checkRequired("id", id),
checkRequired("accountId", accountId),
checkRequired("amount", amount),
checkRequired("cardId", cardId),
checkRequired("createdAt", createdAt),
Expand Down Expand Up @@ -727,6 +762,7 @@ private constructor(
}

id()
accountId()
amount()
cardId()
createdAt()
Expand Down Expand Up @@ -760,6 +796,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (id.asKnown().isPresent) 1 else 0) +
(if (accountId.asKnown().isPresent) 1 else 0) +
(if (amount.asKnown().isPresent) 1 else 0) +
(if (cardId.asKnown().isPresent) 1 else 0) +
(if (createdAt.asKnown().isPresent) 1 else 0) +
Expand Down Expand Up @@ -43445,6 +43482,7 @@ private constructor(

return other is CardDispute &&
id == other.id &&
accountId == other.accountId &&
amount == other.amount &&
cardId == other.cardId &&
createdAt == other.createdAt &&
Expand All @@ -43465,6 +43503,7 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
id,
accountId,
amount,
cardId,
createdAt,
Expand All @@ -43486,5 +43525,5 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"CardDispute{id=$id, amount=$amount, cardId=$cardId, createdAt=$createdAt, disputedTransactionId=$disputedTransactionId, idempotencyKey=$idempotencyKey, loss=$loss, network=$network, rejection=$rejection, status=$status, type=$type, userSubmissionRequiredBy=$userSubmissionRequiredBy, visa=$visa, win=$win, withdrawal=$withdrawal, additionalProperties=$additionalProperties}"
"CardDispute{id=$id, accountId=$accountId, amount=$amount, cardId=$cardId, createdAt=$createdAt, disputedTransactionId=$disputedTransactionId, idempotencyKey=$idempotencyKey, loss=$loss, network=$network, rejection=$rejection, status=$status, type=$type, userSubmissionRequiredBy=$userSubmissionRequiredBy, visa=$visa, win=$win, withdrawal=$withdrawal, additionalProperties=$additionalProperties}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class CardPurchaseSupplement
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val id: JsonField<String>,
private val accountId: JsonField<String>,
private val cardPaymentId: JsonField<String>,
private val invoice: JsonField<Invoice>,
private val lineItems: JsonField<List<LineItem>>,
Expand All @@ -41,6 +42,7 @@ private constructor(
@JsonCreator
private constructor(
@JsonProperty("id") @ExcludeMissing id: JsonField<String> = JsonMissing.of(),
@JsonProperty("account_id") @ExcludeMissing accountId: JsonField<String> = JsonMissing.of(),
@JsonProperty("card_payment_id")
@ExcludeMissing
cardPaymentId: JsonField<String> = JsonMissing.of(),
Expand All @@ -53,7 +55,17 @@ private constructor(
@ExcludeMissing
transactionId: JsonField<String> = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonField<Type> = JsonMissing.of(),
) : this(id, cardPaymentId, invoice, lineItems, shipping, transactionId, type, mutableMapOf())
) : this(
id,
accountId,
cardPaymentId,
invoice,
lineItems,
shipping,
transactionId,
type,
mutableMapOf(),
)

/**
* The Card Purchase Supplement identifier.
Expand All @@ -63,6 +75,14 @@ private constructor(
*/
fun id(): String = id.getRequired("id")

/**
* The identifier for the Account the Card Purchase Supplement belongs to.
*
* @throws IncreaseInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun accountId(): String = accountId.getRequired("account_id")

/**
* The ID of the Card Payment this transaction belongs to.
*
Expand Down Expand Up @@ -119,6 +139,13 @@ private constructor(
*/
@JsonProperty("id") @ExcludeMissing fun _id(): JsonField<String> = id

/**
* Returns the raw JSON value of [accountId].
*
* Unlike [accountId], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("account_id") @ExcludeMissing fun _accountId(): JsonField<String> = accountId

/**
* Returns the raw JSON value of [cardPaymentId].
*
Expand Down Expand Up @@ -187,6 +214,7 @@ private constructor(
* The following fields are required:
* ```java
* .id()
* .accountId()
* .cardPaymentId()
* .invoice()
* .lineItems()
Expand All @@ -202,6 +230,7 @@ private constructor(
class Builder internal constructor() {

private var id: JsonField<String>? = null
private var accountId: JsonField<String>? = null
private var cardPaymentId: JsonField<String>? = null
private var invoice: JsonField<Invoice>? = null
private var lineItems: JsonField<MutableList<LineItem>>? = null
Expand All @@ -213,6 +242,7 @@ private constructor(
@JvmSynthetic
internal fun from(cardPurchaseSupplement: CardPurchaseSupplement) = apply {
id = cardPurchaseSupplement.id
accountId = cardPurchaseSupplement.accountId
cardPaymentId = cardPurchaseSupplement.cardPaymentId
invoice = cardPurchaseSupplement.invoice
lineItems = cardPurchaseSupplement.lineItems.map { it.toMutableList() }
Expand All @@ -233,6 +263,18 @@ private constructor(
*/
fun id(id: JsonField<String>) = apply { this.id = id }

/** The identifier for the Account the Card Purchase Supplement belongs to. */
fun accountId(accountId: String) = accountId(JsonField.of(accountId))

/**
* Sets [Builder.accountId] to an arbitrary JSON value.
*
* You should usually call [Builder.accountId] with a well-typed [String] value instead.
* This method is primarily for setting the field to an undocumented or not yet supported
* value.
*/
fun accountId(accountId: JsonField<String>) = apply { this.accountId = accountId }

/** The ID of the Card Payment this transaction belongs to. */
fun cardPaymentId(cardPaymentId: String?) =
cardPaymentId(JsonField.ofNullable(cardPaymentId))
Expand Down Expand Up @@ -365,6 +407,7 @@ private constructor(
* The following fields are required:
* ```java
* .id()
* .accountId()
* .cardPaymentId()
* .invoice()
* .lineItems()
Expand All @@ -378,6 +421,7 @@ private constructor(
fun build(): CardPurchaseSupplement =
CardPurchaseSupplement(
checkRequired("id", id),
checkRequired("accountId", accountId),
checkRequired("cardPaymentId", cardPaymentId),
checkRequired("invoice", invoice),
checkRequired("lineItems", lineItems).map { it.toImmutable() },
Expand All @@ -404,6 +448,7 @@ private constructor(
}

id()
accountId()
cardPaymentId()
invoice().ifPresent { it.validate() }
lineItems().ifPresent { it.forEach { it.validate() } }
Expand All @@ -429,6 +474,7 @@ private constructor(
@JvmSynthetic
internal fun validity(): Int =
(if (id.asKnown().isPresent) 1 else 0) +
(if (accountId.asKnown().isPresent) 1 else 0) +
(if (cardPaymentId.asKnown().isPresent) 1 else 0) +
(invoice.asKnown().getOrNull()?.validity() ?: 0) +
(lineItems.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
Expand Down Expand Up @@ -4512,6 +4558,7 @@ private constructor(

return other is CardPurchaseSupplement &&
id == other.id &&
accountId == other.accountId &&
cardPaymentId == other.cardPaymentId &&
invoice == other.invoice &&
lineItems == other.lineItems &&
Expand All @@ -4524,6 +4571,7 @@ private constructor(
private val hashCode: Int by lazy {
Objects.hash(
id,
accountId,
cardPaymentId,
invoice,
lineItems,
Expand All @@ -4537,5 +4585,5 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"CardPurchaseSupplement{id=$id, cardPaymentId=$cardPaymentId, invoice=$invoice, lineItems=$lineItems, shipping=$shipping, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}"
"CardPurchaseSupplement{id=$id, accountId=$accountId, cardPaymentId=$cardPaymentId, invoice=$invoice, lineItems=$lineItems, shipping=$shipping, transactionId=$transactionId, type=$type, additionalProperties=$additionalProperties}"
}
Loading
Loading