UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

65 lines • 2.86 kB
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from "../../core/resource.mjs"; import * as BadDebtAPI from "./bad-debt.mjs"; import { BadDebt, BaseBadDebt } from "./bad-debt.mjs"; import * as CreditsAPI from "./credits.mjs"; import { BaseCredits, Credits } from "./credits.mjs"; import * as HistoryAPI from "./history.mjs"; import { BaseHistory, History, } from "./history.mjs"; import * as RatePlansAPI from "./rate-plans.mjs"; import { BaseRatePlans, RatePlans } from "./rate-plans.mjs"; import * as UnpaidInvoiceAPI from "./unpaid-invoice.mjs"; import { BaseUnpaidInvoice, UnpaidInvoice, } from "./unpaid-invoice.mjs"; import * as UsageAPI from "./usage.mjs"; import { BaseUsage, Usage, } from "./usage.mjs"; import * as ProfilesAPI from "./profiles/profiles.mjs"; import { BaseProfiles, Profiles, } from "./profiles/profiles.mjs"; export var BaseBilling = /* @__PURE__ */ (() => { class BaseBilling extends APIResource { /** * Validates a billing address and returns validated address suggestions. * Authentication is not enforced to support pre-signup address validation flows, * so credentials are accepted but not required. * * @example * ```ts * const response = await client.billing.addressValidation(); * ``` */ addressValidation(body, options) { return this._client.post('/billing/address-validation', { body, ...options })._thenUnwrap((obj) => obj.result); } } BaseBilling._key = Object.freeze(['billing']); return BaseBilling; })(); export var Billing = /* @__PURE__ */ (() => { class Billing extends BaseBilling { constructor() { super(...arguments); this.profiles = new ProfilesAPI.Profiles(this._client); this.usage = new UsageAPI.Usage(this._client); this.credits = new CreditsAPI.Credits(this._client); this.history = new HistoryAPI.History(this._client); this.badDebt = new BadDebtAPI.BadDebt(this._client); this.unpaidInvoice = new UnpaidInvoiceAPI.UnpaidInvoice(this._client); this.ratePlans = new RatePlansAPI.RatePlans(this._client); } } Billing.Profiles = Profiles; Billing.BaseProfiles = BaseProfiles; Billing.Usage = Usage; Billing.BaseUsage = BaseUsage; Billing.Credits = Credits; Billing.BaseCredits = BaseCredits; Billing.History = History; Billing.BaseHistory = BaseHistory; Billing.BadDebt = BadDebt; Billing.BaseBadDebt = BaseBadDebt; Billing.UnpaidInvoice = UnpaidInvoice; Billing.BaseUnpaidInvoice = BaseUnpaidInvoice; Billing.RatePlans = RatePlans; Billing.BaseRatePlans = BaseRatePlans; return Billing; })(); //# sourceMappingURL=billing.mjs.map