@commercelayer/sdk
Version:
Commerce Layer Javascript SDK
57 lines (55 loc) • 2.78 kB
JavaScript
import { ApiResource } from './chunk-XKERR6OR.js';
// src/resources/stripe_tax_accounts.ts
var StripeTaxAccounts = class _StripeTaxAccounts extends ApiResource {
static TYPE = "stripe_tax_accounts";
async create(resource, params, options) {
return this.resources.create({ ...resource, type: _StripeTaxAccounts.TYPE }, params, options);
}
async update(resource, params, options) {
return this.resources.update({ ...resource, type: _StripeTaxAccounts.TYPE }, params, options);
}
async delete(id, options) {
await this.resources.delete(typeof id === "string" ? { id, type: _StripeTaxAccounts.TYPE } : id, options);
}
async markets(stripeTaxAccountId, params, options) {
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
return this.resources.fetch({ type: "markets" }, `stripe_tax_accounts/${_stripeTaxAccountId}/markets`, params, options);
}
async attachments(stripeTaxAccountId, params, options) {
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
return this.resources.fetch({ type: "attachments" }, `stripe_tax_accounts/${_stripeTaxAccountId}/attachments`, params, options);
}
async events(stripeTaxAccountId, params, options) {
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
return this.resources.fetch({ type: "events" }, `stripe_tax_accounts/${_stripeTaxAccountId}/events`, params, options);
}
async versions(stripeTaxAccountId, params, options) {
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
return this.resources.fetch({ type: "versions" }, `stripe_tax_accounts/${_stripeTaxAccountId}/versions`, params, options);
}
async event_stores(stripeTaxAccountId, params, options) {
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
return this.resources.fetch({ type: "event_stores" }, `stripe_tax_accounts/${_stripeTaxAccountId}/event_stores`, params, options);
}
async tax_categories(stripeTaxAccountId, params, options) {
const _stripeTaxAccountId = stripeTaxAccountId.id || stripeTaxAccountId;
return this.resources.fetch({ type: "tax_categories" }, `stripe_tax_accounts/${_stripeTaxAccountId}/tax_categories`, params, options);
}
isStripeTaxAccount(resource) {
return resource.type && resource.type === _StripeTaxAccounts.TYPE;
}
relationship(id) {
return super.relationshipOneToOne(id);
}
relationshipToMany(...ids) {
return super.relationshipOneToMany(...ids);
}
type() {
return _StripeTaxAccounts.TYPE;
}
};
var instance = new StripeTaxAccounts();
var stripe_tax_accounts_default = instance;
export { stripe_tax_accounts_default };
//# sourceMappingURL=chunk-IQVSM3MS.js.map
//# sourceMappingURL=chunk-IQVSM3MS.js.map