UNPKG

cloudflare

Version:

The official TypeScript library for the Cloudflare API

115 lines • 6.32 kB
import { APIResource } from "../../core/resource.js"; import * as BadDebtAPI from "./bad-debt.js"; import { BadDebt, BadDebtGetParams, BadDebtGetResponse, BaseBadDebt } from "./bad-debt.js"; import * as CreditsAPI from "./credits.js"; import { BaseCredits, CreditGetParams, CreditGetResponse, Credits } from "./credits.js"; import * as HistoryAPI from "./history.js"; import { BaseHistory, History, HistoryListParams, HistoryListResponse, HistoryListResponsesV4PagePaginationArray } from "./history.js"; import * as RatePlansAPI from "./rate-plans.js"; import { BaseRatePlans, RatePlanGetResponse, RatePlans } from "./rate-plans.js"; import * as UnpaidInvoiceAPI from "./unpaid-invoice.js"; import { BaseUnpaidInvoice, UnpaidInvoice, UnpaidInvoiceGetParams, UnpaidInvoiceGetResponse } from "./unpaid-invoice.js"; import * as UsageAPI from "./usage.js"; import { BaseUsage, Usage, UsageGetAccountUsageInfoV1Params, UsageGetAccountUsageInfoV1Response, UsageGetAccountUsageV1Params, UsageGetAccountUsageV1Response, UsageGetAccountUsageV2Params, UsageGetAccountUsageV2Response, UsageGetParams, UsageGetResponse, UsagePaygoInfoParams, UsagePaygoInfoResponse, UsagePaygoParams, UsagePaygoResponse } from "./usage.js"; import * as ProfilesAPI from "./profiles/profiles.js"; import { BaseProfiles, ProfileCreateParams, ProfileCreateResponse, ProfileDeleteParams, ProfileGetParams, ProfileGetResponse, ProfileUpdateBillingEmailParams, ProfileUpdateBillingEmailResponse, ProfileUpdateParams, ProfileUpdateResponse, Profiles } from "./profiles/profiles.js"; import { APIPromise } from "../../core/api-promise.js"; import { RequestOptions } from "../../internal/request-options.js"; export declare class BaseBilling extends APIResource { static readonly _key: readonly ['billing']; /** * 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: BillingAddressValidationParams, options?: RequestOptions): APIPromise<BillingAddressValidationResponse>; } export declare class Billing extends BaseBilling { profiles: ProfilesAPI.Profiles; usage: UsageAPI.Usage; credits: CreditsAPI.Credits; history: HistoryAPI.History; badDebt: BadDebtAPI.BadDebt; unpaidInvoice: UnpaidInvoiceAPI.UnpaidInvoice; ratePlans: RatePlansAPI.RatePlans; } export interface BillingAddressValidationResponse { /** * List of validated address suggestions. */ validated_addresses?: Array<BillingAddressValidationResponse.ValidatedAddress>; } export declare namespace BillingAddressValidationResponse { interface ValidatedAddress { /** * Validated address line 1. */ address?: string; /** * Validated address line 2. */ address2?: string; /** * Validated city. */ city?: string; /** * Validated country code. */ country?: string; /** * Validated state or province. */ state?: string; /** * The validation result code. */ validation_code?: string; /** * Validated postal or zip code. */ zipcode?: string; } } export interface BillingAddressValidationParams { /** * Address line 1. */ address?: string; /** * Address line 2. */ address2?: string; /** * City. */ city?: string; /** * Country code. */ country?: string; /** * State or province. */ state?: string; /** * Postal or zip code. */ zipcode?: string; } export declare namespace Billing { export { type BillingAddressValidationResponse as BillingAddressValidationResponse, type BillingAddressValidationParams as BillingAddressValidationParams, }; export { Profiles as Profiles, BaseProfiles as BaseProfiles, type ProfileCreateResponse as ProfileCreateResponse, type ProfileUpdateResponse as ProfileUpdateResponse, type ProfileGetResponse as ProfileGetResponse, type ProfileUpdateBillingEmailResponse as ProfileUpdateBillingEmailResponse, type ProfileCreateParams as ProfileCreateParams, type ProfileUpdateParams as ProfileUpdateParams, type ProfileDeleteParams as ProfileDeleteParams, type ProfileGetParams as ProfileGetParams, type ProfileUpdateBillingEmailParams as ProfileUpdateBillingEmailParams, }; export { Usage as Usage, BaseUsage as BaseUsage, type UsageGetResponse as UsageGetResponse, type UsageGetAccountUsageInfoV1Response as UsageGetAccountUsageInfoV1Response, type UsageGetAccountUsageV1Response as UsageGetAccountUsageV1Response, type UsageGetAccountUsageV2Response as UsageGetAccountUsageV2Response, type UsagePaygoResponse as UsagePaygoResponse, type UsagePaygoInfoResponse as UsagePaygoInfoResponse, type UsageGetParams as UsageGetParams, type UsageGetAccountUsageInfoV1Params as UsageGetAccountUsageInfoV1Params, type UsageGetAccountUsageV1Params as UsageGetAccountUsageV1Params, type UsageGetAccountUsageV2Params as UsageGetAccountUsageV2Params, type UsagePaygoParams as UsagePaygoParams, type UsagePaygoInfoParams as UsagePaygoInfoParams, }; export { Credits as Credits, BaseCredits as BaseCredits, type CreditGetResponse as CreditGetResponse, type CreditGetParams as CreditGetParams, }; export { History as History, BaseHistory as BaseHistory, type HistoryListResponse as HistoryListResponse, type HistoryListResponsesV4PagePaginationArray as HistoryListResponsesV4PagePaginationArray, type HistoryListParams as HistoryListParams, }; export { BadDebt as BadDebt, BaseBadDebt as BaseBadDebt, type BadDebtGetResponse as BadDebtGetResponse, type BadDebtGetParams as BadDebtGetParams, }; export { UnpaidInvoice as UnpaidInvoice, BaseUnpaidInvoice as BaseUnpaidInvoice, type UnpaidInvoiceGetResponse as UnpaidInvoiceGetResponse, type UnpaidInvoiceGetParams as UnpaidInvoiceGetParams, }; export { RatePlans as RatePlans, BaseRatePlans as BaseRatePlans, type RatePlanGetResponse as RatePlanGetResponse, }; } //# sourceMappingURL=billing.d.ts.map