Skip to content

Commit

Permalink
Merge pull request #113 from square/release/37.0.1.20240118
Browse files Browse the repository at this point in the history
Generated PR for Release: 37.0.1.20240118
  • Loading branch information
joanc-sq committed Jan 17, 2024
2 parents 46ca5ad + 86c0e86 commit 00a45b7
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 261 deletions.
1 change: 0 additions & 1 deletion doc/models/fulfillment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ However, orders returned by the Orders API might contain multiple fulfillments b
| `PickupDetails` | [`FulfillmentPickupDetails`](../../doc/models/fulfillment-pickup-details.md) | Optional | Contains details necessary to fulfill a pickup order. | FulfillmentPickupDetails getPickupDetails() |
| `ShipmentDetails` | [`FulfillmentShipmentDetails`](../../doc/models/fulfillment-shipment-details.md) | Optional | Contains the details necessary to fulfill a shipment order. | FulfillmentShipmentDetails getShipmentDetails() |
| `DeliveryDetails` | [`FulfillmentDeliveryDetails`](../../doc/models/fulfillment-delivery-details.md) | Optional | Describes delivery details of an order fulfillment. | FulfillmentDeliveryDetails getDeliveryDetails() |
| `Version` | `Integer` | Optional | The version number attributed to the fulfillment and incremented every time there is a<br>fulfillment-related update. The fulfillment version is an internal field only for use<br>between Orders and the Fulfillment service. | Integer getVersion() |

## Example (as JSON)

