UNPKG

pulumi-stripe

Version:

A Pulumi package for creating and managing Stripe resources.

439 lines (438 loc) 15.5 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. Time that the link expires. */ 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. */ 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 { /** * 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: business_icon, business_logo, customer_signature, dispute_evidence, pci_document, tax_document_user_upload, or terminal_reader_splashscreen. */ create: boolean; /** * Int. Time that the link expires. */ expiresAt?: number; /** * Map(String). Set of key-value pairs that you can attach to an object. */ metadata?: { [key: string]: string; }; } export interface MeterCustomerMapping { /** * String. The key in the event payload to use for customer mapping. */ eventPayloadKey: string; /** * String. The method for mapping a meter event to a customer. Must be `byId`. */ type: string; } export interface MeterDefaultAggregation { /** * String. Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event’s value. */ formula: string; } export interface MeterValueSettings { /** * The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a bytesUsed field, then set the eventPayloadKey to “bytes_used” */ eventPayloadKey: 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 updating subscriptions in the portal. See Subscription Update. */ subscriptionUpdates: outputs.PortalConfigurationFeaturesSubscriptionUpdate[]; } export interface PortalConfigurationFeaturesCustomerUpdate { /** * The types of customer updates that are supported. When empty, customers are not updatable. */ allowedUpdates?: string[]; /** * Whether the feature is enabled. */ enabled: boolean; } export interface PortalConfigurationFeaturesInvoiceHistory { /** * Whether the feature is enabled. */ enabled: boolean; } export interface PortalConfigurationFeaturesPaymentMethodUpdate { /** * Whether the feature is enabled. */ enabled: boolean; } export interface PortalConfigurationFeaturesSubscriptionCancel { /** * Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer */ cancellationReason?: outputs.PortalConfigurationFeaturesSubscriptionCancelCancellationReason; /** * Whether the feature is enabled. */ enabled: boolean; /** * Whether to cancel subscriptions immediately or at the end of the billing period. */ mode?: string; /** * Whether to create prorations when canceling subscriptions. */ 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 PortalConfigurationFeaturesSubscriptionUpdate { /** * The types of subscription updates that are supported. When empty, subscriptions are not updateable. */ defaultAllowedUpdates: string[]; /** * Whether the feature is enabled. */ enabled: boolean; /** * The list of products that support subscription updates. */ products: outputs.PortalConfigurationFeaturesSubscriptionUpdateProduct[]; /** * Determines how to handle prorations resulting from subscription updates */ 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 PriceCustomUnitAmount { /** * 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 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. The meter tracking the usage of a metered price. */ meter?: string; /** * 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 { /** * The upper bound of the estimated range. If empty, represents no lower bound. */ unit: string; /** * Must be greater than 0. */ value: number; } export interface ShippingRateDeliveryEstimateMinimum { /** * The lower bound of the estimated range. If empty, represents no lower bound. */ unit: string; /** * 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; /** * String. Specifies whether the price is considered inclusive of taxes or exclusive of * taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified it cannot be changed, default is `unspecified`. */ taxBehavior?: string; }