Skip to content

Commit

Permalink
Merge pull request #356 from XeroAPI/json
Browse files Browse the repository at this point in the history
json: true
  • Loading branch information
SerKnight authored Feb 10, 2020
2 parents 3cd1532 + bf9d7af commit 671a9da
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 35 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log
---------
## "version": "4.1.7"
* Fixed file uploads.. Image data was being force encoded in JSON.. Using mime type now
* emailInvoice and functions with an empty response need `json: true` to succeed when its a 204 response
* adds some additional types and optionalitities to ceratin functions

## "version": "4.1.5"

* Relaxes required types for certain objects & parameters
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xero-node",
"version": "4.1.5",
"version": "4.1.7",
"description": "Xero NodeJS OAuth 2.0 client for xero-node",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
30 changes: 2 additions & 28 deletions src/gen/api/accountingApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -338,7 +337,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -645,7 +643,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -1031,7 +1028,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -1492,7 +1488,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -2077,7 +2072,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -2595,7 +2589,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -3749,7 +3742,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -3920,7 +3912,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -4832,7 +4823,8 @@ export class AccountingApi {
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,json: true,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(requestEmpty, "RequestEmpty")
};

Expand Down Expand Up @@ -5125,7 +5117,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -5488,7 +5479,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -5927,7 +5917,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -6684,7 +6673,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -7402,7 +7390,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -8318,7 +8305,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -9346,7 +9332,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -11044,7 +11029,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -11478,7 +11462,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

let authenticationPromise = Promise.resolve();
Expand Down Expand Up @@ -12953,7 +12936,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -13124,7 +13106,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -13221,7 +13202,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -13390,7 +13370,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -13634,7 +13613,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -13951,7 +13929,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -14268,7 +14245,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -15082,7 +15058,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down Expand Up @@ -15180,7 +15155,6 @@ export class AccountingApi {
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
body: ObjectSerializer.serialize(body, "string")
};

Expand Down
9 changes: 9 additions & 0 deletions src/gen/model/accounting/lineItemTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ export class LineItemTracking {
*/
'trackingCategoryID'?: string;
/**
* The Xero identifier for a tracking category option
*/
'trackingOptionID'?: string;
/**
* The name of the tracking category
*/
'name'?: string;
Expand All @@ -33,6 +37,11 @@ export class LineItemTracking {
"baseName": "TrackingCategoryID",
"type": "string"
},
{
"name": "trackingOptionID",
"baseName": "TrackingOptionID",
"type": "string"
},
{
"name": "name",
"baseName": "Name",
Expand Down
3 changes: 3 additions & 0 deletions src/gen/model/accounting/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export * from './purchase';
export * from './purchaseOrder';
export * from './purchaseOrders';
export * from './quote';
export * from './quoteLineAmountTypes';
export * from './quoteStatusCodes';
export * from './quotes';
export * from './receipt';
Expand Down Expand Up @@ -193,6 +194,7 @@ import { Purchase } from './purchase';
import { PurchaseOrder } from './purchaseOrder';
import { PurchaseOrders } from './purchaseOrders';
import { Quote } from './quote';
import { QuoteLineAmountTypes } from './quoteLineAmountTypes';
import { QuoteStatusCodes } from './quoteStatusCodes';
import { Quotes } from './quotes';
import { Receipt } from './receipt';
Expand Down Expand Up @@ -282,6 +284,7 @@ let enumsMap: {[index: string]: any} = {
"Prepayment.TypeEnum": Prepayment.TypeEnum,
"Prepayment.StatusEnum": Prepayment.StatusEnum,
"PurchaseOrder.StatusEnum": PurchaseOrder.StatusEnum,
"QuoteLineAmountTypes": QuoteLineAmountTypes,
"QuoteStatusCodes": QuoteStatusCodes,
"Receipt.StatusEnum": Receipt.StatusEnum,
"RepeatingInvoice.TypeEnum": RepeatingInvoice.TypeEnum,
Expand Down
12 changes: 6 additions & 6 deletions src/gen/model/accounting/quote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

import { Contact } from './contact';
import { CurrencyCode } from './currencyCode';
import { LineAmountTypes } from './lineAmountTypes';
import { LineItem } from './lineItem';
import { QuoteLineAmountTypes } from './quoteLineAmountTypes';
import { QuoteStatusCodes } from './quoteStatusCodes';

export class Quote {
Expand All @@ -33,15 +33,15 @@ export class Quote {
* Terms of the quote
*/
'terms'?: string;
'contact': Contact;
'contact'?: Contact;
/**
* See LineItems
*/
'lineItems': Array<LineItem>;
'lineItems'?: Array<LineItem>;
/**
* Date quote was issued – YYYY-MM-DD. If the Date element is not specified it will default to the current date based on the timezone setting of the organisation
*/
'date': string;
'date'?: string;
/**
* Date the quote was issued (YYYY-MM-DD)
*/
Expand Down Expand Up @@ -92,7 +92,7 @@ export class Quote {
* Last modified date UTC format
*/
'updatedDateUTC'?: Date;
'lineAmountTypes'?: LineAmountTypes;
'lineAmountTypes'?: QuoteLineAmountTypes;

static discriminator: string | undefined = undefined;

Expand Down Expand Up @@ -205,7 +205,7 @@ export class Quote {
{
"name": "lineAmountTypes",
"baseName": "LineAmountTypes",
"type": "LineAmountTypes"
"type": "QuoteLineAmountTypes"
} ];

static getAttributeTypeMap() {
Expand Down
21 changes: 21 additions & 0 deletions src/gen/model/accounting/quoteLineAmountTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Accounting API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


/**
* Line amounts are exclusive of tax by default if you don’t specify this element. See Line Amount Types
*/
export enum QuoteLineAmountTypes {
EXCLUSIVE = <any> 'EXCLUSIVE',
INCLUSIVE = <any> 'INCLUSIVE',
NOTAX = <any> 'NOTAX'
}

0 comments on commit 671a9da

Please sign in to comment.