You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** The order details. */
export interface Order {
/** The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. */
createTime?: string;
/** The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional. Note: The regular expression provides guidance but does not reject all invalid dates. */
updateTime?: string;
/** The ID of the order. */
id?: string;
/** The payment source used to fund the payment. */
paymentSource?: PaymentSourceResponse;
/** The intent to either capture payment immediately or authorize a payment for an order after order creation. */
intent?: CheckoutPaymentIntent;
payer?: Payer;
/** An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant. */
purchaseUnits?: PurchaseUnit[];
/** The order status. */
status?: OrderStatus;
/** An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 6 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 6 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. */
links?: LinkDescription[];
}
Could you tell us the reason for these properties to be all optional? Because when we use PayPal API it seems all of these properties are set, and I don't see how it could be a valid response without them
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, with the team of PrestaShop Checkout we are using the PayPal TS Server SDK ✋
We have noticed Response DTOs with properties all optional (= nullable), for example the Order DTO: https://github.com/paypal/PayPal-TypeScript-Server-SDK/blob/main/src/models/order.ts#L22
Could you tell us the reason for these properties to be all optional? Because when we use PayPal API it seems all of these properties are set, and I don't see how it could be a valid response without them
Beta Was this translation helpful? Give feedback.
All reactions