UNPKG

@commercelayer/sdk

Version:
49 lines (47 loc) 2.08 kB
import { ApiResource } from './chunk-XKERR6OR.js'; // src/resources/bing_geocoders.ts var BingGeocoders = class _BingGeocoders extends ApiResource { static TYPE = "bing_geocoders"; async create(resource, params, options) { return this.resources.create({ ...resource, type: _BingGeocoders.TYPE }, params, options); } async update(resource, params, options) { return this.resources.update({ ...resource, type: _BingGeocoders.TYPE }, params, options); } async delete(id, options) { await this.resources.delete(typeof id === "string" ? { id, type: _BingGeocoders.TYPE } : id, options); } async markets(bingGeocoderId, params, options) { const _bingGeocoderId = bingGeocoderId.id || bingGeocoderId; return this.resources.fetch({ type: "markets" }, `bing_geocoders/${_bingGeocoderId}/markets`, params, options); } async addresses(bingGeocoderId, params, options) { const _bingGeocoderId = bingGeocoderId.id || bingGeocoderId; return this.resources.fetch({ type: "addresses" }, `bing_geocoders/${_bingGeocoderId}/addresses`, params, options); } async attachments(bingGeocoderId, params, options) { const _bingGeocoderId = bingGeocoderId.id || bingGeocoderId; return this.resources.fetch({ type: "attachments" }, `bing_geocoders/${_bingGeocoderId}/attachments`, params, options); } async event_stores(bingGeocoderId, params, options) { const _bingGeocoderId = bingGeocoderId.id || bingGeocoderId; return this.resources.fetch({ type: "event_stores" }, `bing_geocoders/${_bingGeocoderId}/event_stores`, params, options); } isBingGeocoder(resource) { return resource.type && resource.type === _BingGeocoders.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _BingGeocoders.TYPE; } }; var instance = new BingGeocoders(); var bing_geocoders_default = instance; export { bing_geocoders_default }; //# sourceMappingURL=chunk-VT5HP44I.js.map //# sourceMappingURL=chunk-VT5HP44I.js.map