@commercelayer/sdk
Version:
Commerce Layer Javascript SDK
51 lines (48 loc) • 2.15 kB
JavaScript
;
var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs');
// src/resources/bing_geocoders.ts
var BingGeocoders = class _BingGeocoders extends chunkU22VLCMN_cjs.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;
exports.bing_geocoders_default = bing_geocoders_default;
//# sourceMappingURL=chunk-3YINNWNG.cjs.map
//# sourceMappingURL=chunk-3YINNWNG.cjs.map