@commercelayer/sdk
Version:
Commerce Layer Javascript SDK
38 lines (35 loc) • 1.39 kB
JavaScript
;
var chunkVRRJS3ZM_cjs = require('./chunk-VRRJS3ZM.cjs');
// src/resources/price_tiers.ts
var PriceTiers = class _PriceTiers extends chunkVRRJS3ZM_cjs.ApiResource {
static TYPE = "price_tiers";
async price(priceTierId, params, options) {
const _priceTierId = priceTierId.id || priceTierId;
return this.resources.fetch({ type: "prices" }, `price_tiers/${_priceTierId}/price`, params, options);
}
async attachments(priceTierId, params, options) {
const _priceTierId = priceTierId.id || priceTierId;
return this.resources.fetch({ type: "attachments" }, `price_tiers/${_priceTierId}/attachments`, params, options);
}
async event_stores(priceTierId, params, options) {
const _priceTierId = priceTierId.id || priceTierId;
return this.resources.fetch({ type: "event_stores" }, `price_tiers/${_priceTierId}/event_stores`, params, options);
}
isPriceTier(resource) {
return resource.type && resource.type === _PriceTiers.TYPE;
}
relationship(id) {
return super.relationshipOneToOne(id);
}
relationshipToMany(...ids) {
return super.relationshipOneToMany(...ids);
}
type() {
return _PriceTiers.TYPE;
}
};
var instance = new PriceTiers();
var price_tiers_default = instance;
exports.price_tiers_default = price_tiers_default;
//# sourceMappingURL=chunk-4JL3Z5QD.cjs.map
//# sourceMappingURL=chunk-4JL3Z5QD.cjs.map