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 .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"enable-forward-compatible-enums": true,
"publish-to": "central"
},
"sdkVersion": "46.1.0.20260122"
"sdkVersion": "46.1.0.20260520"
}
10 changes: 10 additions & 0 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ src/main/java/com/squareup/square/core/SquareApiException.java
src/main/java/com/squareup/square/utilities/WebhooksHelper.java
src/test/resources/testdata
.github/workflows/ci.yml
.fern/replay.lock
.fern/replay.yml
.gitattributes
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.fern/replay.lock linguist-generated=true
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.squareup</groupId>
<artifactId>square</artifactId>
<version>46.1.0.20260122</version>
<version>46.1.0.20260520</version>
</dependency>
```

Expand Down Expand Up @@ -361,8 +361,8 @@ Gradle:

```groovy
dependencies {
implementation 'com.squareup:square:46.1.0.20260122'
implementation 'com.squareup:square-legacy:46.1.0.20260122'
implementation 'com.squareup:square:46.1.0.20260520'
implementation 'com.squareup:square-legacy:46.1.0.20260520'
}
```

Expand All @@ -372,12 +372,12 @@ Maven:
<dependency>
<groupId>com.squareup</groupId>
<artifactId>square</artifactId>
<version>46.1.0.20260122</version>
<version>46.1.0.20260520</version>
</dependency>
<dependency>
<groupId>com.squareup</groupId>
<artifactId>square-legacy</artifactId>
<version>46.1.0.20260122</version>
<version>46.1.0.20260520</version>
</dependency>
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ java {

group = 'com.squareup'

version = '46.1.0.20260122'
version = '46.1.0.20260520'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.squareup'
artifactId = 'square'
version = '46.1.0.20260122'
version = '46.1.0.20260520'
from components.java
pom {
name = 'square'
Expand Down
26 changes: 26 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -11539,6 +11539,19 @@ For more information, see [Permissions](https://developer.squareup.com/docs/paym
<dl>
<dd>

**appFeeAllocations:** `Optional<List<Object>>`

Details pertaining to recipients of the application fee. The sum of the amounts in the
app_fee_allocations must equal the app_fee_money amount, if present. If populated, an
allocation must be present for every party that expects to receive a portion of the application
fee, including the application developer.

</dd>
</dl>

<dl>
<dd>

**delayDuration:** `Optional<String>`

The duration of time after the payment's creation when Square automatically
Expand Down Expand Up @@ -12769,6 +12782,19 @@ For more information, see [Permissions](https://developer.squareup.com/docs/paym
<dl>
<dd>

**appFeeAllocations:** `Optional<List<Object>>`

Details pertaining to contributors to the refund of the application fee.
The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if
present. If populated, an allocation must be present for every party that expects to contribute
a portion of the refunded application fee, including the application developer.

</dd>
</dl>

<dl>
<dd>

**paymentId:** `Optional<String>`

The unique ID of the payment being refunded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AsyncSquareClientBuilder {

private String token = System.getenv("SQUARE_TOKEN");

private String version = "2026-01-22";
private String version = "2026-05-20";

private Environment environment = Environment.PRODUCTION;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/squareup/square/SquareClientBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class SquareClientBuilder {

private String token = System.getenv("SQUARE_TOKEN");

private String version = "2026-01-22";
private String version = "2026-05-20";

private Environment environment = Environment.PRODUCTION;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/squareup/square/core/ClientOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap<String, String>() {
{
put("User-Agent", "com.squareup:square/46.1.0.20260122");
put("User-Agent", "com.squareup:square/46.1.0.20260520");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.square.fern:api-sdk");
put("X-Fern-SDK-Version", "46.1.0.20260122");
put("X-Fern-SDK-Version", "46.1.0.20260520");
}
});
this.headerSuppliers = headerSuppliers;
Expand Down
76 changes: 74 additions & 2 deletions src/main/java/com/squareup/square/types/CardPaymentDetails.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public final class CardPaymentDetails {

private final Optional<List<Error>> errors;

private final Optional<CardSurchargeDetails> appliedCardSurchargeDetails;

private final Optional<String> walletType;

private final Map<String, Object> additionalProperties;

private CardPaymentDetails(
Expand All @@ -72,6 +76,8 @@ private CardPaymentDetails(
Optional<CardPaymentTimeline> cardPaymentTimeline,
Optional<Boolean> refundRequiresCardPresence,
Optional<List<Error>> errors,
Optional<CardSurchargeDetails> appliedCardSurchargeDetails,
Optional<String> walletType,
Map<String, Object> additionalProperties) {
this.status = status;
this.card = card;
Expand All @@ -89,6 +95,8 @@ private CardPaymentDetails(
this.cardPaymentTimeline = cardPaymentTimeline;
this.refundRequiresCardPresence = refundRequiresCardPresence;
this.errors = errors;
this.appliedCardSurchargeDetails = appliedCardSurchargeDetails;
this.walletType = walletType;
this.additionalProperties = additionalProperties;
}

Expand Down Expand Up @@ -231,6 +239,26 @@ public Optional<List<Error>> getErrors() {
return errors;
}

/**
* @return Additional information about a card_surcharge on the payment.
*/
@JsonProperty("applied_card_surcharge_details")
public Optional<CardSurchargeDetails> getAppliedCardSurchargeDetails() {
return appliedCardSurchargeDetails;
}

/**
* @return The type of digital wallet used for this card payment, if applicable.
* Currently only populated for in-person Apple Pay payments. Detection has no false
* positives but may have false negatives (some Apple Pay payments may not be detected).
* <p>For payments with <code>source_type</code> of <code>WALLET</code>, see <code>DigitalWalletDetails</code> instead.</p>
* <p>Values: <code>APPLE_PAY</code></p>
*/
@JsonProperty("wallet_type")
public Optional<String> getWalletType() {
return walletType;
}

@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
Expand Down Expand Up @@ -258,7 +286,9 @@ private boolean equalTo(CardPaymentDetails other) {
&& deviceDetails.equals(other.deviceDetails)
&& cardPaymentTimeline.equals(other.cardPaymentTimeline)
&& refundRequiresCardPresence.equals(other.refundRequiresCardPresence)
&& errors.equals(other.errors);
&& errors.equals(other.errors)
&& appliedCardSurchargeDetails.equals(other.appliedCardSurchargeDetails)
&& walletType.equals(other.walletType);
}

@java.lang.Override
Expand All @@ -279,7 +309,9 @@ public int hashCode() {
this.deviceDetails,
this.cardPaymentTimeline,
this.refundRequiresCardPresence,
this.errors);
this.errors,
this.appliedCardSurchargeDetails,
this.walletType);
}

@java.lang.Override
Expand Down Expand Up @@ -325,6 +357,10 @@ public static final class Builder {

private Optional<List<Error>> errors = Optional.empty();

private Optional<CardSurchargeDetails> appliedCardSurchargeDetails = Optional.empty();

private Optional<String> walletType = Optional.empty();

@JsonAnySetter
private Map<String, Object> additionalProperties = new HashMap<>();

Expand All @@ -347,6 +383,8 @@ public Builder from(CardPaymentDetails other) {
cardPaymentTimeline(other.getCardPaymentTimeline());
refundRequiresCardPresence(other.getRefundRequiresCardPresence());
errors(other.getErrors());
appliedCardSurchargeDetails(other.getAppliedCardSurchargeDetails());
walletType(other.getWalletType());
return this;
}

Expand Down Expand Up @@ -585,6 +623,38 @@ public Builder errors(List<Error> errors) {
return this;
}

/**
* <p>Additional information about a card_surcharge on the payment.</p>
*/
@JsonSetter(value = "applied_card_surcharge_details", nulls = Nulls.SKIP)
public Builder appliedCardSurchargeDetails(Optional<CardSurchargeDetails> appliedCardSurchargeDetails) {
this.appliedCardSurchargeDetails = appliedCardSurchargeDetails;
return this;
}

public Builder appliedCardSurchargeDetails(CardSurchargeDetails appliedCardSurchargeDetails) {
this.appliedCardSurchargeDetails = Optional.ofNullable(appliedCardSurchargeDetails);
return this;
}

/**
* <p>The type of digital wallet used for this card payment, if applicable.
* Currently only populated for in-person Apple Pay payments. Detection has no false
* positives but may have false negatives (some Apple Pay payments may not be detected).</p>
* <p>For payments with <code>source_type</code> of <code>WALLET</code>, see <code>DigitalWalletDetails</code> instead.</p>
* <p>Values: <code>APPLE_PAY</code></p>
*/
@JsonSetter(value = "wallet_type", nulls = Nulls.SKIP)
public Builder walletType(Optional<String> walletType) {
this.walletType = walletType;
return this;
}

public Builder walletType(String walletType) {
this.walletType = Optional.ofNullable(walletType);
return this;
}

public CardPaymentDetails build() {
return new CardPaymentDetails(
status,
Expand All @@ -603,6 +673,8 @@ public CardPaymentDetails build() {
cardPaymentTimeline,
refundRequiresCardPresence,
errors,
appliedCardSurchargeDetails,
walletType,
additionalProperties);
}

Expand Down
Loading
Loading