Expand Down
2 changes: 0 additions & 2 deletions doc/models/order-return-service-charge.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ Represents the service charge applied to the original order.
| `AppliedTaxes` | [`List<OrderLineItemAppliedTax>`](../../doc/models/order-line-item-applied-tax.md) | Optional | The list of references to `OrderReturnTax` entities applied to the<br>`OrderReturnServiceCharge`. Each `OrderLineItemAppliedTax` has a `tax_uid`<br>that references the `uid` of a top-level `OrderReturnTax` that is being<br>applied to the `OrderReturnServiceCharge`. On reads, the applied amount is<br>populated. | List<OrderLineItemAppliedTax> getAppliedTaxes() |
| `TreatmentType` | [`String`](../../doc/models/order-service-charge-treatment-type.md) | Optional | Indicates whether the service charge will be treated as a value-holding line item or<br>apportioned toward a line item. | String getTreatmentType() |
| `Scope` | [`String`](../../doc/models/order-service-charge-scope.md) | Optional | Indicates whether this is a line-item or order-level apportioned<br>service charge. | String getScope() |
| `AppliedServiceCharges` | [`List<OrderLineItemAppliedServiceCharge>`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to service charges applied to the`OrderReturnServiceCharge`. Each<br>`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a<br>top-level `OrderReturnServiceCharge`. On reads, the amount applied is populated. | List<OrderLineItemAppliedServiceCharge> getAppliedServiceCharges() |
| `TotalServiceChargeMoney` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | Money getTotalServiceChargeMoney() |

## Example (as JSON)

Expand Down
2 changes: 0 additions & 2 deletions doc/models/order-service-charge.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Represents a service charge applied to an order.
| `Type` | [`String`](../../doc/models/order-service-charge-type.md) | Optional | - | String getType() |
| `TreatmentType` | [`String`](../../doc/models/order-service-charge-treatment-type.md) | Optional | Indicates whether the service charge will be treated as a value-holding line item or<br>apportioned toward a line item. | String getTreatmentType() |
| `Scope` | [`String`](../../doc/models/order-service-charge-scope.md) | Optional | Indicates whether this is a line-item or order-level apportioned<br>service charge. | String getScope() |
| `AppliedServiceCharges` | [`List<OrderLineItemAppliedServiceCharge>`](../../doc/models/order-line-item-applied-service-charge.md) | Optional | The list of references to service charges applied to this service charge. Each<br>`OrderLineItemAppliedServiceCharge` has a `service_charge_id` that references the `uid` of a<br>top-level `OrderServiceCharge`. On reads, the amount applied is populated.<br><br>To change the amount of a service charge, modify the referenced top-level service charge. | List<OrderLineItemAppliedServiceCharge> getAppliedServiceCharges() |
| `TotalServiceChargeMoney` | [`Money`](../../doc/models/money.md) | Optional | Represents an amount of money. `Money` fields can be signed or unsigned.<br>Fields that do not explicitly define whether they are signed or unsigned are<br>considered unsigned and can only hold positive amounts. For signed fields, the<br>sign of the value indicates the purpose of the money transfer. See<br>[Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts)<br>for more information. | Money getTotalServiceChargeMoney() |

## Example (as JSON)

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.squareup</groupId>
<artifactId>square</artifactId>
<version>37.0.0.20240118</version>
<version>37.0.1.20240118</version>
<packaging>jar</packaging>
<name>Square</name>
<description>Java client library for the Square API</description>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/squareup/square/SquareClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public final class SquareClient implements SquareClientInterface {

private static final CompatibilityFactory compatibilityFactory = new CompatibilityFactoryImpl();

private static String userAgent = "Square-Java-SDK/37.0.0.20240118 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}";
private static String userAgent = "Square-Java-SDK/37.0.1.20240118 ({api-version}) {engine}/{engine-version} ({os-info}) {detail}";

/**
* Current API environment.
Expand Down Expand Up @@ -697,7 +697,7 @@ public String getAccessToken() {
* @return sdkVersion
*/
public String getSdkVersion() {
return "37.0.0.20240118";
return "37.0.1.20240118";
}

/**
Expand Down
48 changes: 8 additions & 40 deletions src/main/java/com/squareup/square/models/Fulfillment.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class Fulfillment {
private final FulfillmentPickupDetails pickupDetails;
private final FulfillmentShipmentDetails shipmentDetails;
private final FulfillmentDeliveryDetails deliveryDetails;
private final Integer version;

/**
* Initialization constructor.
Expand All @@ -38,7 +37,6 @@ public class Fulfillment {
* @param pickupDetails FulfillmentPickupDetails value for pickupDetails.
* @param shipmentDetails FulfillmentShipmentDetails value for shipmentDetails.
* @param deliveryDetails FulfillmentDeliveryDetails value for deliveryDetails.
* @param version Integer value for version.
*/
@JsonCreator
public Fulfillment(
Expand All @@ -50,8 +48,7 @@ public Fulfillment(
@JsonProperty("metadata") Map<String, String> metadata,
@JsonProperty("pickup_details") FulfillmentPickupDetails pickupDetails,
@JsonProperty("shipment_details") FulfillmentShipmentDetails shipmentDetails,
@JsonProperty("delivery_details") FulfillmentDeliveryDetails deliveryDetails,
@JsonProperty("version") Integer version) {
@JsonProperty("delivery_details") FulfillmentDeliveryDetails deliveryDetails) {
this.uid = OptionalNullable.of(uid);
this.type = type;
this.state = state;
Expand All @@ -61,7 +58,6 @@ public Fulfillment(
this.pickupDetails = pickupDetails;
this.shipmentDetails = shipmentDetails;
this.deliveryDetails = deliveryDetails;
this.version = version;
}

/**
Expand All @@ -75,14 +71,13 @@ public Fulfillment(
* @param pickupDetails FulfillmentPickupDetails value for pickupDetails.
* @param shipmentDetails FulfillmentShipmentDetails value for shipmentDetails.
* @param deliveryDetails FulfillmentDeliveryDetails value for deliveryDetails.
* @param version Integer value for version.
*/

protected Fulfillment(OptionalNullable<String> uid, String type, String state,
String lineItemApplication, List<FulfillmentFulfillmentEntry> entries,
OptionalNullable<Map<String, String>> metadata, FulfillmentPickupDetails pickupDetails,
FulfillmentShipmentDetails shipmentDetails, FulfillmentDeliveryDetails deliveryDetails,
Integer version) {
FulfillmentShipmentDetails shipmentDetails,
FulfillmentDeliveryDetails deliveryDetails) {
this.uid = uid;
this.type = type;
this.state = state;
Expand All @@ -92,7 +87,6 @@ protected Fulfillment(OptionalNullable<String> uid, String type, String state,
this.pickupDetails = pickupDetails;
this.shipmentDetails = shipmentDetails;
this.deliveryDetails = deliveryDetails;
this.version = version;
}

/**
Expand Down Expand Up @@ -243,23 +237,10 @@ public FulfillmentDeliveryDetails getDeliveryDetails() {
return deliveryDetails;
}

/**
* Getter for Version.
* The version number attributed to the fulfillment and incremented every time there is a
* fulfillment-related update. The fulfillment version is an internal field only for use between
* Orders and the Fulfillment service.
* @return Returns the Integer
*/
@JsonGetter("version")
@JsonInclude(JsonInclude.Include.NON_NULL)
public Integer getVersion() {
return version;
}

@Override
public int hashCode() {
return Objects.hash(uid, type, state, lineItemApplication, entries, metadata, pickupDetails,
shipmentDetails, deliveryDetails, version);
shipmentDetails, deliveryDetails);
}

@Override
Expand All @@ -279,8 +260,7 @@ public boolean equals(Object obj) {
&& Objects.equals(metadata, other.metadata)
&& Objects.equals(pickupDetails, other.pickupDetails)
&& Objects.equals(shipmentDetails, other.shipmentDetails)
&& Objects.equals(deliveryDetails, other.deliveryDetails)
&& Objects.equals(version, other.version);
&& Objects.equals(deliveryDetails, other.deliveryDetails);
}

/**
Expand All @@ -293,7 +273,7 @@ public String toString() {
+ ", lineItemApplication=" + lineItemApplication + ", entries=" + entries
+ ", metadata=" + metadata + ", pickupDetails=" + pickupDetails
+ ", shipmentDetails=" + shipmentDetails + ", deliveryDetails=" + deliveryDetails
+ ", version=" + version + "]";
+ "]";
}

/**
Expand All @@ -309,8 +289,7 @@ public Builder toBuilder() {
.entries(getEntries())
.pickupDetails(getPickupDetails())
.shipmentDetails(getShipmentDetails())
.deliveryDetails(getDeliveryDetails())
.version(getVersion());
.deliveryDetails(getDeliveryDetails());
builder.uid = internalGetUid();
builder.metadata = internalGetMetadata();
return builder;
Expand All @@ -329,7 +308,6 @@ public static class Builder {
private FulfillmentPickupDetails pickupDetails;
private FulfillmentShipmentDetails shipmentDetails;
private FulfillmentDeliveryDetails deliveryDetails;
private Integer version;



Expand Down Expand Up @@ -441,23 +419,13 @@ public Builder deliveryDetails(FulfillmentDeliveryDetails deliveryDetails) {
return this;
}

/**
* Setter for version.
* @param version Integer value for version.
* @return Builder
*/
public Builder version(Integer version) {
this.version = version;
return this;
}

/**
* Builds a new {@link Fulfillment} object using the set fields.
* @return {@link Fulfillment}
*/
public Fulfillment build() {
return new Fulfillment(uid, type, state, lineItemApplication, entries, metadata,
pickupDetails, shipmentDetails, deliveryDetails, version);
pickupDetails, shipmentDetails, deliveryDetails);
}
}
}
Loading

0 comments on commit 00a45b7

Please sign in to comment.