Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing object field to all models #297

Merged
merged 1 commit into from
Dec 7, 2023
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## Next release

- Adds the `object` field to all models; previously, most models were missing this field.

## v7.0.0 (2023-12-06)

- Removes `withCarbonOffset` parameter from `create`, `buy`, and `regenerateRates` functions of the Shipment service as EasyPost now offers Carbon Neutral shipments by default for free
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/easypost/model/BaseUser.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public class BaseUser extends EasyPostResource {
private String rechargeAmount;
private String secondaryRechargeAmount;
private String rechargeThreshold;
private String object;
private String parentId;
private boolean verified;
private String pricePerShipment;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/easypost/model/CarrierAccount.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

@Getter
public final class CarrierAccount extends EasyPostResource {
private String object;
private String type;
private Fields fields;
private boolean clone;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/easypost/model/EasyPostResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
public abstract class EasyPostResource {
private String id;
private String mode;
private String object;
private Date createdAt;
private Date updatedAt;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/easypost/model/EventData.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
@Getter
public final class EventData extends EasyPostResource {
private Map<String, Object> previousAttributes;
private EasyPostResource object;
}
1 change: 0 additions & 1 deletion src/main/java/com/easypost/model/PaymentMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ public enum Priority {
SECONDARY
}

private String object;
private PaymentMethodObject primaryPaymentMethod;
private PaymentMethodObject secondaryPaymentMethod;
}
2 changes: 0 additions & 2 deletions src/main/java/com/easypost/model/PaymentMethodObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ String getEndpoint() {
private String last4;
// credit_card
private String name;
// both
private String object;
// bank_account
private boolean verified;

Expand Down
78 changes: 42 additions & 36 deletions src/test/cassettes/batch/add_remove_shipment_with_list.json

Large diffs are not rendered by default.

74 changes: 37 additions & 37 deletions src/test/cassettes/batch/add_remove_shipment_with_map.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/test/cassettes/pickup/all.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions src/test/cassettes/pickup/buy.json

Large diffs are not rendered by default.

59 changes: 31 additions & 28 deletions src/test/cassettes/pickup/buy_with_rate.json

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions src/test/cassettes/pickup/cancel.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions src/test/cassettes/pickup/create.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions src/test/cassettes/pickup/get_next_page.json

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions src/test/cassettes/pickup/lowest_rate.json

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions src/test/cassettes/pickup/retrieve.json

Large diffs are not rendered by default.

35 changes: 19 additions & 16 deletions src/test/cassettes/scan_form/create.json

Large diffs are not rendered by default.

55 changes: 26 additions & 29 deletions src/test/cassettes/scan_form/retrieve.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

49 changes: 26 additions & 23 deletions src/test/cassettes/shipment/buy_with_params.json

Large diffs are not rendered by default.

49 changes: 23 additions & 26 deletions src/test/cassettes/shipment/buy_with_rate.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/test/java/com/easypost/AddressTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public void testCreate() throws EasyPostException {

assertInstanceOf(Address.class, address);
assertTrue(address.getId().startsWith("adr_"));
assertEquals("Address", address.getObject());
assertEquals("388 Townsend St", address.getStreet1());
}

Expand Down