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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.259.0"
".": "0.260.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 202
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a7e0e17a385ddfb049d0fe4e5d05785901cf40f464c51399d7c2cd1f863696c0.yml
openapi_spec_hash: b4bca6edf466e9061a72c98207f92c6d
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0b14ed0b6857930b2bbb80a8a0580dff2aad5510240f608ea9385a8b1d1b66b.yml
openapi_spec_hash: ea869bb98167424f60f8ef006da70945
config_hash: a185e9a72778cc4658ea73fb3a7f1354
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.260.0 (2025-07-10)

Full Changelog: [v0.259.0...v0.260.0](https://github.com/Increase/increase-java/compare/v0.259.0...v0.260.0)

### Features

* **api:** api update ([a12171a](https://github.com/Increase/increase-java/commit/a12171a1fb5987ddeb1bec3588358f9d7218641b))

## 0.259.0 (2025-07-09)

Full Changelog: [v0.258.0...v0.259.0](https://github.com/Increase/increase-java/compare/v0.258.0...v0.259.0)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.259.0)
[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.259.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.259.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.increase.api/increase-java)](https://central.sonatype.com/artifact/com.increase.api/increase-java/0.260.0)
[![javadoc](https://javadoc.io/badge2/com.increase.api/increase-java/0.260.0/javadoc.svg)](https://javadoc.io/doc/com.increase.api/increase-java/0.260.0)

<!-- x-release-please-end -->

Expand All @@ -13,7 +13,7 @@ The Increase Java SDK is similar to the Increase Kotlin SDK but with minor diffe

<!-- x-release-please-start-version -->

The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.259.0).
The REST API documentation can be found on [increase.com](https://increase.com/documentation). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.increase.api/increase-java/0.260.0).

<!-- x-release-please-end -->

Expand All @@ -24,7 +24,7 @@ The REST API documentation can be found on [increase.com](https://increase.com/d
### Gradle

```kotlin
implementation("com.increase.api:increase-java:0.259.0")
implementation("com.increase.api:increase-java:0.260.0")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.increase.api:increase-java:0.259.0")
<dependency>
<groupId>com.increase.api</groupId>
<artifactId>increase-java</artifactId>
<version>0.259.0</version>
<version>0.260.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.increase.api"
version = "0.259.0" // x-release-please-version
version = "0.260.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ private constructor(
private val cardId: JsonField<String>,
private val expirationMonth: JsonField<Long>,
private val expirationYear: JsonField<Long>,
private val pin: JsonField<String>,
private val primaryAccountNumber: JsonField<String>,
private val type: JsonField<Type>,
private val verificationCode: JsonField<String>,
Expand All @@ -38,6 +39,7 @@ private constructor(
@JsonProperty("expiration_year")
@ExcludeMissing
expirationYear: JsonField<Long> = JsonMissing.of(),
@JsonProperty("pin") @ExcludeMissing pin: JsonField<String> = JsonMissing.of(),
@JsonProperty("primary_account_number")
@ExcludeMissing
primaryAccountNumber: JsonField<String> = JsonMissing.of(),
Expand All @@ -49,6 +51,7 @@ private constructor(
cardId,
expirationMonth,
expirationYear,
pin,
primaryAccountNumber,
type,
verificationCode,
Expand Down Expand Up @@ -79,6 +82,14 @@ private constructor(
*/
fun expirationYear(): Long = expirationYear.getRequired("expiration_year")

/**
* The 4-digit PIN for the card, for use with ATMs.
*
* @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 pin(): String = pin.getRequired("pin")

/**
* The card number.
*
Expand Down Expand Up @@ -130,6 +141,13 @@ private constructor(
@ExcludeMissing
fun _expirationYear(): JsonField<Long> = expirationYear

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

/**
* Returns the raw JSON value of [primaryAccountNumber].
*
Expand Down Expand Up @@ -179,6 +197,7 @@ private constructor(
* .cardId()
* .expirationMonth()
* .expirationYear()
* .pin()
* .primaryAccountNumber()
* .type()
* .verificationCode()
Expand All @@ -193,6 +212,7 @@ private constructor(
private var cardId: JsonField<String>? = null
private var expirationMonth: JsonField<Long>? = null
private var expirationYear: JsonField<Long>? = null
private var pin: JsonField<String>? = null
private var primaryAccountNumber: JsonField<String>? = null
private var type: JsonField<Type>? = null
private var verificationCode: JsonField<String>? = null
Expand All @@ -203,6 +223,7 @@ private constructor(
cardId = cardDetails.cardId
expirationMonth = cardDetails.expirationMonth
expirationYear = cardDetails.expirationYear
pin = cardDetails.pin
primaryAccountNumber = cardDetails.primaryAccountNumber
type = cardDetails.type
verificationCode = cardDetails.verificationCode
Expand Down Expand Up @@ -248,6 +269,17 @@ private constructor(
this.expirationYear = expirationYear
}

/** The 4-digit PIN for the card, for use with ATMs. */
fun pin(pin: String) = pin(JsonField.of(pin))

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

/** The card number. */
fun primaryAccountNumber(primaryAccountNumber: String) =
primaryAccountNumber(JsonField.of(primaryAccountNumber))
Expand Down Expand Up @@ -324,6 +356,7 @@ private constructor(
* .cardId()
* .expirationMonth()
* .expirationYear()
* .pin()
* .primaryAccountNumber()
* .type()
* .verificationCode()
Expand All @@ -336,6 +369,7 @@ private constructor(
checkRequired("cardId", cardId),
checkRequired("expirationMonth", expirationMonth),
checkRequired("expirationYear", expirationYear),
checkRequired("pin", pin),
checkRequired("primaryAccountNumber", primaryAccountNumber),
checkRequired("type", type),
checkRequired("verificationCode", verificationCode),
Expand All @@ -353,6 +387,7 @@ private constructor(
cardId()
expirationMonth()
expirationYear()
pin()
primaryAccountNumber()
type().validate()
verificationCode()
Expand All @@ -377,6 +412,7 @@ private constructor(
(if (cardId.asKnown().isPresent) 1 else 0) +
(if (expirationMonth.asKnown().isPresent) 1 else 0) +
(if (expirationYear.asKnown().isPresent) 1 else 0) +
(if (pin.asKnown().isPresent) 1 else 0) +
(if (primaryAccountNumber.asKnown().isPresent) 1 else 0) +
(type.asKnown().getOrNull()?.validity() ?: 0) +
(if (verificationCode.asKnown().isPresent) 1 else 0)
Expand Down Expand Up @@ -511,15 +547,15 @@ private constructor(
return true
}

return /* spotless:off */ other is CardDetails && cardId == other.cardId && expirationMonth == other.expirationMonth && expirationYear == other.expirationYear && primaryAccountNumber == other.primaryAccountNumber && type == other.type && verificationCode == other.verificationCode && additionalProperties == other.additionalProperties /* spotless:on */
return /* spotless:off */ other is CardDetails && cardId == other.cardId && expirationMonth == other.expirationMonth && expirationYear == other.expirationYear && pin == other.pin && primaryAccountNumber == other.primaryAccountNumber && type == other.type && verificationCode == other.verificationCode && additionalProperties == other.additionalProperties /* spotless:on */
}

/* spotless:off */
private val hashCode: Int by lazy { Objects.hash(cardId, expirationMonth, expirationYear, primaryAccountNumber, type, verificationCode, additionalProperties) }
private val hashCode: Int by lazy { Objects.hash(cardId, expirationMonth, expirationYear, pin, primaryAccountNumber, type, verificationCode, additionalProperties) }
/* spotless:on */

override fun hashCode(): Int = hashCode

override fun toString() =
"CardDetails{cardId=$cardId, expirationMonth=$expirationMonth, expirationYear=$expirationYear, primaryAccountNumber=$primaryAccountNumber, type=$type, verificationCode=$verificationCode, additionalProperties=$additionalProperties}"
"CardDetails{cardId=$cardId, expirationMonth=$expirationMonth, expirationYear=$expirationYear, pin=$pin, primaryAccountNumber=$primaryAccountNumber, type=$type, verificationCode=$verificationCode, additionalProperties=$additionalProperties}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ internal class CardDetailsTest {
.cardId("card_oubs0hwk5rn6knuecxg2")
.expirationMonth(7L)
.expirationYear(2025L)
.pin("1234")
.primaryAccountNumber("4242424242424242")
.type(CardDetails.Type.CARD_DETAILS)
.verificationCode("123")
Expand All @@ -24,6 +25,7 @@ internal class CardDetailsTest {
assertThat(cardDetails.cardId()).isEqualTo("card_oubs0hwk5rn6knuecxg2")
assertThat(cardDetails.expirationMonth()).isEqualTo(7L)
assertThat(cardDetails.expirationYear()).isEqualTo(2025L)
assertThat(cardDetails.pin()).isEqualTo("1234")
assertThat(cardDetails.primaryAccountNumber()).isEqualTo("4242424242424242")
assertThat(cardDetails.type()).isEqualTo(CardDetails.Type.CARD_DETAILS)
assertThat(cardDetails.verificationCode()).isEqualTo("123")
Expand All @@ -37,6 +39,7 @@ internal class CardDetailsTest {
.cardId("card_oubs0hwk5rn6knuecxg2")
.expirationMonth(7L)
.expirationYear(2025L)
.pin("1234")
.primaryAccountNumber("4242424242424242")
.type(CardDetails.Type.CARD_DETAILS)
.verificationCode("123")
Expand Down
Loading