UNPKG

@commercelayer/sdk

Version:
42 lines (39 loc) 1.57 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/geocoders.ts var Geocoders = class _Geocoders extends chunkU22VLCMN_cjs.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; exports.geocoders_default = geocoders_default; //# sourceMappingURL=chunk-OEUSTDGS.cjs.map //# sourceMappingURL=chunk-OEUSTDGS.cjs.map