@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
42 lines • 1.25 kB
JavaScript
import { ShipToRefreshResponseSchema } from '../schemas';
/**
* Creates the shipTo resource methods
* OpenAPI Path: /ship-to → shipTo.*
* @description Ship-to refresh operations
*/
export function createShipToResource(executeRequest) {
return {
/**
* Ship-to refresh endpoint - OpenAPI Path: /ship-to/refresh (GET)
* @fullPath api.customers.shipTo.refresh
* @description Refreshes ship-to data from source system
* @service customers
* @domain data-refresh
* @dataMethod shipToData.refresh.get
* @discoverable true
*/
refresh: {
get: async () => {
return executeRequest({
method: 'GET',
path: '/ship-to/refresh',
responseSchema: ShipToRefreshResponseSchema,
});
},
},
};
}
/**
* Creates the shipToData resource methods (data-only versions)
*/
export function createShipToDataResource(shipTo) {
return {
refresh: {
get: async () => {
const response = await shipTo.refresh.get();
return response.data;
},
},
};
}
//# sourceMappingURL=ship-to.js.map