@commercelayer/sdk
Version:
Commerce Layer Javascript SDK
40 lines (38 loc) • 1.51 kB
JavaScript
import { ApiResource } from './chunk-XKERR6OR.js';
// src/resources/geocoders.ts
var Geocoders = class _Geocoders extends ApiResource {
static TYPE = "geocoders";
async markets(geocoderId, params, options) {
const _geocoderId = geocoderId.id || geocoderId;
return this.resources.fetch({ type: "markets" }, `geocoders/${_geocoderId}/markets`, params, options);
}
async addresses(geocoderId, params, options) {
const _geocoderId = geocoderId.id || geocoderId;
return this.resources.fetch({ type: "addresses" }, `geocoders/${_geocoderId}/addresses`, params, options);
}
async attachments(geocoderId, params, options) {
const _geocoderId = geocoderId.id || geocoderId;
return this.resources.fetch({ type: "attachments" }, `geocoders/${_geocoderId}/attachments`, params, options);
}
async event_stores(geocoderId, params, options) {
const _geocoderId = geocoderId.id || geocoderId;
return this.resources.fetch({ type: "event_stores" }, `geocoders/${_geocoderId}/event_stores`, params, options);
}
isGeocoder(resource) {
return resource.type && resource.type === _Geocoders.TYPE;
}
relationship(id) {
return super.relationshipOneToOne(id);
}
relationshipToMany(...ids) {
return super.relationshipOneToMany(...ids);
}
type() {
return _Geocoders.TYPE;
}
};
var instance = new Geocoders();
var geocoders_default = instance;
export { geocoders_default };
//# sourceMappingURL=chunk-IHPFHOEJ.js.map
//# sourceMappingURL=chunk-IHPFHOEJ.js.map