Skip to content

Instantly share code, notes, and snippets.

@roylee0704
Created March 29, 2020 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roylee0704/6f73f4e71a67b7efd2c95178af4a5d34 to your computer and use it in GitHub Desktop.
Save roylee0704/6f73f4e71a67b7efd2c95178af4a5d34 to your computer and use it in GitHub Desktop.
shipping rate result
import { Field, ObjectType } from 'type-graphql';
@ObjectType('ShippingRate', {
description:
'A shipping rate to be applied to an order.',
})
export class ShippingRateDto {
@Field({
description: 'The name of the carrier, which customers see at checkout',
})
carrierName: string;
@Field({
description: 'A unique code associated with the carrier. For example: `ninja_van`.',
})
carrierCode: string;
@Field({
description: 'The name of the service, which customers see at checkout. For example: `Standard Delivery`.',
})
serviceName: string;
@Field({
description: 'A unique code associated with the service. For example: `ninja_standard_delivery`.',
})
serviceCode: string;
@Field({
description: 'A description of the rate, which customers see at checkout. For example: `Includes tracking and insurance`.',
})
description: string;
@Field({
description: 'The total price based on the shipping rate currency.',
})
totalPrice: number;
@Field({
description: 'The currency of the shipping rate.',
})
currency: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment