Skip to content

Commit

Permalink
Merge pull request #159 from mollie/pimm/order-create-types
Browse files Browse the repository at this point in the history
Fix types for mollieClient.orders.create
  • Loading branch information
vernondegoede authored Jul 9, 2020
2 parents c027c06 + f22bb98 commit 74ae87a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/resources/orders/parameters.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { CommonListParameters } from '../../types/parameters';
import { OrderAddress, OrderData, OrderEmbed } from '../../data/orders/data';
import { OrderLineData } from '../../data/orders/orderlines/OrderLine';
import { PaymentData } from '../../data/payments/data';
import { PaymentMethod } from '../../data/global';
import PickOptional from '../../types/PickOptional';

export type CreateParameters = Pick<OrderData, 'amount' | 'orderNumber' | 'lines' | 'billingAddress' | 'webhookUrl' | 'locale' | 'metadata' | 'expiresAt'> & {
export type CreateParameters = Pick<OrderData, 'amount' | 'orderNumber' | 'billingAddress' | 'webhookUrl' | 'locale' | 'metadata' | 'expiresAt'> & {
lines: (Pick<OrderLineData, 'name' | 'quantity' | 'unitPrice' | 'totalAmount' | 'vatRate' | 'vatAmount'> &
PickOptional<OrderLineData, 'type' | 'discountAmount' | 'sku' | 'metadata'> & {
category?: string;
imageUrl?: string;
productUrl?: string;
})[];
/**
* The shipping address for the order. If omitted, it is assumed to be identical to the `billingAddress`.
*/
Expand Down

0 comments on commit 74ae87a

Please sign in to comment.