yellowgrid-api-ts 3.2.90-dev.0 → 3.2.91-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -162,6 +162,7 @@ Class | Method | HTTP request | Description
162
162
  *OrdersApi* | [**getGetOrderPdf**](docs/OrdersApi.md#getgetorderpdf) | **GET** /orders/{id}/pdf | Download Order PDF
163
163
  *OrdersApi* | [**getGetOrderSummary**](docs/OrdersApi.md#getgetordersummary) | **GET** /admin/orders/{id}/summary | Get Order Summary (Admin)
164
164
  *OrdersApi* | [**getGetOrders**](docs/OrdersApi.md#getgetorders) | **GET** /orders | Get Orders (Beta)
165
+ *OrdersApi* | [**getUpdatePaymentStatus**](docs/OrdersApi.md#getupdatepaymentstatus) | **GET** /admin/orders/{id}/paid | Change Payment Status (Admin)
165
166
  *OrdersApi* | [**postAddOrderNote**](docs/OrdersApi.md#postaddordernote) | **POST** /admin/orders/{id}/notes | Add Order Note
166
167
  *OrdersApi* | [**postCreateAdminOrder**](docs/OrdersApi.md#postcreateadminorder) | **POST** /admin/orders | Create An Order (Admin)
167
168
  *OrdersApi* | [**postCreateConsignment**](docs/OrdersApi.md#postcreateconsignment) | **POST** /admin/orders/{id}/shipments/{shipment_id}/consignment | Create Shipping Consignment
package/api.ts CHANGED
@@ -20362,6 +20362,47 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
20362
20362
 
20363
20363
 
20364
20364
 
20365
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
20366
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20367
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
20368
+
20369
+ return {
20370
+ url: toPathString(localVarUrlObj),
20371
+ options: localVarRequestOptions,
20372
+ };
20373
+ },
20374
+ /**
20375
+ * Change Payment Status (Admin)
20376
+ * @summary Change Payment Status (Admin)
20377
+ * @param {number} id Order ID
20378
+ * @param {boolean} id2 Paid
20379
+ * @param {*} [options] Override http request option.
20380
+ * @throws {RequiredError}
20381
+ */
20382
+ getUpdatePaymentStatus: async (id: number, id2: boolean, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
20383
+ // verify required parameter 'id' is not null or undefined
20384
+ assertParamExists('getUpdatePaymentStatus', 'id', id)
20385
+ // verify required parameter 'id2' is not null or undefined
20386
+ assertParamExists('getUpdatePaymentStatus', 'id2', id2)
20387
+ const localVarPath = `/admin/orders/{id}/paid`
20388
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
20389
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
20390
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
20391
+ let baseOptions;
20392
+ if (configuration) {
20393
+ baseOptions = configuration.baseOptions;
20394
+ }
20395
+
20396
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
20397
+ const localVarHeaderParameter = {} as any;
20398
+ const localVarQueryParameter = {} as any;
20399
+
20400
+ if (id2 !== undefined) {
20401
+ localVarQueryParameter['id'] = id2;
20402
+ }
20403
+
20404
+
20405
+
20365
20406
  setSearchParams(localVarUrlObj, localVarQueryParameter);
20366
20407
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
20367
20408
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -21146,6 +21187,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
21146
21187
  const localVarOperationServerBasePath = operationServerMap['OrdersApi.getGetOrders']?.[localVarOperationServerIndex]?.url;
21147
21188
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
21148
21189
  },
21190
+ /**
21191
+ * Change Payment Status (Admin)
21192
+ * @summary Change Payment Status (Admin)
21193
+ * @param {number} id Order ID
21194
+ * @param {boolean} id2 Paid
21195
+ * @param {*} [options] Override http request option.
21196
+ * @throws {RequiredError}
21197
+ */
21198
+ async getUpdatePaymentStatus(id: number, id2: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderDetailsDTO>> {
21199
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getUpdatePaymentStatus(id, id2, options);
21200
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
21201
+ const localVarOperationServerBasePath = operationServerMap['OrdersApi.getUpdatePaymentStatus']?.[localVarOperationServerIndex]?.url;
21202
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
21203
+ },
21149
21204
  /**
21150
21205
  * Add Order Note
21151
21206
  * @summary Add Order Note
@@ -21485,6 +21540,17 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
21485
21540
  getGetOrders(pageSize?: number, page?: number, search?: string, fulfillable?: boolean | null, status?: GetGetOrdersStatusEnum, filter?: GetGetOrdersFilterEnum, customerId?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<OrderSummariesModel> {
21486
21541
  return localVarFp.getGetOrders(pageSize, page, search, fulfillable, status, filter, customerId, options).then((request) => request(axios, basePath));
21487
21542
  },
21543
+ /**
21544
+ * Change Payment Status (Admin)
21545
+ * @summary Change Payment Status (Admin)
21546
+ * @param {number} id Order ID
21547
+ * @param {boolean} id2 Paid
21548
+ * @param {*} [options] Override http request option.
21549
+ * @throws {RequiredError}
21550
+ */
21551
+ getUpdatePaymentStatus(id: number, id2: boolean, options?: RawAxiosRequestConfig): AxiosPromise<OrderDetailsDTO> {
21552
+ return localVarFp.getUpdatePaymentStatus(id, id2, options).then((request) => request(axios, basePath));
21553
+ },
21488
21554
  /**
21489
21555
  * Add Order Note
21490
21556
  * @summary Add Order Note
@@ -21799,6 +21865,19 @@ export class OrdersApi extends BaseAPI {
21799
21865
  return OrdersApiFp(this.configuration).getGetOrders(pageSize, page, search, fulfillable, status, filter, customerId, options).then((request) => request(this.axios, this.basePath));
21800
21866
  }
21801
21867
 
21868
+ /**
21869
+ * Change Payment Status (Admin)
21870
+ * @summary Change Payment Status (Admin)
21871
+ * @param {number} id Order ID
21872
+ * @param {boolean} id2 Paid
21873
+ * @param {*} [options] Override http request option.
21874
+ * @throws {RequiredError}
21875
+ * @memberof OrdersApi
21876
+ */
21877
+ public getUpdatePaymentStatus(id: number, id2: boolean, options?: RawAxiosRequestConfig) {
21878
+ return OrdersApiFp(this.configuration).getUpdatePaymentStatus(id, id2, options).then((request) => request(this.axios, this.basePath));
21879
+ }
21880
+
21802
21881
  /**
21803
21882
  * Add Order Note
21804
21883
  * @summary Add Order Note
package/dist/api.d.ts CHANGED
@@ -15741,6 +15741,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
15741
15741
  * @throws {RequiredError}
15742
15742
  */
15743
15743
  getGetOrders: (pageSize?: number, page?: number, search?: string, fulfillable?: boolean | null, status?: GetGetOrdersStatusEnum, filter?: GetGetOrdersFilterEnum, customerId?: number | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15744
+ /**
15745
+ * Change Payment Status (Admin)
15746
+ * @summary Change Payment Status (Admin)
15747
+ * @param {number} id Order ID
15748
+ * @param {boolean} id2 Paid
15749
+ * @param {*} [options] Override http request option.
15750
+ * @throws {RequiredError}
15751
+ */
15752
+ getUpdatePaymentStatus: (id: number, id2: boolean, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
15744
15753
  /**
15745
15754
  * Add Order Note
15746
15755
  * @summary Add Order Note
@@ -15981,6 +15990,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
15981
15990
  * @throws {RequiredError}
15982
15991
  */
15983
15992
  getGetOrders(pageSize?: number, page?: number, search?: string, fulfillable?: boolean | null, status?: GetGetOrdersStatusEnum, filter?: GetGetOrdersFilterEnum, customerId?: number | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderSummariesModel>>;
15993
+ /**
15994
+ * Change Payment Status (Admin)
15995
+ * @summary Change Payment Status (Admin)
15996
+ * @param {number} id Order ID
15997
+ * @param {boolean} id2 Paid
15998
+ * @param {*} [options] Override http request option.
15999
+ * @throws {RequiredError}
16000
+ */
16001
+ getUpdatePaymentStatus(id: number, id2: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OrderDetailsDTO>>;
15984
16002
  /**
15985
16003
  * Add Order Note
15986
16004
  * @summary Add Order Note
@@ -16221,6 +16239,15 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
16221
16239
  * @throws {RequiredError}
16222
16240
  */
16223
16241
  getGetOrders(pageSize?: number, page?: number, search?: string, fulfillable?: boolean | null, status?: GetGetOrdersStatusEnum, filter?: GetGetOrdersFilterEnum, customerId?: number | null, options?: RawAxiosRequestConfig): AxiosPromise<OrderSummariesModel>;
16242
+ /**
16243
+ * Change Payment Status (Admin)
16244
+ * @summary Change Payment Status (Admin)
16245
+ * @param {number} id Order ID
16246
+ * @param {boolean} id2 Paid
16247
+ * @param {*} [options] Override http request option.
16248
+ * @throws {RequiredError}
16249
+ */
16250
+ getUpdatePaymentStatus(id: number, id2: boolean, options?: RawAxiosRequestConfig): AxiosPromise<OrderDetailsDTO>;
16224
16251
  /**
16225
16252
  * Add Order Note
16226
16253
  * @summary Add Order Note
@@ -16473,6 +16500,16 @@ export declare class OrdersApi extends BaseAPI {
16473
16500
  * @memberof OrdersApi
16474
16501
  */
16475
16502
  getGetOrders(pageSize?: number, page?: number, search?: string, fulfillable?: boolean | null, status?: GetGetOrdersStatusEnum, filter?: GetGetOrdersFilterEnum, customerId?: number | null, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderSummariesModel, any, {}>>;
16503
+ /**
16504
+ * Change Payment Status (Admin)
16505
+ * @summary Change Payment Status (Admin)
16506
+ * @param {number} id Order ID
16507
+ * @param {boolean} id2 Paid
16508
+ * @param {*} [options] Override http request option.
16509
+ * @throws {RequiredError}
16510
+ * @memberof OrdersApi
16511
+ */
16512
+ getUpdatePaymentStatus(id: number, id2: boolean, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderDetailsDTO, any, {}>>;
16476
16513
  /**
16477
16514
  * Add Order Note
16478
16515
  * @summary Add Order Note
package/dist/api.js CHANGED
@@ -10278,6 +10278,49 @@ var OrdersApiAxiosParamCreator = function (configuration) {
10278
10278
  });
10279
10279
  });
10280
10280
  },
10281
+ /**
10282
+ * Change Payment Status (Admin)
10283
+ * @summary Change Payment Status (Admin)
10284
+ * @param {number} id Order ID
10285
+ * @param {boolean} id2 Paid
10286
+ * @param {*} [options] Override http request option.
10287
+ * @throws {RequiredError}
10288
+ */
10289
+ getUpdatePaymentStatus: function (id_1, id2_1) {
10290
+ var args_1 = [];
10291
+ for (var _i = 2; _i < arguments.length; _i++) {
10292
+ args_1[_i - 2] = arguments[_i];
10293
+ }
10294
+ return __awaiter(_this, __spreadArray([id_1, id2_1], args_1, true), void 0, function (id, id2, options) {
10295
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
10296
+ if (options === void 0) { options = {}; }
10297
+ return __generator(this, function (_a) {
10298
+ // verify required parameter 'id' is not null or undefined
10299
+ (0, common_1.assertParamExists)('getUpdatePaymentStatus', 'id', id);
10300
+ // verify required parameter 'id2' is not null or undefined
10301
+ (0, common_1.assertParamExists)('getUpdatePaymentStatus', 'id2', id2);
10302
+ localVarPath = "/admin/orders/{id}/paid"
10303
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
10304
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
10305
+ if (configuration) {
10306
+ baseOptions = configuration.baseOptions;
10307
+ }
10308
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
10309
+ localVarHeaderParameter = {};
10310
+ localVarQueryParameter = {};
10311
+ if (id2 !== undefined) {
10312
+ localVarQueryParameter['id'] = id2;
10313
+ }
10314
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
10315
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10316
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
10317
+ return [2 /*return*/, {
10318
+ url: (0, common_1.toPathString)(localVarUrlObj),
10319
+ options: localVarRequestOptions,
10320
+ }];
10321
+ });
10322
+ });
10323
+ },
10281
10324
  /**
10282
10325
  * Add Order Note
10283
10326
  * @summary Add Order Note
@@ -11179,6 +11222,30 @@ var OrdersApiFp = function (configuration) {
11179
11222
  });
11180
11223
  });
11181
11224
  },
11225
+ /**
11226
+ * Change Payment Status (Admin)
11227
+ * @summary Change Payment Status (Admin)
11228
+ * @param {number} id Order ID
11229
+ * @param {boolean} id2 Paid
11230
+ * @param {*} [options] Override http request option.
11231
+ * @throws {RequiredError}
11232
+ */
11233
+ getUpdatePaymentStatus: function (id, id2, options) {
11234
+ return __awaiter(this, void 0, void 0, function () {
11235
+ var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
11236
+ var _a, _b, _c;
11237
+ return __generator(this, function (_d) {
11238
+ switch (_d.label) {
11239
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUpdatePaymentStatus(id, id2, options)];
11240
+ case 1:
11241
+ localVarAxiosArgs = _d.sent();
11242
+ localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
11243
+ localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.getUpdatePaymentStatus']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
11244
+ return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
11245
+ }
11246
+ });
11247
+ });
11248
+ },
11182
11249
  /**
11183
11250
  * Add Order Note
11184
11251
  * @summary Add Order Note
@@ -11668,6 +11735,17 @@ var OrdersApiFactory = function (configuration, basePath, axios) {
11668
11735
  getGetOrders: function (pageSize, page, search, fulfillable, status, filter, customerId, options) {
11669
11736
  return localVarFp.getGetOrders(pageSize, page, search, fulfillable, status, filter, customerId, options).then(function (request) { return request(axios, basePath); });
11670
11737
  },
11738
+ /**
11739
+ * Change Payment Status (Admin)
11740
+ * @summary Change Payment Status (Admin)
11741
+ * @param {number} id Order ID
11742
+ * @param {boolean} id2 Paid
11743
+ * @param {*} [options] Override http request option.
11744
+ * @throws {RequiredError}
11745
+ */
11746
+ getUpdatePaymentStatus: function (id, id2, options) {
11747
+ return localVarFp.getUpdatePaymentStatus(id, id2, options).then(function (request) { return request(axios, basePath); });
11748
+ },
11671
11749
  /**
11672
11750
  * Add Order Note
11673
11751
  * @summary Add Order Note
@@ -11986,6 +12064,19 @@ var OrdersApi = /** @class */ (function (_super) {
11986
12064
  var _this = this;
11987
12065
  return (0, exports.OrdersApiFp)(this.configuration).getGetOrders(pageSize, page, search, fulfillable, status, filter, customerId, options).then(function (request) { return request(_this.axios, _this.basePath); });
11988
12066
  };
12067
+ /**
12068
+ * Change Payment Status (Admin)
12069
+ * @summary Change Payment Status (Admin)
12070
+ * @param {number} id Order ID
12071
+ * @param {boolean} id2 Paid
12072
+ * @param {*} [options] Override http request option.
12073
+ * @throws {RequiredError}
12074
+ * @memberof OrdersApi
12075
+ */
12076
+ OrdersApi.prototype.getUpdatePaymentStatus = function (id, id2, options) {
12077
+ var _this = this;
12078
+ return (0, exports.OrdersApiFp)(this.configuration).getUpdatePaymentStatus(id, id2, options).then(function (request) { return request(_this.axios, _this.basePath); });
12079
+ };
11989
12080
  /**
11990
12081
  * Add Order Note
11991
12082
  * @summary Add Order Note
package/docs/OrdersApi.md CHANGED
@@ -14,6 +14,7 @@ All URIs are relative to *https://api.local.yellowgrid.co.uk*
14
14
  |[**getGetOrderPdf**](#getgetorderpdf) | **GET** /orders/{id}/pdf | Download Order PDF|
15
15
  |[**getGetOrderSummary**](#getgetordersummary) | **GET** /admin/orders/{id}/summary | Get Order Summary (Admin)|
16
16
  |[**getGetOrders**](#getgetorders) | **GET** /orders | Get Orders (Beta)|
17
+ |[**getUpdatePaymentStatus**](#getupdatepaymentstatus) | **GET** /admin/orders/{id}/paid | Change Payment Status (Admin)|
17
18
  |[**postAddOrderNote**](#postaddordernote) | **POST** /admin/orders/{id}/notes | Add Order Note|
18
19
  |[**postCreateAdminOrder**](#postcreateadminorder) | **POST** /admin/orders | Create An Order (Admin)|
19
20
  |[**postCreateConsignment**](#postcreateconsignment) | **POST** /admin/orders/{id}/shipments/{shipment_id}/consignment | Create Shipping Consignment|
@@ -600,6 +601,63 @@ No authorization required
600
601
 
601
602
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
602
603
 
604
+ # **getUpdatePaymentStatus**
605
+ > OrderDetailsDTO getUpdatePaymentStatus()
606
+
607
+ Change Payment Status (Admin)
608
+
609
+ ### Example
610
+
611
+ ```typescript
612
+ import {
613
+ OrdersApi,
614
+ Configuration
615
+ } from 'yellowgrid-api-ts';
616
+
617
+ const configuration = new Configuration();
618
+ const apiInstance = new OrdersApi(configuration);
619
+
620
+ let id: number; //Order ID (default to undefined)
621
+ let id2: boolean; //Paid (default to undefined)
622
+
623
+ const { status, data } = await apiInstance.getUpdatePaymentStatus(
624
+ id,
625
+ id2
626
+ );
627
+ ```
628
+
629
+ ### Parameters
630
+
631
+ |Name | Type | Description | Notes|
632
+ |------------- | ------------- | ------------- | -------------|
633
+ | **id** | [**number**] | Order ID | defaults to undefined|
634
+ | **id2** | [**boolean**] | Paid | defaults to undefined|
635
+
636
+
637
+ ### Return type
638
+
639
+ **OrderDetailsDTO**
640
+
641
+ ### Authorization
642
+
643
+ No authorization required
644
+
645
+ ### HTTP request headers
646
+
647
+ - **Content-Type**: Not defined
648
+ - **Accept**: application/json
649
+
650
+
651
+ ### HTTP response details
652
+ | Status code | Description | Response headers |
653
+ |-------------|-------------|------------------|
654
+ |**200** | Order Details | - |
655
+ |**400** | Bad Request | - |
656
+ |**401** | Unauthorised | - |
657
+ |**403** | Access Denied | - |
658
+
659
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
660
+
603
661
  # **postAddOrderNote**
604
662
  > AuditLogEntity postAddOrderNote()
605
663
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yellowgrid-api-ts",
3
- "version": "3.2.90-dev.0",
3
+ "version": "3.2.91-dev.0",
4
4
  "description": "OpenAPI client for yellowgrid-api-ts",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {