UNPKG

pulumi-stripe

Version:

A Pulumi package for creating and managing Stripe resources.

407 lines (406 loc) 15.4 kB
import * as outputs from "../types/output"; export interface FileLink { /** * String. Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** * Bool. Returns if the link is already expired. */ expired: boolean; /** * Int. The link isn’t available after this future timestamp. */ expiresAt: number; /** * String. Unique identifier for the object. */ id: string; /** * Bool. Has the value `true` if the object exists in live mode or the value `false` * if the object exists in test mode. */ livemode: boolean; /** * Map(String). Set of key-value pairs that you can attach to an object. * This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string; }; /** * String. String representing the object’s type. Objects of the same type share the same value. */ object: string; /** * String. The publicly accessible URL to download the file. */ url: string; } export interface FileLinkData { /** * Bool. Set this to `true` to create a file link for the newly created file. * Creating a link is only possible when the file’s purpose is one of the following: `businessIcon`, `businessLogo`, * `customerSignature`, `disputeEvidence`, `pciDocument`, `taxDocumentUserUpload`, or `terminalReaderSplashscreen`. */ create: boolean; /** * Int. The link isn’t available after this future timestamp. */ expiresAt?: number; /** * Map(String). Set of key-value pairs that you can attach to an object. * This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string; }; } export interface PortalConfigurationBusinessProfile { /** * String. The messaging shown to customers in the portal. */ headline?: string; /** * String. A link to the business's publicly available privacy policy. */ privacyPolicyUrl?: string; /** * String. A link to the business's publicly available terms of service. */ termsOfServiceUrl?: string; } export interface PortalConfigurationFeatures { /** * List(Resource). Information about updating the customer details in the portal. See Customer Update. */ customerUpdate: outputs.PortalConfigurationFeaturesCustomerUpdate; /** * List(Resource). Information about showing the billing history in the portal. See Invoice History. */ invoiceHistory: outputs.PortalConfigurationFeaturesInvoiceHistory; /** * List(Resource). Information about updating payment methods in the portal. See Payment Method Update. */ paymentMethodUpdate: outputs.PortalConfigurationFeaturesPaymentMethodUpdate; /** * List(Resource). Information about canceling subscriptions in the portal. See Subscription Cancel. */ subscriptionCancel: outputs.PortalConfigurationFeaturesSubscriptionCancel; /** * List(Resource). Information about pausing subscriptions in the portal. See Subscription Pause. */ subscriptionPauses: outputs.PortalConfigurationFeaturesSubscriptionPause[]; /** * List(Resource). Information about updating subscriptions in the portal. See Subscription Update. */ subscriptionUpdates: outputs.PortalConfigurationFeaturesSubscriptionUpdate[]; } export interface PortalConfigurationFeaturesCustomerUpdate { /** * List(String). The types of customer updates that are supported [`name`, `email`, `address`, `shipping`, `phone`, `taxId`]. When empty, customers are not updatable. */ allowedUpdates?: string[]; /** * Bool. Whether the feature is enabled. */ enabled: boolean; } export interface PortalConfigurationFeaturesInvoiceHistory { /** * Bool. Whether the feature is enabled. */ enabled: boolean; } export interface PortalConfigurationFeaturesPaymentMethodUpdate { /** * Bool. Whether the feature is enabled. */ enabled: boolean; } export interface PortalConfigurationFeaturesSubscriptionCancel { /** * List(Resource). Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer. Details of this field is in Cancellation Reason. */ cancellationReason?: outputs.PortalConfigurationFeaturesSubscriptionCancelCancellationReason; /** * Bool. Whether the feature is enabled. */ enabled: boolean; /** * String. Whether to cancel subscriptions immediately or at the end of the billing period. Valid value is either `immediately` or `atPeriodEnd` */ mode?: string; /** * String. Whether to create prorations when canceling subscriptions. Possible values are `none` and `createProrations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. */ prorationBehavior?: string; } export interface PortalConfigurationFeaturesSubscriptionCancelCancellationReason { /** * Bool. Whether the feature is enabled. */ enabled: boolean; /** * List(String). Which cancellation reasons will be given as options to the customer. Supported values are `tooExpensive`, `missingFeatures`, `switchedService`, `unused`, `customerService`, `tooComplex`, `lowQuality`, and `other`. */ options: string[]; } export interface PortalConfigurationFeaturesSubscriptionPause { /** * Bool. Whether the feature is enabled. */ enabled?: boolean; } export interface PortalConfigurationFeaturesSubscriptionUpdate { /** * List(String). The types of subscription updates that are supported. When empty, subscriptions are not updatable. Supported values are `price`, `quantity`, and `promotionCode`. */ defaultAllowedUpdates: string[]; /** * Bool. Whether the feature is enabled. */ enabled: boolean; /** * List(Resource). The list of products that support subscription updates. See details Products. */ products: outputs.PortalConfigurationFeaturesSubscriptionUpdateProduct[]; /** * String. Whether to create prorations when canceling subscriptions. Possible values are `none` and `createProrations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. */ prorationBehavior?: string; } export interface PortalConfigurationFeaturesSubscriptionUpdateProduct { /** * List(String). The list of price IDs for the product that a subscription can be updated to. */ prices: string[]; /** * String. The product id. */ product: string; } export interface PortalConfigurationLoginPage { /** * Bool. Set to true to generate a shareable URL login_page.url that will take your customers to a hosted login page for the customer portal. */ enabled?: boolean; /** * A shareable URL to the hosted portal login page. Your customers will be able to log in with their email and receive a link to their customer portal. */ url: string; } export interface PriceCurrencyOption { /** * String. Three-letter ISO currency code, in lowercase - [supported currencies](https://stripe.com/docs/currencies). */ currency: string; /** * List(Resource). When set, * provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. * See details in custom unit amount. */ customUnitAmount?: outputs.PriceCurrencyOptionCustomUnitAmount; /** * String. Only required if a default tax behavior was not provided in the Stripe Tax settings. * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. * One of `inclusive`, `exclusive`, or `unspecified`. * Once specified as either inclusive or exclusive, it cannot be changed. */ taxBehavior?: string; /** * List(Resource). Each element represents a pricing tier. * This parameter requires `billingScheme` to be set to `tiered`. This resource can be used more than once and follows * the same fields as the root tiers block */ tiers?: outputs.PriceCurrencyOptionTier[]; /** * Int. A positive integer in cents (or -1 for a free price) representing how much to charge. */ unitAmount?: number; /** * Float. Same as unit_amount, but accepts a decimal value in cents with at most 12 * decimal places. Only one of unitAmount and unitAmountDecimal can be set. */ unitAmountDecimal?: number; } export interface PriceCurrencyOptionCustomUnitAmount { /** * Bool. Pass in `true` to enable `customUnitAmount`, otherwise omit `customUnitAmount`. */ enabled: boolean; /** * Int. The maximum unit amount the customer can specify for this item. */ maximum?: number; /** * Int. The minimum unit amount the customer can specify for this item. * Must be at least the minimum charge amount. */ minimum?: number; /** * Int. The starting unit amount which can be updated by the customer. */ preset?: number; } export interface PriceCurrencyOptionTier { /** * Int. The flat billing amount for an entire tier, regardless of the number of units in the * tier. */ flatAmount?: number; /** * Float. Same as `flatAmount`, but accepts a decimal value representing an integer * in the minor units of the currency. Only one of `flatAmount` and `flatAmountDecimal` can be set. */ flatAmountDecimal?: number; /** * Int. The per-unit billing amount for each individual unit for which this tier applies. */ unitAmount?: number; /** * Float. Same as `unitAmount`, but accepts a decimal value in cents with at most 12 * decimal places. Only one of `unitAmount` and `unitAmountDecimal` can be set. */ unitAmountDecimal?: number; /** * Int. Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the * previous tier adding one. Use `-1` to define a fallback tier. */ upTo?: number; } export interface PriceRecurring { /** * String. Specifies a usage of aggregation strategy for prices of `usage_type=metered`. * Allowed values are `sum` for summing up all usage during a period, `lastDuringPeriod` for using the last usage * record reported within a period, `lastEver` for using the last usage record ever (across period bounds) or `max` * which uses the usage record with the maximum reported usage during a period. */ aggregateUsage?: string; /** * String. Specifies billing frequency. Either `day`, `week`, `month` or `year`. */ interval: string; /** * Int. This parameter is (Required) when interval value is set. The number of intervals between subscription billings. For * example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, * 12 months, or 52 weeks). */ intervalCount?: number; /** * String. Configures how the quantity per period should be determined. Can be either `metered` * or `licensed`. `licensed` automatically bills the quantity set when adding it to a subscription. `metered` aggregates * the total usage based on usage records. Defaults to `licensed`. */ usageType?: string; } export interface PriceTier { /** * Int. The flat billing amount for an entire tier, regardless of the number of units in the * tier. */ flatAmount?: number; /** * Float. Same as `flatAmount`, but accepts a decimal value representing an integer * in the minor units of the currency. Only one of `flatAmount` and `flatAmountDecimal` can be set. */ flatAmountDecimal?: number; /** * Int. The per-unit billing amount for each individual unit for which this tier applies. */ unitAmount?: number; /** * Float. Same as `unitAmount`, but accepts a decimal value in cents with at most 12 * decimal places. Only one of `unitAmount` and `unitAmountDecimal` can be set. */ unitAmountDecimal?: number; /** * Int. Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the * previous tier adding one. Use `-1` to define a fallback tier. */ upTo?: number; } export interface PriceTransformQuantity { /** * Int. Divide usage by this number. */ divideBy: number; /** * String. After division, either round the result `up` or `down`. */ round: string; } export interface PromotionCodeRestrictions { /** * Bool. A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices. */ firstTimeTransaction: boolean; /** * Int. Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ minimumAmount: number; /** * String. Three-letter ISO code for `minimumAmount`. */ minimumAmountCurrency: string; } export interface ShippingRateDeliveryEstimate { /** * List(Resource. The upper bound of the estimated range. * Please see Delivery Estimate Definition. */ maximum?: outputs.ShippingRateDeliveryEstimateMaximum; /** * List(Resource). The lower bound of the estimated range. * Please see Delivery Estimate Definition. */ minimum?: outputs.ShippingRateDeliveryEstimateMinimum; } export interface ShippingRateDeliveryEstimateMaximum { /** * String. A unit of time. Possible values `hour`, `day`, `businessDay`, `week` and `month`. */ unit: string; /** * Int. Must be greater than 0. */ value: number; } export interface ShippingRateDeliveryEstimateMinimum { /** * String. A unit of time. Possible values `hour`, `day`, `businessDay`, `week` and `month`. */ unit: string; /** * Int. Must be greater than 0. */ value: number; } export interface ShippingRateFixedAmount { /** * Int. A non-negative integer in cents representing how much to charge. */ amount: number; /** * String. Three-letter ISO currency code, in lowercase - [supported currencies](https://stripe.com/docs/currencies). */ currency: string; /** * List(Resource). Please see argument details Currency Option */ currencyOptions?: outputs.ShippingRateFixedAmountCurrencyOption[]; } export interface ShippingRateFixedAmountCurrencyOption { /** * Int. (Required) Int. A non-negative integer in cents representing how much to charge. */ amount: number; /** * String. Three-letter ISO currency code, in lowercase - [supported currencies](https://stripe.com/docs/currencies). */ currency: string; /** * Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. */ taxBehavior?: string; }