Skip to content

Instantly share code, notes, and snippets.

@oops-wrong
Created December 21, 2022 09:53
Show Gist options
  • Save oops-wrong/fdf84c50f076d93c9b3f4ea85cfae4ba to your computer and use it in GitHub Desktop.
Save oops-wrong/fdf84c50f076d93c9b3f4ea85cfae4ba to your computer and use it in GitHub Desktop.
import { CheckoutEmailAddress } from './checkout';
import { Price } from './price';
import { Merchandise } from './product';
// Explanations https://shopify.dev/api/storefront/2022-04/objects/Order
export interface Order {
canceledAt?: string;
cancelReason?: string;
currencyCode: string;
currentSubtotalPrice: string;
currentSubtotalPriceOrigin: Price;
currentTotalDuties?: string;
currentTotalDutiesOrigin?: Price;
currentTotalPrice: string;
currentTotalPriceOrigin: Price;
currentTotalTax: string;
currentTotalTaxOrigin: Price;
customerUrl: string;
email: string;
financialStatus: string;
id: string;
lineItems: OrderLineItem[];
orderNumber: number;
originalTotalDuties?: string;
originalTotalDutiesOrigin?: Price;
originalTotalPrice: string;
originalTotalPriceOrigin: Price;
phone?: string;
processedAt: string;
shippingAddress: CheckoutEmailAddress;
shippingDiscountAllocations: {
allocatedAmount: string;
allocatedAmountOrigin: Price;
}[];
statusUrl: string;
subtotalPrice: string;
subtotalPriceOrigin: Price;
totalPrice: string;
totalPriceOrigin: Price;
totalRefunded: string;
totalRefundedOrigin: Price;
totalShippingPrice: string;
totalShippingPriceOrigin: Price;
totalTax: string;
totalTaxOrigin: Price;
}
export interface OrderLineItem {
currentQuantity: number;
discountAllocations: {
allocatedAmount: string;
allocatedAmountOrigin: Price;
}[];
discountedTotalPrice: string;
discountedTotalPriceOrigin: Price;
originalTotalPrice: string;
originalTotalPriceOrigin: Price;
quantity: number;
title: string;
variant: Merchandise;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment