search(
+ SearchTransferOrdersRequest request, RequestOptions requestOptions) {
+ return this.rawClient.search(request, requestOptions).body();
+ }
+
+ /**
+ * Retrieves a specific TransferOrder by ID. Returns the complete
+ * order details including:
+ *
+ * - Basic information (status, dates, notes)
+ * - Line items with ordered and received quantities
+ * - Source and destination Locations
+ * - Tracking information (if available)
+ *
+ */
+ public RetrieveTransferOrderResponse get(GetTransferOrdersRequest request) {
+ return this.rawClient.get(request).body();
+ }
+
+ /**
+ * Retrieves a specific TransferOrder by ID. Returns the complete
+ * order details including:
+ *
+ * - Basic information (status, dates, notes)
+ * - Line items with ordered and received quantities
+ * - Source and destination Locations
+ * - Tracking information (if available)
+ *
+ */
+ public RetrieveTransferOrderResponse get(GetTransferOrdersRequest request, RequestOptions requestOptions) {
+ return this.rawClient.get(request, requestOptions).body();
+ }
+
+ /**
+ * Updates an existing transfer order. This endpoint supports sparse updates,
+ * allowing you to modify specific fields without affecting others.
+ * Creates a transfer_order.updated webhook event.
+ */
+ public UpdateTransferOrderResponse update(UpdateTransferOrderRequest request) {
+ return this.rawClient.update(request).body();
+ }
+
+ /**
+ * Updates an existing transfer order. This endpoint supports sparse updates,
+ * allowing you to modify specific fields without affecting others.
+ * Creates a transfer_order.updated webhook event.
+ */
+ public UpdateTransferOrderResponse update(UpdateTransferOrderRequest request, RequestOptions requestOptions) {
+ return this.rawClient.update(request, requestOptions).body();
+ }
+
+ /**
+ * Deletes a transfer order in DRAFT status.
+ * Only draft orders can be deleted. Once an order is started via
+ * StartTransferOrder, it can no longer be deleted.
+ * Creates a transfer_order.deleted webhook event.
+ */
+ public DeleteTransferOrderResponse delete(DeleteTransferOrdersRequest request) {
+ return this.rawClient.delete(request).body();
+ }
+
+ /**
+ * Deletes a transfer order in DRAFT status.
+ * Only draft orders can be deleted. Once an order is started via
+ * StartTransferOrder, it can no longer be deleted.
+ * Creates a transfer_order.deleted webhook event.
+ */
+ public DeleteTransferOrderResponse delete(DeleteTransferOrdersRequest request, RequestOptions requestOptions) {
+ return this.rawClient.delete(request, requestOptions).body();
+ }
+
+ /**
+ * Cancels a transfer order in STARTED or
+ * PARTIALLY_RECEIVED status. Any unreceived quantities will no
+ * longer be receivable and will be immediately returned to the source Location's inventory.
+ * Common reasons for cancellation:
+ *
+ * - Items no longer needed at destination
+ * - Source location needs the inventory
+ * - Order created in error
+ *
+ * Creates a transfer_order.updated webhook event.
+ */
+ public CancelTransferOrderResponse cancel(CancelTransferOrderRequest request) {
+ return this.rawClient.cancel(request).body();
+ }
+
+ /**
+ * Cancels a transfer order in STARTED or
+ * PARTIALLY_RECEIVED status. Any unreceived quantities will no
+ * longer be receivable and will be immediately returned to the source Location's inventory.
+ * Common reasons for cancellation:
+ *
+ * - Items no longer needed at destination
+ * - Source location needs the inventory
+ * - Order created in error
+ *
+ * Creates a transfer_order.updated webhook event.
+ */
+ public CancelTransferOrderResponse cancel(CancelTransferOrderRequest request, RequestOptions requestOptions) {
+ return this.rawClient.cancel(request, requestOptions).body();
+ }
+
+ /**
+ * Records receipt of CatalogItemVariations for a transfer order.
+ * This endpoint supports partial receiving - you can receive items in multiple batches.
+ * For each line item, you can specify:
+ *
+ * - Quantity received in good condition (added to destination inventory with InventoryState of IN_STOCK)
+ * - Quantity damaged during transit/handling (added to destination inventory with InventoryState of WASTE)
+ * - Quantity canceled (returned to source location's inventory)
+ *
+ * The order must be in STARTED or PARTIALLY_RECEIVED status.
+ * Received quantities are added to the destination Location's inventory according to their condition.
+ * Canceled quantities are immediately returned to the source Location's inventory.
+ * When all items are either received, damaged, or canceled, the order moves to
+ * COMPLETED status.
+ * Creates a transfer_order.updated webhook event.
+ */
+ public ReceiveTransferOrderResponse receive(ReceiveTransferOrderRequest request) {
+ return this.rawClient.receive(request).body();
+ }
+
+ /**
+ * Records receipt of CatalogItemVariations for a transfer order.
+ * This endpoint supports partial receiving - you can receive items in multiple batches.
+ * For each line item, you can specify:
+ *
+ * - Quantity received in good condition (added to destination inventory with InventoryState of IN_STOCK)
+ * - Quantity damaged during transit/handling (added to destination inventory with InventoryState of WASTE)
+ * - Quantity canceled (returned to source location's inventory)
+ *
+ * The order must be in STARTED or PARTIALLY_RECEIVED status.
+ * Received quantities are added to the destination Location's inventory according to their condition.
+ * Canceled quantities are immediately returned to the source Location's inventory.
+ * When all items are either received, damaged, or canceled, the order moves to
+ * COMPLETED status.
+ * Creates a transfer_order.updated webhook event.
+ */
+ public ReceiveTransferOrderResponse receive(ReceiveTransferOrderRequest request, RequestOptions requestOptions) {
+ return this.rawClient.receive(request, requestOptions).body();
+ }
+
+ /**
+ * Changes a DRAFT transfer order to STARTED status.
+ * This decrements inventory at the source Location and marks it as in-transit.
+ * The order must be in DRAFT status and have all required fields populated.
+ * Once started, the order can no longer be deleted, but it can be canceled via
+ * CancelTransferOrder.
+ * Creates a transfer_order.updated webhook event.
+ */
+ public StartTransferOrderResponse start(StartTransferOrderRequest request) {
+ return this.rawClient.start(request).body();
+ }
+
+ /**
+ * Changes a DRAFT transfer order to STARTED status.
+ * This decrements inventory at the source Location and marks it as in-transit.
+ * The order must be in DRAFT status and have all required fields populated.
+ * Once started, the order can no longer be deleted, but it can be canceled via
+ * CancelTransferOrder.
+ * Creates a transfer_order.updated webhook event.
+ */
+ public StartTransferOrderResponse start(StartTransferOrderRequest request, RequestOptions requestOptions) {
+ return this.rawClient.start(request, requestOptions).body();
+ }
+}
diff --git a/src/main/java/com/squareup/square/core/ClientOptions.java b/src/main/java/com/squareup/square/core/ClientOptions.java
index 3ff46663..0960b301 100644
--- a/src/main/java/com/squareup/square/core/ClientOptions.java
+++ b/src/main/java/com/squareup/square/core/ClientOptions.java
@@ -32,10 +32,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.squareup:square/45.0.0.20250924");
+ put("User-Agent", "com.squareup:square/45.1.0.20251016");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.square.fern:api-sdk");
- put("X-Fern-SDK-Version", "45.0.0.20250924");
+ put("X-Fern-SDK-Version", "45.1.0.20251016");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/squareup/square/loyalty/programs/types/CancelPromotionsRequest.java b/src/main/java/com/squareup/square/loyalty/programs/types/CancelPromotionsRequest.java
index 198b6525..1dff3b15 100644
--- a/src/main/java/com/squareup/square/loyalty/programs/types/CancelPromotionsRequest.java
+++ b/src/main/java/com/squareup/square/loyalty/programs/types/CancelPromotionsRequest.java
@@ -19,18 +19,26 @@
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = CancelPromotionsRequest.Builder.class)
public final class CancelPromotionsRequest {
- private final String promotionId;
-
private final String programId;
+ private final String promotionId;
+
private final Map additionalProperties;
- private CancelPromotionsRequest(String promotionId, String programId, Map additionalProperties) {
- this.promotionId = promotionId;
+ private CancelPromotionsRequest(String programId, String promotionId, Map additionalProperties) {
this.programId = programId;
+ this.promotionId = promotionId;
this.additionalProperties = additionalProperties;
}
+ /**
+ * @return The ID of the base loyalty program.
+ */
+ @JsonProperty("program_id")
+ public String getProgramId() {
+ return programId;
+ }
+
/**
* @return The ID of the loyalty promotion to cancel. You can cancel a
* promotion that has an ACTIVE or SCHEDULED status.
@@ -40,14 +48,6 @@ public String getPromotionId() {
return promotionId;
}
- /**
- * @return The ID of the base loyalty program.
- */
- @JsonProperty("program_id")
- public String getProgramId() {
- return programId;
- }
-
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -60,12 +60,12 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(CancelPromotionsRequest other) {
- return promotionId.equals(other.promotionId) && programId.equals(other.programId);
+ return programId.equals(other.programId) && promotionId.equals(other.promotionId);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.promotionId, this.programId);
+ return Objects.hash(this.programId, this.promotionId);
}
@java.lang.Override
@@ -73,25 +73,25 @@ public String toString() {
return ObjectMappers.stringify(this);
}
- public static PromotionIdStage builder() {
+ public static ProgramIdStage builder() {
return new Builder();
}
- public interface PromotionIdStage {
+ public interface ProgramIdStage {
/**
- * The ID of the loyalty promotion to cancel. You can cancel a
- * promotion that has an ACTIVE or SCHEDULED status.
+ * The ID of the base loyalty program.
*/
- ProgramIdStage promotionId(@NotNull String promotionId);
+ PromotionIdStage programId(@NotNull String programId);
Builder from(CancelPromotionsRequest other);
}
- public interface ProgramIdStage {
+ public interface PromotionIdStage {
/**
- * The ID of the base loyalty program.
+ * The ID of the loyalty promotion to cancel. You can cancel a
+ * promotion that has an ACTIVE or SCHEDULED status.
*/
- _FinalStage programId(@NotNull String programId);
+ _FinalStage promotionId(@NotNull String promotionId);
}
public interface _FinalStage {
@@ -99,11 +99,11 @@ public interface _FinalStage {
}
@JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements PromotionIdStage, ProgramIdStage, _FinalStage {
- private String promotionId;
-
+ public static final class Builder implements ProgramIdStage, PromotionIdStage, _FinalStage {
private String programId;
+ private String promotionId;
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -111,40 +111,40 @@ private Builder() {}
@java.lang.Override
public Builder from(CancelPromotionsRequest other) {
- promotionId(other.getPromotionId());
programId(other.getProgramId());
+ promotionId(other.getPromotionId());
return this;
}
/**
- * The ID of the loyalty promotion to cancel. You can cancel a
- * promotion that has an ACTIVE or SCHEDULED status.
- * The ID of the loyalty promotion to cancel. You can cancel a
- * promotion that has an ACTIVE or SCHEDULED status.
+ * The ID of the base loyalty program.
+ * The ID of the base loyalty program.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- @JsonSetter("promotion_id")
- public ProgramIdStage promotionId(@NotNull String promotionId) {
- this.promotionId = Objects.requireNonNull(promotionId, "promotionId must not be null");
+ @JsonSetter("program_id")
+ public PromotionIdStage programId(@NotNull String programId) {
+ this.programId = Objects.requireNonNull(programId, "programId must not be null");
return this;
}
/**
- * The ID of the base loyalty program.
- * The ID of the base loyalty program.
+ * The ID of the loyalty promotion to cancel. You can cancel a
+ * promotion that has an ACTIVE or SCHEDULED status.
+ * The ID of the loyalty promotion to cancel. You can cancel a
+ * promotion that has an ACTIVE or SCHEDULED status.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- @JsonSetter("program_id")
- public _FinalStage programId(@NotNull String programId) {
- this.programId = Objects.requireNonNull(programId, "programId must not be null");
+ @JsonSetter("promotion_id")
+ public _FinalStage promotionId(@NotNull String promotionId) {
+ this.promotionId = Objects.requireNonNull(promotionId, "promotionId must not be null");
return this;
}
@java.lang.Override
public CancelPromotionsRequest build() {
- return new CancelPromotionsRequest(promotionId, programId, additionalProperties);
+ return new CancelPromotionsRequest(programId, promotionId, additionalProperties);
}
}
}
diff --git a/src/main/java/com/squareup/square/loyalty/programs/types/GetPromotionsRequest.java b/src/main/java/com/squareup/square/loyalty/programs/types/GetPromotionsRequest.java
index 82dcd4e4..3935590a 100644
--- a/src/main/java/com/squareup/square/loyalty/programs/types/GetPromotionsRequest.java
+++ b/src/main/java/com/squareup/square/loyalty/programs/types/GetPromotionsRequest.java
@@ -19,26 +19,18 @@
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@JsonDeserialize(builder = GetPromotionsRequest.Builder.class)
public final class GetPromotionsRequest {
- private final String promotionId;
-
private final String programId;
+ private final String promotionId;
+
private final Map additionalProperties;
- private GetPromotionsRequest(String promotionId, String programId, Map additionalProperties) {
- this.promotionId = promotionId;
+ private GetPromotionsRequest(String programId, String promotionId, Map additionalProperties) {
this.programId = programId;
+ this.promotionId = promotionId;
this.additionalProperties = additionalProperties;
}
- /**
- * @return The ID of the loyalty promotion to retrieve.
- */
- @JsonProperty("promotion_id")
- public String getPromotionId() {
- return promotionId;
- }
-
/**
* @return The ID of the base loyalty program. To get the program ID,
* call RetrieveLoyaltyProgram using the main keyword.
@@ -48,6 +40,14 @@ public String getProgramId() {
return programId;
}
+ /**
+ * @return The ID of the loyalty promotion to retrieve.
+ */
+ @JsonProperty("promotion_id")
+ public String getPromotionId() {
+ return promotionId;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -60,12 +60,12 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(GetPromotionsRequest other) {
- return promotionId.equals(other.promotionId) && programId.equals(other.programId);
+ return programId.equals(other.programId) && promotionId.equals(other.promotionId);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.promotionId, this.programId);
+ return Objects.hash(this.programId, this.promotionId);
}
@java.lang.Override
@@ -73,25 +73,25 @@ public String toString() {
return ObjectMappers.stringify(this);
}
- public static PromotionIdStage builder() {
+ public static ProgramIdStage builder() {
return new Builder();
}
- public interface PromotionIdStage {
+ public interface ProgramIdStage {
/**
- * The ID of the loyalty promotion to retrieve.
+ * The ID of the base loyalty program. To get the program ID,
+ * call RetrieveLoyaltyProgram using the main keyword.
*/
- ProgramIdStage promotionId(@NotNull String promotionId);
+ PromotionIdStage programId(@NotNull String programId);
Builder from(GetPromotionsRequest other);
}
- public interface ProgramIdStage {
+ public interface PromotionIdStage {
/**
- * The ID of the base loyalty program. To get the program ID,
- * call RetrieveLoyaltyProgram using the main keyword.
+ * The ID of the loyalty promotion to retrieve.
*/
- _FinalStage programId(@NotNull String programId);
+ _FinalStage promotionId(@NotNull String promotionId);
}
public interface _FinalStage {
@@ -99,11 +99,11 @@ public interface _FinalStage {
}
@JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements PromotionIdStage, ProgramIdStage, _FinalStage {
- private String promotionId;
-
+ public static final class Builder implements ProgramIdStage, PromotionIdStage, _FinalStage {
private String programId;
+ private String promotionId;
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -111,40 +111,40 @@ private Builder() {}
@java.lang.Override
public Builder from(GetPromotionsRequest other) {
- promotionId(other.getPromotionId());
programId(other.getProgramId());
+ promotionId(other.getPromotionId());
return this;
}
/**
- * The ID of the loyalty promotion to retrieve.
- * The ID of the loyalty promotion to retrieve.
+ * The ID of the base loyalty program. To get the program ID,
+ * call RetrieveLoyaltyProgram using the main keyword.
+ * The ID of the base loyalty program. To get the program ID,
+ * call RetrieveLoyaltyProgram using the main keyword.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- @JsonSetter("promotion_id")
- public ProgramIdStage promotionId(@NotNull String promotionId) {
- this.promotionId = Objects.requireNonNull(promotionId, "promotionId must not be null");
+ @JsonSetter("program_id")
+ public PromotionIdStage programId(@NotNull String programId) {
+ this.programId = Objects.requireNonNull(programId, "programId must not be null");
return this;
}
/**
- * The ID of the base loyalty program. To get the program ID,
- * call RetrieveLoyaltyProgram using the main keyword.
- * The ID of the base loyalty program. To get the program ID,
- * call RetrieveLoyaltyProgram using the main keyword.
+ * The ID of the loyalty promotion to retrieve.
+ * The ID of the loyalty promotion to retrieve.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
- @JsonSetter("program_id")
- public _FinalStage programId(@NotNull String programId) {
- this.programId = Objects.requireNonNull(programId, "programId must not be null");
+ @JsonSetter("promotion_id")
+ public _FinalStage promotionId(@NotNull String promotionId) {
+ this.promotionId = Objects.requireNonNull(promotionId, "promotionId must not be null");
return this;
}
@java.lang.Override
public GetPromotionsRequest build() {
- return new GetPromotionsRequest(promotionId, programId, additionalProperties);
+ return new GetPromotionsRequest(programId, promotionId, additionalProperties);
}
}
}
diff --git a/src/main/java/com/squareup/square/types/BulkRetrieveChannelsRequest.java b/src/main/java/com/squareup/square/types/BulkRetrieveChannelsRequest.java
new file mode 100644
index 00000000..7555331f
--- /dev/null
+++ b/src/main/java/com/squareup/square/types/BulkRetrieveChannelsRequest.java
@@ -0,0 +1,104 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.squareup.square.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.squareup.square.core.ObjectMappers;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = BulkRetrieveChannelsRequest.Builder.class)
+public final class BulkRetrieveChannelsRequest {
+ private final List channelIds;
+
+ private final Map additionalProperties;
+
+ private BulkRetrieveChannelsRequest(List channelIds, Map additionalProperties) {
+ this.channelIds = channelIds;
+ this.additionalProperties = additionalProperties;
+ }
+
+ @JsonProperty("channel_ids")
+ public List getChannelIds() {
+ return channelIds;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof BulkRetrieveChannelsRequest && equalTo((BulkRetrieveChannelsRequest) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(BulkRetrieveChannelsRequest other) {
+ return channelIds.equals(other.channelIds);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.channelIds);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private List channelIds = new ArrayList<>();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(BulkRetrieveChannelsRequest other) {
+ channelIds(other.getChannelIds());
+ return this;
+ }
+
+ @JsonSetter(value = "channel_ids", nulls = Nulls.SKIP)
+ public Builder channelIds(List channelIds) {
+ this.channelIds.clear();
+ this.channelIds.addAll(channelIds);
+ return this;
+ }
+
+ public Builder addChannelIds(String channelIds) {
+ this.channelIds.add(channelIds);
+ return this;
+ }
+
+ public Builder addAllChannelIds(List channelIds) {
+ if (channelIds != null) {
+ this.channelIds.addAll(channelIds);
+ }
+ return this;
+ }
+
+ public BulkRetrieveChannelsRequest build() {
+ return new BulkRetrieveChannelsRequest(channelIds, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/com/squareup/square/types/BulkRetrieveChannelsResponse.java b/src/main/java/com/squareup/square/types/BulkRetrieveChannelsResponse.java
new file mode 100644
index 00000000..ccad1b53
--- /dev/null
+++ b/src/main/java/com/squareup/square/types/BulkRetrieveChannelsResponse.java
@@ -0,0 +1,139 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.squareup.square.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.squareup.square.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = BulkRetrieveChannelsResponse.Builder.class)
+public final class BulkRetrieveChannelsResponse {
+ private final Optional> errors;
+
+ private final Optional