@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
46 lines • 1.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createShipToResource = createShipToResource;
exports.createShipToDataResource = createShipToDataResource;
const schemas_1 = require("../schemas");
/**
* Creates the shipTo resource methods
* OpenAPI Path: /ship-to → shipTo.*
* @description Ship-to refresh operations
*/
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: schemas_1.ShipToRefreshResponseSchema,
});
},
},
};
}
/**
* Creates the shipToData resource methods (data-only versions)
*/
function createShipToDataResource(shipTo) {
return {
refresh: {
get: async () => {
const response = await shipTo.refresh.get();
return response.data;
},
},
};
}
//# sourceMappingURL=ship-to.js.map