From f6fa444690af78d37dc4cd6ed6acab5be9ba43e1 Mon Sep 17 00:00:00 2001 From: cgrdmz Date: Fri, 23 Aug 2024 15:04:13 +0300 Subject: [PATCH] replace LocalDateTime with ZonedDateTime --- .../java/com/duffel/model/AirlineInitiatedChange.java | 8 ++++---- src/main/java/com/duffel/model/Webhook.java | 6 +++--- src/main/java/com/duffel/model/response/Offer.java | 8 ++++---- .../java/com/duffel/model/response/OfferResponse.java | 4 ++-- src/main/java/com/duffel/model/response/Order.java | 8 ++++---- .../java/com/duffel/model/response/OrderCancellation.java | 8 ++++---- .../com/duffel/model/response/PaymentRequirements.java | 6 +++--- .../java/com/duffel/model/response/PaymentResponse.java | 4 ++-- .../com/duffel/model/response/order/PaymentStatus.java | 6 +++--- .../model/response/orderchange/OrderChangeOffer.java | 8 ++++---- .../model/response/orderchange/OrderChangeResponse.java | 6 +++--- 11 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/duffel/model/AirlineInitiatedChange.java b/src/main/java/com/duffel/model/AirlineInitiatedChange.java index b3ca355..b725317 100644 --- a/src/main/java/com/duffel/model/AirlineInitiatedChange.java +++ b/src/main/java/com/duffel/model/AirlineInitiatedChange.java @@ -7,7 +7,7 @@ import lombok.Getter; import lombok.ToString; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.List; /** @@ -31,7 +31,7 @@ public class AirlineInitiatedChange extends Data { * The ISO 8601 datetime at which an action was taken */ @JsonProperty("action_taken_at") - private LocalDateTime actionTakenAt; + private ZonedDateTime actionTakenAt; /** * List of updated slices and segments following the change. These slices and segments may each have a new ID @@ -55,7 +55,7 @@ public class AirlineInitiatedChange extends Data { * The ISO 8601 datetime at which we detected the airline-initiated change */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * Duffel's unique identifier for the airline-initiated change @@ -86,7 +86,7 @@ public class AirlineInitiatedChange extends Data { * The ISO 8601 datetime at which the airline-initiated change was last updated */ @JsonProperty("updated_at") - private LocalDateTime updatedAt; + private ZonedDateTime updatedAt; /** * Actions that can be taken for this change. diff --git a/src/main/java/com/duffel/model/Webhook.java b/src/main/java/com/duffel/model/Webhook.java index 9da965c..33689be 100644 --- a/src/main/java/com/duffel/model/Webhook.java +++ b/src/main/java/com/duffel/model/Webhook.java @@ -6,7 +6,7 @@ import lombok.Setter; import lombok.ToString; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.List; /** @@ -29,7 +29,7 @@ public class Webhook extends Data { * Example: "2020-04-11T15:48:11.642Z" */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The events that this webhook will be subscribed to @@ -59,7 +59,7 @@ public class Webhook extends Data { * Example: "2020-04-11T15:48:11.642Z" */ @JsonProperty("updated_at") - private LocalDateTime updatedAt; + private ZonedDateTime updatedAt; /** * The URL where your webhook will be received diff --git a/src/main/java/com/duffel/model/response/Offer.java b/src/main/java/com/duffel/model/response/Offer.java index 33d36b3..5c5eb0f 100644 --- a/src/main/java/com/duffel/model/response/Offer.java +++ b/src/main/java/com/duffel/model/response/Offer.java @@ -11,7 +11,7 @@ import lombok.ToString; import java.math.BigDecimal; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.List; /** @@ -73,7 +73,7 @@ public class Offer extends Data { * Example: "2020-01-17T10:12:14.545Z" */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The ISO 8601 datetime expiry of the offer before which the traveller should use this offer to create an order. @@ -81,7 +81,7 @@ public class Offer extends Data { * Example: "2020-01-17T10:42:14.545Z" */ @JsonProperty("expires_at") - private LocalDateTime expiresAt; + private ZonedDateTime expiresAt; /** * Duffel's unique identifier for the offer @@ -189,6 +189,6 @@ public class Offer extends Data { * Example: "2020-01-17T10:12:14.545Z" */ @JsonProperty("updated_at") - private LocalDateTime updatedAt; + private ZonedDateTime updatedAt; } diff --git a/src/main/java/com/duffel/model/response/OfferResponse.java b/src/main/java/com/duffel/model/response/OfferResponse.java index 509611c..fd2bc80 100644 --- a/src/main/java/com/duffel/model/response/OfferResponse.java +++ b/src/main/java/com/duffel/model/response/OfferResponse.java @@ -7,7 +7,7 @@ import lombok.Getter; import lombok.ToString; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.List; /** @@ -44,7 +44,7 @@ public class OfferResponse extends Data { * Example: "2020-02-12T15:21:01.927Z" */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * Whether the offer request was created in live mode. This field will be set to true if the offer request was diff --git a/src/main/java/com/duffel/model/response/Order.java b/src/main/java/com/duffel/model/response/Order.java index 16cef35..52e2a1f 100644 --- a/src/main/java/com/duffel/model/response/Order.java +++ b/src/main/java/com/duffel/model/response/Order.java @@ -10,7 +10,7 @@ import lombok.ToString; import java.math.BigDecimal; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.List; import java.util.Map; @@ -60,7 +60,7 @@ public class Order extends Data { * e.g. "2020-04-11T15:48:11.642Z" */ @JsonProperty("cancelled_at") - private LocalDateTime cancelledAt; + private ZonedDateTime cancelledAt; /** * The conditions associated with this order, describing the kinds of modifications you can make to it and any @@ -78,7 +78,7 @@ public class Order extends Data { * e.g. "2020-04-11T15:48:11.642Z" */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The documents issued for this order @@ -146,7 +146,7 @@ public class Order extends Data { * datetime is in the last minute you can consider the order up to date. */ @JsonProperty("synced_at") - private LocalDateTime syncedAt; + private ZonedDateTime syncedAt; /** * The amount of tax payable on the order for all the flights booked diff --git a/src/main/java/com/duffel/model/response/OrderCancellation.java b/src/main/java/com/duffel/model/response/OrderCancellation.java index 70d3384..04e4156 100644 --- a/src/main/java/com/duffel/model/response/OrderCancellation.java +++ b/src/main/java/com/duffel/model/response/OrderCancellation.java @@ -7,7 +7,7 @@ import lombok.ToString; import java.math.BigDecimal; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; /** * Order cancellation. @@ -21,19 +21,19 @@ public class OrderCancellation { * The ISO 8601 datetime that indicates when the order cancellation was confirmed */ @JsonProperty("confirmed_at") - private LocalDateTime confirmedAt; + private ZonedDateTime confirmedAt; /** * The ISO 8601 datetime at which the order cancellation was created */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The ISO 8601 datetime by which this cancellation must be confirmed */ @JsonProperty("expires_at") - private LocalDateTime expiresAt; + private ZonedDateTime expiresAt; /** * Duffel's unique identifier for the order cancellation diff --git a/src/main/java/com/duffel/model/response/PaymentRequirements.java b/src/main/java/com/duffel/model/response/PaymentRequirements.java index bbb54dd..ee15ad3 100644 --- a/src/main/java/com/duffel/model/response/PaymentRequirements.java +++ b/src/main/java/com/duffel/model/response/PaymentRequirements.java @@ -5,7 +5,7 @@ import lombok.Getter; import lombok.ToString; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; /** * Payment requirements for an order. @@ -22,7 +22,7 @@ public class PaymentRequirements { * Example: "2020-01-17T10:42:14Z" */ @JsonProperty("payment_required_by") - private LocalDateTime paymentRequiredBy; + private ZonedDateTime paymentRequiredBy; /** * The ISO 8601 datetime at which the price associated with the order will no longer be guaranteed by the airline @@ -30,7 +30,7 @@ public class PaymentRequirements { * Example: "2020-01-17T10:42:14" */ @JsonProperty("price_guarantee_expires_at") - private LocalDateTime priceGuaranteeExpiresAt; + private ZonedDateTime priceGuaranteeExpiresAt; /** * When payment is required at the time of booking this will be true and payment_required_by and diff --git a/src/main/java/com/duffel/model/response/PaymentResponse.java b/src/main/java/com/duffel/model/response/PaymentResponse.java index 04f525c..5c31aee 100644 --- a/src/main/java/com/duffel/model/response/PaymentResponse.java +++ b/src/main/java/com/duffel/model/response/PaymentResponse.java @@ -8,7 +8,7 @@ import lombok.ToString; import java.math.BigDecimal; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; /** * Payment response. @@ -30,7 +30,7 @@ public class PaymentResponse extends Data { * Example: "2020-04-11T15:48:11.642Z" */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The currency of the amount, as an ISO 4217 currency code. It will match your organisation's billing currency diff --git a/src/main/java/com/duffel/model/response/order/PaymentStatus.java b/src/main/java/com/duffel/model/response/order/PaymentStatus.java index ef12f75..35dc24b 100644 --- a/src/main/java/com/duffel/model/response/order/PaymentStatus.java +++ b/src/main/java/com/duffel/model/response/order/PaymentStatus.java @@ -5,7 +5,7 @@ import lombok.Getter; import lombok.ToString; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; /** * Status of an order payment. @@ -28,13 +28,13 @@ public class PaymentStatus { * where awaiting_payment is false. */ @JsonProperty("payment_required_by") - private LocalDateTime paymentRequiredBy; + private ZonedDateTime paymentRequiredBy; /** * The ISO 8601 datetime at which the price associated with the order will no longer be guaranteed by the airline * and the order will need to be repriced before payment. This will be null when there is no price guarantee. */ @JsonProperty("price_guarantee_expires_at") - private LocalDateTime priceGuaranteeExpiresAt; + private ZonedDateTime priceGuaranteeExpiresAt; } diff --git a/src/main/java/com/duffel/model/response/orderchange/OrderChangeOffer.java b/src/main/java/com/duffel/model/response/orderchange/OrderChangeOffer.java index 577e853..34be17f 100644 --- a/src/main/java/com/duffel/model/response/orderchange/OrderChangeOffer.java +++ b/src/main/java/com/duffel/model/response/orderchange/OrderChangeOffer.java @@ -8,7 +8,7 @@ import lombok.ToString; import java.math.BigDecimal; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; /** * Change order possible offer. @@ -38,13 +38,13 @@ public class OrderChangeOffer extends Data { * The ISO 8601 datetime at which the offer was created */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The ISO 8601 datetime at which the offer will expire and no longer be usable to create an order */ @JsonProperty("expires_at") - private LocalDateTime expiresAt; + private ZonedDateTime expiresAt; /** * Duffel's unique identifier for the order change offer @@ -107,7 +107,7 @@ public class OrderChangeOffer extends Data { * The ISO 8601 datetime at which the offer was last updated */ @JsonProperty("updated_at") - private LocalDateTime updatedAt; + private ZonedDateTime updatedAt; /** * The slices within an order change that are being added to and/or removed from the order diff --git a/src/main/java/com/duffel/model/response/orderchange/OrderChangeResponse.java b/src/main/java/com/duffel/model/response/orderchange/OrderChangeResponse.java index ea58c50..81118d6 100644 --- a/src/main/java/com/duffel/model/response/orderchange/OrderChangeResponse.java +++ b/src/main/java/com/duffel/model/response/orderchange/OrderChangeResponse.java @@ -7,7 +7,7 @@ import lombok.Getter; import lombok.ToString; -import java.time.LocalDateTime; +import java.time.ZonedDateTime; import java.util.List; /** @@ -22,7 +22,7 @@ public class OrderChangeResponse extends Data { * The ISO 8601 datetime at which the order change request was created */ @JsonProperty("created_at") - private LocalDateTime createdAt; + private ZonedDateTime createdAt; /** * The ID of your order change request @@ -59,6 +59,6 @@ public class OrderChangeResponse extends Data { * The ISO 8601 datetime at which the order change request was last updated */ @JsonProperty("updated_at") - private LocalDateTime updatedAt; + private ZonedDateTime updatedAt; }