Skip to content

Commit

Permalink
feat: update vendor order item status (#319)
Browse files Browse the repository at this point in the history
Co-authored-by: nguyentoanit <nguyentoanit@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nguyentoanit authored Nov 23, 2021
1 parent 9c91476 commit c2bcc4c
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 11 deletions.
2 changes: 2 additions & 0 deletions src/api-models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,7 @@ export {
OrderItemAcknowledgementAcknowledgementCodeEnum as VendorOrdersApiModelOrderItemAcknowledgementAcknowledgementCodeEnum,
OrderItemAcknowledgementRejectionReasonEnum as VendorOrdersApiModelOrderItemAcknowledgementRejectionReasonEnum,
OrderItemStatusAcknowledgementStatusConfirmationStatusEnum as VendorOrdersApiModelOrderItemStatusAcknowledgementStatusConfirmationStatusEnum,
OrderItemStatusReceivingStatusReceiveStatusEnum as VendorOrdersApiModelOrderItemStatusReceivingStatusReceiveStatusEnum,
OrderStatusPurchaseOrderStatusEnum as VendorOrdersApiModelOrderStatusPurchaseOrderStatusEnum,
TaxRegistrationDetailsTaxRegistrationTypeEnum as VendorOrdersApiModelTaxRegistrationDetailsTaxRegistrationTypeEnum,
AcknowledgementStatusDetails as VendorOrdersApiModelAcknowledgementStatusDetails,
Expand All @@ -1182,6 +1183,7 @@ export {
OrderItemStatus as VendorOrdersApiModelOrderItemStatus,
OrderItemStatusAcknowledgementStatus as VendorOrdersApiModelOrderItemStatusAcknowledgementStatus,
OrderItemStatusOrderedQuantity as VendorOrdersApiModelOrderItemStatusOrderedQuantity,
OrderItemStatusReceivingStatus as VendorOrdersApiModelOrderItemStatusReceivingStatus,
OrderList as VendorOrdersApiModelOrderList,
OrderListStatus as VendorOrdersApiModelOrderListStatus,
OrderStatus as VendorOrdersApiModelOrderStatus,
Expand Down
78 changes: 67 additions & 11 deletions src/api-models/vendor-orders-api-model/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ export interface OrderAcknowledgementItem {
* @type {Money}
* @memberof OrderAcknowledgementItem
*/
netCost: Money;
netCost?: Money;
/**
*
* @type {Money}
Expand Down Expand Up @@ -712,6 +712,12 @@ export interface OrderItemStatus {
* @memberof OrderItemStatus
*/
acknowledgementStatus?: OrderItemStatusAcknowledgementStatus;
/**
*
* @type {OrderItemStatusReceivingStatus}
* @memberof OrderItemStatus
*/
receivingStatus?: OrderItemStatusReceivingStatus;
}
/**
* Acknowledgement status information.
Expand Down Expand Up @@ -775,6 +781,42 @@ export interface OrderItemStatusOrderedQuantity {
*/
orderedQuantityDetails?: Array<OrderedQuantityDetails>;
}
/**
* Item receive status at the buyer\'s warehouse.
* @export
* @interface OrderItemStatusReceivingStatus
*/
export interface OrderItemStatusReceivingStatus {
/**
* Receive status of the line item.
* @type {string}
* @memberof OrderItemStatusReceivingStatus
*/
receiveStatus?: OrderItemStatusReceivingStatusReceiveStatusEnum | 'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED';
/**
*
* @type {ItemQuantity}
* @memberof OrderItemStatusReceivingStatus
*/
receivedQuantity?: ItemQuantity;
/**
* The date when the most recent item was received at the buyer\'s warehouse. Must be in ISO-8601 date/time format.
* @type {string}
* @memberof OrderItemStatusReceivingStatus
*/
lastReceiveDate?: string;
}

/**
* @export
* @enum {string}
*/
export enum OrderItemStatusReceivingStatusReceiveStatusEnum {
NotReceived = 'NOT_RECEIVED',
PartiallyReceived = 'PARTIALLY_RECEIVED',
Received = 'RECEIVED'
}

/**
*
* @export
Expand Down Expand Up @@ -1157,13 +1199,14 @@ export const VendorOrdersApiAxiosParamCreator = function (configuration?: Config
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
* @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\&#39;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \&#39;sellingParty.partyId\&#39; in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\&#39;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \&#39;shipToParty.partyId\&#39; in the purchase order. If not included in filter, this will return purchase orders for all the buyer\&#39;s warehouses used for vendor group purchase orders.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getPurchaseOrdersStatus: async (limit?: number, sortOrder?: 'ASC' | 'DESC', nextToken?: string, createdAfter?: string, createdBefore?: string, updatedAfter?: string, updatedBefore?: string, purchaseOrderNumber?: string, purchaseOrderStatus?: 'OPEN' | 'CLOSED', itemConfirmationStatus?: 'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED', orderingVendorCode?: string, shipToPartyId?: string, options: any = {}): Promise<RequestArgs> => {
getPurchaseOrdersStatus: async (limit?: number, sortOrder?: 'ASC' | 'DESC', nextToken?: string, createdAfter?: string, createdBefore?: string, updatedAfter?: string, updatedBefore?: string, purchaseOrderNumber?: string, purchaseOrderStatus?: 'OPEN' | 'CLOSED', itemConfirmationStatus?: 'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED', itemReceiveStatus?: 'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED', orderingVendorCode?: string, shipToPartyId?: string, options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/vendor/orders/v1/purchaseOrdersStatus`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
Expand Down Expand Up @@ -1224,6 +1267,10 @@ export const VendorOrdersApiAxiosParamCreator = function (configuration?: Config
localVarQueryParameter['itemConfirmationStatus'] = itemConfirmationStatus;
}

if (itemReceiveStatus !== undefined) {
localVarQueryParameter['itemReceiveStatus'] = itemReceiveStatus;
}

if (orderingVendorCode !== undefined) {
localVarQueryParameter['orderingVendorCode'] = orderingVendorCode;
}
Expand Down Expand Up @@ -1330,14 +1377,15 @@ export const VendorOrdersApiFp = function(configuration?: Configuration) {
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
* @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\&#39;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \&#39;sellingParty.partyId\&#39; in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\&#39;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \&#39;shipToParty.partyId\&#39; in the purchase order. If not included in filter, this will return purchase orders for all the buyer\&#39;s warehouses used for vendor group purchase orders.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getPurchaseOrdersStatus(limit?: number, sortOrder?: 'ASC' | 'DESC', nextToken?: string, createdAfter?: string, createdBefore?: string, updatedAfter?: string, updatedBefore?: string, purchaseOrderNumber?: string, purchaseOrderStatus?: 'OPEN' | 'CLOSED', itemConfirmationStatus?: 'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED', orderingVendorCode?: string, shipToPartyId?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPurchaseOrdersStatusResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options);
async getPurchaseOrdersStatus(limit?: number, sortOrder?: 'ASC' | 'DESC', nextToken?: string, createdAfter?: string, createdBefore?: string, updatedAfter?: string, updatedBefore?: string, purchaseOrderNumber?: string, purchaseOrderStatus?: 'OPEN' | 'CLOSED', itemConfirmationStatus?: 'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED', itemReceiveStatus?: 'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED', orderingVendorCode?: string, shipToPartyId?: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPurchaseOrdersStatusResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, itemReceiveStatus, orderingVendorCode, shipToPartyId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -1400,14 +1448,15 @@ export const VendorOrdersApiFactory = function (configuration?: Configuration, b
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.
* @param {'NOT_RECEIVED' | 'PARTIALLY_RECEIVED' | 'RECEIVED'} [itemReceiveStatus] Filters purchase orders based on the purchase order\&#39;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \&#39;sellingParty.partyId\&#39; in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\&#39;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \&#39;shipToParty.partyId\&#39; in the purchase order. If not included in filter, this will return purchase orders for all the buyer\&#39;s warehouses used for vendor group purchase orders.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/