From 76bd14c1386f56a5e7beb4d187bb140d22d01fab Mon Sep 17 00:00:00 2001 From: Andrew Throener Date: Wed, 23 Aug 2017 12:56:26 -0500 Subject: [PATCH] Fix Invoice type Test fix (paypal-rest-sdk): Fix invoice type --- types/paypal-rest-sdk/index.d.ts | 15 +++++++++++++-- types/paypal-rest-sdk/paypal-rest-sdk-tests.ts | 5 +++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/types/paypal-rest-sdk/index.d.ts b/types/paypal-rest-sdk/index.d.ts index cf98180742..414c3fa0f5 100644 --- a/types/paypal-rest-sdk/index.d.ts +++ b/types/paypal-rest-sdk/index.d.ts @@ -132,6 +132,7 @@ export interface QueryParameters { webhook_id?: string; page?: number; total_count_required?: boolean; + status?: string[]; } export interface Link { @@ -447,7 +448,7 @@ export namespace invoice { } interface Invoice { allow_tip?: boolean; - billing_info?: BillingInfo; + billing_info?: [BillingInfo]; discount?: Cost; shipping_cost?: ShippingCost; readonly id?: string; @@ -455,7 +456,16 @@ export namespace invoice { items?: InvoiceItem[]; merchant_info?: Merchant; readonly metadata?: { - created_date: string; + created_date?: string; + created_by?: string; + cancelled_date?: string; + cancelled_by?: string; + last_updated_date?: string; + last_updated_by?: string; + first_sent_date?: string; + last_sent_date?: string; + last_sent_by?: string; + payer_view_url?: string; }; note?: string; number?: string; @@ -507,6 +517,7 @@ export namespace invoice { email?: string; language?: string; notification_channel?: string; + additional_info?: string; } interface InvoiceItem { name: string; diff --git a/types/paypal-rest-sdk/paypal-rest-sdk-tests.ts b/types/paypal-rest-sdk/paypal-rest-sdk-tests.ts index 03f82894bd..c82e525408 100644 --- a/types/paypal-rest-sdk/paypal-rest-sdk-tests.ts +++ b/types/paypal-rest-sdk/paypal-rest-sdk-tests.ts @@ -434,11 +434,12 @@ const minInvoice: paypal.invoice.Invoice = {}; // Max Invoice const maxInvoice: paypal.invoice.Invoice = { allow_tip: true, - billing_info: { + billing_info: [{ email: 'asfd', language: 'string', notification_channel: 'string', - }, + additional_info: 'string', + }], discount: { percent: 2, amount: {