diff --git a/docs/openapi.yaml b/docs/openapi.yaml index e3185b1f2..e0346649c 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -70,8 +70,8 @@ paths: - inactive type: string default: - - active - inactive + - active description: Filter to a specific set of adjustment statuses. Defaults to both active and inactive. tags: @@ -712,9 +712,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -774,9 +774,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -1571,6 +1571,9 @@ components: AddOnDetail: type: object properties: + addon_name: + type: string + description: The name of the add-on plan. versions: type: array items: @@ -1582,9 +1585,6 @@ components: addon_id: type: string description: The ID of the add-on plan. - addon_name: - type: string - description: The name of the add-on plan. required: - addon_description - addon_id @@ -2512,35 +2512,35 @@ components: BacktestDetail: type: object properties: + backtest_id: + type: string status: enum: - running - completed - failed type: string - backtest_id: - type: string - start_date: + backtest_name: type: string - format: date + maxLength: 100 + backtest_results: + $ref: '#/components/schemas/AllSubstitutionResults' backtest_substitutions: type: array items: $ref: '#/components/schemas/BacktestSubstitution' - backtest_results: - $ref: '#/components/schemas/AllSubstitutionResults' + start_date: + type: string + format: date + end_date: + type: string + format: date time_created: type: string format: date-time kpis: type: object additionalProperties: {} - end_date: - type: string - format: date - backtest_name: - type: string - maxLength: 100 required: - backtest_id - backtest_name @@ -5161,6 +5161,17 @@ components: InitialAddOnVersionCreateRequest: type: object properties: + currency_code: + type: string + minLength: 1 + invoice_when: + enum: + - invoice_on_attach + - invoice_on_subscription_end + billing_frequency: + enum: + - one_time + - recurring features: type: array items: @@ -5171,22 +5182,11 @@ components: items: $ref: '#/components/schemas/PlanComponentCreateRequest' nullable: true - currency_code: - type: string - minLength: 1 - invoice_when: - enum: - - invoice_on_attach - - invoice_on_subscription_end recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' nullable: true - billing_frequency: - enum: - - one_time - - recurring required: - billing_frequency - currency_code @@ -5223,59 +5223,59 @@ components: InitialPlanVersionCreateRequest: type: object properties: - features: - type: array - items: - type: string - format: uuid - target_customer_ids: - type: array - items: - type: string - nullable: true - minLength: 1 - description: The id provided when creating the customer, we suggest matching - with your internal customer id in your backend + price_adjustment: + $ref: '#/components/schemas/PriceAdjustmentRequest' + make_active: + type: boolean + default: false make_active_type: enum: - replace_on_renewal - grandfather type: string default: replace_on_renewal - components: - type: array - items: - $ref: '#/components/schemas/PlanComponentCreateRequest' - localized_name: - type: string - writeOnly: true - nullable: true + version: + type: integer currency_code: type: string minLength: 1 - make_active: - type: boolean - default: false - month_anchor: + day_anchor: type: integer - maximum: 12 + maximum: 31 minimum: 1 writeOnly: true nullable: true + localized_name: + type: string + writeOnly: true + nullable: true + features: + type: array + items: + type: string + format: uuid + components: + type: array + items: + $ref: '#/components/schemas/PlanComponentCreateRequest' recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' - day_anchor: + target_customer_ids: + type: array + items: + type: string + nullable: true + minLength: 1 + description: The id provided when creating the customer, we suggest matching + with your internal customer id in your backend + month_anchor: type: integer - maximum: 31 + maximum: 12 minimum: 1 writeOnly: true nullable: true - price_adjustment: - $ref: '#/components/schemas/PriceAdjustmentRequest' - version: - type: integer required: - currency_code - version @@ -5865,41 +5865,30 @@ components: LightweightInvoice: type: object properties: - cost_due: - type: number - format: double - maximum: 10000000000 - minimum: 0 - exclusiveMaximum: true - deprecated: true - invoice_id: - type: string external_payment_obj_id: type: string readOnly: true nullable: true - due_date: - type: string - format: date-time - readOnly: true - nullable: true - start_date: + invoice_number: type: string - format: date readOnly: true - end_date: + invoice_id: type: string - format: date - readOnly: true issue_date: type: string format: date-time readOnly: true - invoice_pdf: - type: string - format: uri + payment_status: + enum: + - draft + - voided + - paid + - unpaid readOnly: true - nullable: true + currency: + $ref: '#/components/schemas/PricingUnit' + seller: + $ref: '#/components/schemas/Seller' amount: type: number format: double @@ -5908,13 +5897,22 @@ components: exclusiveMaximum: true exclusiveMinimum: true readOnly: true - payment_status: - enum: - - draft - - voided - - paid - - unpaid + cost_due: + type: number + format: double + maximum: 10000000000 + minimum: 0 + exclusiveMaximum: true + deprecated: true + start_date: + type: string + format: date readOnly: true + invoice_pdf: + type: string + format: uri + readOnly: true + nullable: true external_payment_obj_type: enum: - stripe @@ -5922,13 +5920,15 @@ components: - type: string nullable: true - invoice_number: + end_date: type: string + format: date readOnly: true - seller: - $ref: '#/components/schemas/Seller' - currency: - $ref: '#/components/schemas/PricingUnit' + due_date: + type: string + format: date-time + readOnly: true + nullable: true required: - amount - cost_due @@ -6029,22 +6029,27 @@ components: LightweightSubscriptionRecord: type: object properties: - auto_renew: + billing_plan: + $ref: '#/components/schemas/LightweightPlanVersion' + fully_billed: type: boolean - description: Whether the subscription automatically renews. Defaults to - true. + readOnly: true is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. - billing_plan: - $ref: '#/components/schemas/LightweightPlanVersion' - plan_detail: - allOf: - - $ref: '#/components/schemas/LightweightPlanVersion' - readOnly: true + addons: + type: array + items: + $ref: '#/components/schemas/LightweightAddOnSubscriptionRecord' + customer: + $ref: '#/components/schemas/LightweightCustomer' subscription_id: type: string + auto_renew: + type: boolean + description: Whether the subscription automatically renews. Defaults to + true. start_date: type: string format: date-time @@ -6055,10 +6060,10 @@ components: items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' readOnly: true - addons: - type: array - items: - $ref: '#/components/schemas/LightweightAddOnSubscriptionRecord' + plan_detail: + allOf: + - $ref: '#/components/schemas/LightweightPlanVersion' + readOnly: true end_date: type: string format: date-time @@ -6067,11 +6072,6 @@ components: metadata: type: object additionalProperties: {} - fully_billed: - type: boolean - readOnly: true - customer: - $ref: '#/components/schemas/LightweightCustomer' required: - addons - auto_renew @@ -6088,28 +6088,28 @@ components: LightweightSubscriptionRecordRequest: type: object properties: - auto_renew: - type: boolean - description: Whether the subscription automatically renews. Defaults to - true. + billing_plan: + $ref: '#/components/schemas/LightweightPlanVersionRequest' is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. - billing_plan: - $ref: '#/components/schemas/LightweightPlanVersionRequest' + addons: + type: array + items: + $ref: '#/components/schemas/LightweightAddOnSubscriptionRecordRequest' subscription_id: type: string minLength: 1 + auto_renew: + type: boolean + description: Whether the subscription automatically renews. Defaults to + true. start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - addons: - type: array - items: - $ref: '#/components/schemas/LightweightAddOnSubscriptionRecordRequest' end_date: type: string format: date-time @@ -6531,14 +6531,24 @@ components: MetricDetail: type: object properties: - metric_name: + event_name: type: string - custom_sql: + readOnly: true + description: Name of the event that this metric is tracking. + metric_type: + enum: + - counter + - rate + - custom + - gauge type: string readOnly: true - nullable: true - description: A custom SQL query that can be used to define the metric. Please - refer to our documentation for more information. + description: The type of metric that this is. Please refer to our documentation + for an explanation of the different types. + categorical_filters: + type: array + items: + $ref: '#/components/schemas/CategoricalFilter' granularity: enum: - seconds @@ -6565,29 +6575,21 @@ components: nullable: true description: Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. - event_name: - type: string - readOnly: true - description: Name of the event that this metric is tracking. - metric_type: - enum: - - counter - - rate - - custom - - gauge - type: string - readOnly: true - description: The type of metric that this is. Please refer to our documentation - for an explanation of the different types. - numeric_filters: - type: array - items: - $ref: '#/components/schemas/NumericFilter' is_cost_metric: type: boolean readOnly: true description: Whether or not this metric is a cost metric (used to track costs to your business). + metric_name: + type: string + metric_id: + type: string + custom_sql: + type: string + readOnly: true + nullable: true + description: A custom SQL query that can be used to define the metric. Please + refer to our documentation for more information. property_name: type: string readOnly: true @@ -6611,12 +6613,10 @@ components: nullable: true description: The proration of the metric. Only applies to metrics of type 'gauge'. - categorical_filters: + numeric_filters: type: array items: - $ref: '#/components/schemas/CategoricalFilter' - metric_id: - type: string + $ref: '#/components/schemas/NumericFilter' usage_aggregation_type: enum: - count @@ -8781,48 +8781,38 @@ components: $ref: '#/components/schemas/TagRequest' required: - initial_version + - plan_duration - plan_name PlanDetail: type: object properties: + active_version: + type: integer + readOnly: true + description: This plan's currently active version. + taxjar_code: + type: string + nullable: true + maxLength: 30 + num_versions: + type: integer + readOnly: true + description: The number of versions that this plan has. external_links: type: array items: $ref: '#/components/schemas/InitialExternalPlanLink' description: The external links that this plan has. - plan_description: - type: string - nullable: true - description: Description of the plan active_subscriptions: type: integer readOnly: true description: The number of active subscriptions that this plan has across all versions. - versions: - type: array - items: - $ref: '#/components/schemas/PlanVersionDetail' - readOnly: true plan_name: type: string description: Name of the plan - tags: - type: array - items: - $ref: '#/components/schemas/Tag' - readOnly: true - description: The tags that this plan has. - num_versions: - type: integer - readOnly: true - description: The number of versions that this plan has. plan_id: type: string - active_version: - type: integer - readOnly: true - description: This plan's currently active version. plan_duration: enum: - monthly @@ -8832,10 +8822,21 @@ components: type: string nullable: true description: Duration of the plan - taxjar_code: + plan_description: type: string nullable: true - maxLength: 30 + description: Description of the plan + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + readOnly: true + description: The tags that this plan has. + versions: + type: array + items: + $ref: '#/components/schemas/PlanVersionDetail' + readOnly: true required: - active_subscriptions - active_version @@ -9066,35 +9067,16 @@ components: PlanVersionDetail: type: object properties: - features: - type: array - items: - $ref: '#/components/schemas/Feature' - active_from: - type: string - format: date-time - readOnly: true - nullable: true - components: - type: array - items: - $ref: '#/components/schemas/PlanComponent' - localized_name: - type: string - readOnly: true - nullable: true - active_to: - type: string - format: date-time - readOnly: true + price_adjustment: + allOf: + - $ref: '#/components/schemas/PriceAdjustment' nullable: true - recurring_charges: - type: array - items: - $ref: '#/components/schemas/RecurringCharge' - readOnly: true - version_id: - type: string + version: + oneOf: + - type: integer + - enum: + - custom_version + type: string readOnly: true status: enum: @@ -9106,18 +9088,6 @@ components: - not_started type: string readOnly: true - alerts: - type: array - items: - $ref: '#/components/schemas/UsageAlert' - readOnly: true - replace_with: - $ref: '#/components/schemas/LightweightPlanVersion' - active_subscriptions: - type: integer - readOnly: true - transition_to: - $ref: '#/components/schemas/LightweightPlan' plan_name: type: string readOnly: true @@ -9125,26 +9095,57 @@ components: type: string format: date-time readOnly: true + plan_id: + type: string + readOnly: true target_customers: type: array items: $ref: '#/components/schemas/LightweightCustomer' - plan_id: + transition_to: + $ref: '#/components/schemas/LightweightPlan' + recurring_charges: + type: array + items: + $ref: '#/components/schemas/RecurringCharge' + readOnly: true + replace_with: + $ref: '#/components/schemas/LightweightPlanVersion' + active_from: type: string + format: date-time readOnly: true + nullable: true currency: $ref: '#/components/schemas/PricingUnit' - price_adjustment: - allOf: - - $ref: '#/components/schemas/PriceAdjustment' + active_subscriptions: + type: integer + readOnly: true + version_id: + type: string + readOnly: true + alerts: + type: array + items: + $ref: '#/components/schemas/UsageAlert' + readOnly: true + localized_name: + type: string + readOnly: true nullable: true - version: - oneOf: - - type: integer - - enum: - - custom_version - type: string + features: + type: array + items: + $ref: '#/components/schemas/Feature' + components: + type: array + items: + $ref: '#/components/schemas/PlanComponent' + active_to: + type: string + format: date-time readOnly: true + nullable: true required: - active_from - active_subscriptions diff --git a/docs/openapi_full.yaml b/docs/openapi_full.yaml index c3a371049..9018a6054 100644 --- a/docs/openapi_full.yaml +++ b/docs/openapi_full.yaml @@ -70,8 +70,8 @@ paths: - inactive type: string default: - - active - inactive + - active description: Filter to a specific set of adjustment statuses. Defaults to both active and inactive. tags: @@ -712,9 +712,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -774,9 +774,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -1876,8 +1876,8 @@ paths: - inactive type: string default: - - active - inactive + - active description: Filter to a specific set of adjustment statuses. Defaults to both active and inactive. tags: @@ -3682,9 +3682,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -3773,9 +3773,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -5462,6 +5462,9 @@ components: AddOnDetail: type: object properties: + addon_name: + type: string + description: The name of the add-on plan. versions: type: array items: @@ -5473,9 +5476,6 @@ components: addon_id: type: string description: The ID of the add-on plan. - addon_name: - type: string - description: The name of the add-on plan. required: - addon_description - addon_id @@ -6403,35 +6403,35 @@ components: BacktestDetail: type: object properties: + backtest_id: + type: string status: enum: - running - completed - failed type: string - backtest_id: - type: string - start_date: + backtest_name: type: string - format: date + maxLength: 100 + backtest_results: + $ref: '#/components/schemas/AllSubstitutionResults' backtest_substitutions: type: array items: $ref: '#/components/schemas/BacktestSubstitution' - backtest_results: - $ref: '#/components/schemas/AllSubstitutionResults' + start_date: + type: string + format: date + end_date: + type: string + format: date time_created: type: string format: date-time kpis: type: object additionalProperties: {} - end_date: - type: string - format: date - backtest_name: - type: string - maxLength: 100 required: - backtest_id - backtest_name @@ -9052,6 +9052,17 @@ components: InitialAddOnVersionCreateRequest: type: object properties: + currency_code: + type: string + minLength: 1 + invoice_when: + enum: + - invoice_on_attach + - invoice_on_subscription_end + billing_frequency: + enum: + - one_time + - recurring features: type: array items: @@ -9062,22 +9073,11 @@ components: items: $ref: '#/components/schemas/PlanComponentCreateRequest' nullable: true - currency_code: - type: string - minLength: 1 - invoice_when: - enum: - - invoice_on_attach - - invoice_on_subscription_end recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' nullable: true - billing_frequency: - enum: - - one_time - - recurring required: - billing_frequency - currency_code @@ -9114,59 +9114,59 @@ components: InitialPlanVersionCreateRequest: type: object properties: - features: - type: array - items: - type: string - format: uuid - target_customer_ids: - type: array - items: - type: string - nullable: true - minLength: 1 - description: The id provided when creating the customer, we suggest matching - with your internal customer id in your backend + price_adjustment: + $ref: '#/components/schemas/PriceAdjustmentRequest' + make_active: + type: boolean + default: false make_active_type: enum: - replace_on_renewal - grandfather type: string default: replace_on_renewal - components: - type: array - items: - $ref: '#/components/schemas/PlanComponentCreateRequest' - localized_name: - type: string - writeOnly: true - nullable: true + version: + type: integer currency_code: type: string minLength: 1 - make_active: - type: boolean - default: false - month_anchor: + day_anchor: type: integer - maximum: 12 + maximum: 31 minimum: 1 writeOnly: true nullable: true + localized_name: + type: string + writeOnly: true + nullable: true + features: + type: array + items: + type: string + format: uuid + components: + type: array + items: + $ref: '#/components/schemas/PlanComponentCreateRequest' recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' - day_anchor: + target_customer_ids: + type: array + items: + type: string + nullable: true + minLength: 1 + description: The id provided when creating the customer, we suggest matching + with your internal customer id in your backend + month_anchor: type: integer - maximum: 31 + maximum: 12 minimum: 1 writeOnly: true nullable: true - price_adjustment: - $ref: '#/components/schemas/PriceAdjustmentRequest' - version: - type: integer required: - currency_code - version @@ -9756,41 +9756,30 @@ components: LightweightInvoice: type: object properties: - cost_due: - type: number - format: double - maximum: 10000000000 - minimum: 0 - exclusiveMaximum: true - deprecated: true - invoice_id: - type: string external_payment_obj_id: type: string readOnly: true nullable: true - due_date: - type: string - format: date-time - readOnly: true - nullable: true - start_date: + invoice_number: type: string - format: date readOnly: true - end_date: + invoice_id: type: string - format: date - readOnly: true issue_date: type: string format: date-time readOnly: true - invoice_pdf: - type: string - format: uri + payment_status: + enum: + - draft + - voided + - paid + - unpaid readOnly: true - nullable: true + currency: + $ref: '#/components/schemas/PricingUnit' + seller: + $ref: '#/components/schemas/Seller' amount: type: number format: double @@ -9799,13 +9788,22 @@ components: exclusiveMaximum: true exclusiveMinimum: true readOnly: true - payment_status: - enum: - - draft - - voided - - paid - - unpaid + cost_due: + type: number + format: double + maximum: 10000000000 + minimum: 0 + exclusiveMaximum: true + deprecated: true + start_date: + type: string + format: date readOnly: true + invoice_pdf: + type: string + format: uri + readOnly: true + nullable: true external_payment_obj_type: enum: - stripe @@ -9813,13 +9811,15 @@ components: - null type: string nullable: true - invoice_number: + end_date: type: string + format: date readOnly: true - seller: - $ref: '#/components/schemas/Seller' - currency: - $ref: '#/components/schemas/PricingUnit' + due_date: + type: string + format: date-time + readOnly: true + nullable: true required: - amount - cost_due @@ -9920,22 +9920,27 @@ components: LightweightSubscriptionRecord: type: object properties: - auto_renew: + billing_plan: + $ref: '#/components/schemas/LightweightPlanVersion' + fully_billed: type: boolean - description: Whether the subscription automatically renews. Defaults to - true. + readOnly: true is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. - billing_plan: - $ref: '#/components/schemas/LightweightPlanVersion' - plan_detail: - allOf: - - $ref: '#/components/schemas/LightweightPlanVersion' - readOnly: true + addons: + type: array + items: + $ref: '#/components/schemas/LightweightAddOnSubscriptionRecord' + customer: + $ref: '#/components/schemas/LightweightCustomer' subscription_id: type: string + auto_renew: + type: boolean + description: Whether the subscription automatically renews. Defaults to + true. start_date: type: string format: date-time @@ -9946,10 +9951,10 @@ components: items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' readOnly: true - addons: - type: array - items: - $ref: '#/components/schemas/LightweightAddOnSubscriptionRecord' + plan_detail: + allOf: + - $ref: '#/components/schemas/LightweightPlanVersion' + readOnly: true end_date: type: string format: date-time @@ -9958,11 +9963,6 @@ components: metadata: type: object additionalProperties: {} - fully_billed: - type: boolean - readOnly: true - customer: - $ref: '#/components/schemas/LightweightCustomer' required: - addons - auto_renew @@ -9979,28 +9979,28 @@ components: LightweightSubscriptionRecordRequest: type: object properties: - auto_renew: - type: boolean - description: Whether the subscription automatically renews. Defaults to - true. + billing_plan: + $ref: '#/components/schemas/LightweightPlanVersionRequest' is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. - billing_plan: - $ref: '#/components/schemas/LightweightPlanVersionRequest' + addons: + type: array + items: + $ref: '#/components/schemas/LightweightAddOnSubscriptionRecordRequest' subscription_id: type: string minLength: 1 + auto_renew: + type: boolean + description: Whether the subscription automatically renews. Defaults to + true. start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - addons: - type: array - items: - $ref: '#/components/schemas/LightweightAddOnSubscriptionRecordRequest' end_date: type: string format: date-time @@ -10422,14 +10422,24 @@ components: MetricDetail: type: object properties: - metric_name: + event_name: type: string - custom_sql: + readOnly: true + description: Name of the event that this metric is tracking. + metric_type: + enum: + - counter + - rate + - custom + - gauge type: string readOnly: true - nullable: true - description: A custom SQL query that can be used to define the metric. Please - refer to our documentation for more information. + description: The type of metric that this is. Please refer to our documentation + for an explanation of the different types. + categorical_filters: + type: array + items: + $ref: '#/components/schemas/CategoricalFilter' granularity: enum: - seconds @@ -10456,29 +10466,21 @@ components: nullable: true description: Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. - event_name: - type: string - readOnly: true - description: Name of the event that this metric is tracking. - metric_type: - enum: - - counter - - rate - - custom - - gauge - type: string - readOnly: true - description: The type of metric that this is. Please refer to our documentation - for an explanation of the different types. - numeric_filters: - type: array - items: - $ref: '#/components/schemas/NumericFilter' is_cost_metric: type: boolean readOnly: true description: Whether or not this metric is a cost metric (used to track costs to your business). + metric_name: + type: string + metric_id: + type: string + custom_sql: + type: string + readOnly: true + nullable: true + description: A custom SQL query that can be used to define the metric. Please + refer to our documentation for more information. property_name: type: string readOnly: true @@ -10502,12 +10504,10 @@ components: nullable: true description: The proration of the metric. Only applies to metrics of type 'gauge'. - categorical_filters: + numeric_filters: type: array items: - $ref: '#/components/schemas/CategoricalFilter' - metric_id: - type: string + $ref: '#/components/schemas/NumericFilter' usage_aggregation_type: enum: - count @@ -12672,48 +12672,38 @@ components: $ref: '#/components/schemas/TagRequest' required: - initial_version + - plan_duration - plan_name PlanDetail: type: object properties: + active_version: + type: integer + readOnly: true + description: This plan's currently active version. + taxjar_code: + type: string + nullable: true + maxLength: 30 + num_versions: + type: integer + readOnly: true + description: The number of versions that this plan has. external_links: type: array items: $ref: '#/components/schemas/InitialExternalPlanLink' description: The external links that this plan has. - plan_description: - type: string - nullable: true - description: Description of the plan active_subscriptions: type: integer readOnly: true description: The number of active subscriptions that this plan has across all versions. - versions: - type: array - items: - $ref: '#/components/schemas/PlanVersionDetail' - readOnly: true plan_name: type: string description: Name of the plan - tags: - type: array - items: - $ref: '#/components/schemas/Tag' - readOnly: true - description: The tags that this plan has. - num_versions: - type: integer - readOnly: true - description: The number of versions that this plan has. plan_id: type: string - active_version: - type: integer - readOnly: true - description: This plan's currently active version. plan_duration: enum: - monthly @@ -12723,10 +12713,21 @@ components: type: string nullable: true description: Duration of the plan - taxjar_code: + plan_description: type: string nullable: true - maxLength: 30 + description: Description of the plan + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + readOnly: true + description: The tags that this plan has. + versions: + type: array + items: + $ref: '#/components/schemas/PlanVersionDetail' + readOnly: true required: - active_subscriptions - active_version @@ -12957,35 +12958,16 @@ components: PlanVersionDetail: type: object properties: - features: - type: array - items: - $ref: '#/components/schemas/Feature' - active_from: - type: string - format: date-time - readOnly: true - nullable: true - components: - type: array - items: - $ref: '#/components/schemas/PlanComponent' - localized_name: - type: string - readOnly: true - nullable: true - active_to: - type: string - format: date-time - readOnly: true + price_adjustment: + allOf: + - $ref: '#/components/schemas/PriceAdjustment' nullable: true - recurring_charges: - type: array - items: - $ref: '#/components/schemas/RecurringCharge' - readOnly: true - version_id: - type: string + version: + oneOf: + - type: integer + - enum: + - custom_version + type: string readOnly: true status: enum: @@ -12997,18 +12979,6 @@ components: - not_started type: string readOnly: true - alerts: - type: array - items: - $ref: '#/components/schemas/UsageAlert' - readOnly: true - replace_with: - $ref: '#/components/schemas/LightweightPlanVersion' - active_subscriptions: - type: integer - readOnly: true - transition_to: - $ref: '#/components/schemas/LightweightPlan' plan_name: type: string readOnly: true @@ -13016,26 +12986,57 @@ components: type: string format: date-time readOnly: true + plan_id: + type: string + readOnly: true target_customers: type: array items: $ref: '#/components/schemas/LightweightCustomer' - plan_id: + transition_to: + $ref: '#/components/schemas/LightweightPlan' + recurring_charges: + type: array + items: + $ref: '#/components/schemas/RecurringCharge' + readOnly: true + replace_with: + $ref: '#/components/schemas/LightweightPlanVersion' + active_from: type: string + format: date-time readOnly: true + nullable: true currency: $ref: '#/components/schemas/PricingUnit' - price_adjustment: - allOf: - - $ref: '#/components/schemas/PriceAdjustment' + active_subscriptions: + type: integer + readOnly: true + version_id: + type: string + readOnly: true + alerts: + type: array + items: + $ref: '#/components/schemas/UsageAlert' + readOnly: true + localized_name: + type: string + readOnly: true nullable: true - version: - oneOf: - - type: integer - - enum: - - custom_version - type: string + features: + type: array + items: + $ref: '#/components/schemas/Feature' + components: + type: array + items: + $ref: '#/components/schemas/PlanComponent' + active_to: + type: string + format: date-time readOnly: true + nullable: true required: - active_from - active_subscriptions diff --git a/docs/openapi_private.yaml b/docs/openapi_private.yaml index fa5faa0c3..87753ec78 100644 --- a/docs/openapi_private.yaml +++ b/docs/openapi_private.yaml @@ -539,8 +539,8 @@ paths: - inactive type: string default: - - active - inactive + - active description: Filter to a specific set of adjustment statuses. Defaults to both active and inactive. tags: @@ -2345,9 +2345,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -2436,9 +2436,9 @@ paths: - not_started type: string default: - - not_started - - active - ended + - active + - not_started description: Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. @@ -4125,6 +4125,9 @@ components: AddOnDetail: type: object properties: + addon_name: + type: string + description: The name of the add-on plan. versions: type: array items: @@ -4136,9 +4139,6 @@ components: addon_id: type: string description: The ID of the add-on plan. - addon_name: - type: string - description: The name of the add-on plan. required: - addon_description - addon_id @@ -5066,35 +5066,35 @@ components: BacktestDetail: type: object properties: + backtest_id: + type: string status: enum: - running - completed - failed type: string - backtest_id: - type: string - start_date: + backtest_name: type: string - format: date + maxLength: 100 + backtest_results: + $ref: '#/components/schemas/AllSubstitutionResults' backtest_substitutions: type: array items: $ref: '#/components/schemas/BacktestSubstitution' - backtest_results: - $ref: '#/components/schemas/AllSubstitutionResults' + start_date: + type: string + format: date + end_date: + type: string + format: date time_created: type: string format: date-time kpis: type: object additionalProperties: {} - end_date: - type: string - format: date - backtest_name: - type: string - maxLength: 100 required: - backtest_id - backtest_name @@ -7715,6 +7715,17 @@ components: InitialAddOnVersionCreateRequest: type: object properties: + currency_code: + type: string + minLength: 1 + invoice_when: + enum: + - invoice_on_attach + - invoice_on_subscription_end + billing_frequency: + enum: + - one_time + - recurring features: type: array items: @@ -7725,22 +7736,11 @@ components: items: $ref: '#/components/schemas/PlanComponentCreateRequest' nullable: true - currency_code: - type: string - minLength: 1 - invoice_when: - enum: - - invoice_on_attach - - invoice_on_subscription_end recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' nullable: true - billing_frequency: - enum: - - one_time - - recurring required: - billing_frequency - currency_code @@ -7777,59 +7777,59 @@ components: InitialPlanVersionCreateRequest: type: object properties: - features: - type: array - items: - type: string - format: uuid - target_customer_ids: - type: array - items: - type: string - nullable: true - minLength: 1 - description: The id provided when creating the customer, we suggest matching - with your internal customer id in your backend + price_adjustment: + $ref: '#/components/schemas/PriceAdjustmentRequest' + make_active: + type: boolean + default: false make_active_type: enum: - replace_on_renewal - grandfather type: string default: replace_on_renewal - components: - type: array - items: - $ref: '#/components/schemas/PlanComponentCreateRequest' - localized_name: - type: string - writeOnly: true - nullable: true + version: + type: integer currency_code: type: string minLength: 1 - make_active: - type: boolean - default: false - month_anchor: + day_anchor: type: integer - maximum: 12 + maximum: 31 minimum: 1 writeOnly: true nullable: true + localized_name: + type: string + writeOnly: true + nullable: true + features: + type: array + items: + type: string + format: uuid + components: + type: array + items: + $ref: '#/components/schemas/PlanComponentCreateRequest' recurring_charges: type: array items: $ref: '#/components/schemas/RecurringChargeCreateRequest' - day_anchor: + target_customer_ids: + type: array + items: + type: string + nullable: true + minLength: 1 + description: The id provided when creating the customer, we suggest matching + with your internal customer id in your backend + month_anchor: type: integer - maximum: 31 + maximum: 12 minimum: 1 writeOnly: true nullable: true - price_adjustment: - $ref: '#/components/schemas/PriceAdjustmentRequest' - version: - type: integer required: - currency_code - version @@ -8419,41 +8419,30 @@ components: LightweightInvoice: type: object properties: - cost_due: - type: number - format: double - maximum: 10000000000 - minimum: 0 - exclusiveMaximum: true - deprecated: true - invoice_id: - type: string external_payment_obj_id: type: string readOnly: true nullable: true - due_date: - type: string - format: date-time - readOnly: true - nullable: true - start_date: + invoice_number: type: string - format: date readOnly: true - end_date: + invoice_id: type: string - format: date - readOnly: true issue_date: type: string format: date-time readOnly: true - invoice_pdf: - type: string - format: uri + payment_status: + enum: + - draft + - voided + - paid + - unpaid readOnly: true - nullable: true + currency: + $ref: '#/components/schemas/PricingUnit' + seller: + $ref: '#/components/schemas/Seller' amount: type: number format: double @@ -8462,13 +8451,22 @@ components: exclusiveMaximum: true exclusiveMinimum: true readOnly: true - payment_status: - enum: - - draft - - voided - - paid - - unpaid + cost_due: + type: number + format: double + maximum: 10000000000 + minimum: 0 + exclusiveMaximum: true + deprecated: true + start_date: + type: string + format: date readOnly: true + invoice_pdf: + type: string + format: uri + readOnly: true + nullable: true external_payment_obj_type: enum: - stripe @@ -8476,13 +8474,15 @@ components: - type: string nullable: true - invoice_number: + end_date: type: string + format: date readOnly: true - seller: - $ref: '#/components/schemas/Seller' - currency: - $ref: '#/components/schemas/PricingUnit' + due_date: + type: string + format: date-time + readOnly: true + nullable: true required: - amount - cost_due @@ -8583,22 +8583,27 @@ components: LightweightSubscriptionRecord: type: object properties: - auto_renew: + billing_plan: + $ref: '#/components/schemas/LightweightPlanVersion' + fully_billed: type: boolean - description: Whether the subscription automatically renews. Defaults to - true. + readOnly: true is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. - billing_plan: - $ref: '#/components/schemas/LightweightPlanVersion' - plan_detail: - allOf: - - $ref: '#/components/schemas/LightweightPlanVersion' - readOnly: true + addons: + type: array + items: + $ref: '#/components/schemas/LightweightAddOnSubscriptionRecord' + customer: + $ref: '#/components/schemas/LightweightCustomer' subscription_id: type: string + auto_renew: + type: boolean + description: Whether the subscription automatically renews. Defaults to + true. start_date: type: string format: date-time @@ -8609,10 +8614,10 @@ components: items: $ref: '#/components/schemas/SubscriptionCategoricalFilter' readOnly: true - addons: - type: array - items: - $ref: '#/components/schemas/LightweightAddOnSubscriptionRecord' + plan_detail: + allOf: + - $ref: '#/components/schemas/LightweightPlanVersion' + readOnly: true end_date: type: string format: date-time @@ -8621,11 +8626,6 @@ components: metadata: type: object additionalProperties: {} - fully_billed: - type: boolean - readOnly: true - customer: - $ref: '#/components/schemas/LightweightCustomer' required: - addons - auto_renew @@ -8642,28 +8642,28 @@ components: LightweightSubscriptionRecordRequest: type: object properties: - auto_renew: - type: boolean - description: Whether the subscription automatically renews. Defaults to - true. + billing_plan: + $ref: '#/components/schemas/LightweightPlanVersionRequest' is_new: type: boolean description: Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. - billing_plan: - $ref: '#/components/schemas/LightweightPlanVersionRequest' + addons: + type: array + items: + $ref: '#/components/schemas/LightweightAddOnSubscriptionRecordRequest' subscription_id: type: string minLength: 1 + auto_renew: + type: boolean + description: Whether the subscription automatically renews. Defaults to + true. start_date: type: string format: date-time description: The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - addons: - type: array - items: - $ref: '#/components/schemas/LightweightAddOnSubscriptionRecordRequest' end_date: type: string format: date-time @@ -9085,14 +9085,24 @@ components: MetricDetail: type: object properties: - metric_name: + event_name: type: string - custom_sql: + readOnly: true + description: Name of the event that this metric is tracking. + metric_type: + enum: + - counter + - rate + - custom + - gauge type: string readOnly: true - nullable: true - description: A custom SQL query that can be used to define the metric. Please - refer to our documentation for more information. + description: The type of metric that this is. Please refer to our documentation + for an explanation of the different types. + categorical_filters: + type: array + items: + $ref: '#/components/schemas/CategoricalFilter' granularity: enum: - seconds @@ -9119,29 +9129,21 @@ components: nullable: true description: Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. - event_name: - type: string - readOnly: true - description: Name of the event that this metric is tracking. - metric_type: - enum: - - counter - - rate - - custom - - gauge - type: string - readOnly: true - description: The type of metric that this is. Please refer to our documentation - for an explanation of the different types. - numeric_filters: - type: array - items: - $ref: '#/components/schemas/NumericFilter' is_cost_metric: type: boolean readOnly: true description: Whether or not this metric is a cost metric (used to track costs to your business). + metric_name: + type: string + metric_id: + type: string + custom_sql: + type: string + readOnly: true + nullable: true + description: A custom SQL query that can be used to define the metric. Please + refer to our documentation for more information. property_name: type: string readOnly: true @@ -9165,12 +9167,10 @@ components: nullable: true description: The proration of the metric. Only applies to metrics of type 'gauge'. - categorical_filters: + numeric_filters: type: array items: - $ref: '#/components/schemas/CategoricalFilter' - metric_id: - type: string + $ref: '#/components/schemas/NumericFilter' usage_aggregation_type: enum: - count @@ -11335,48 +11335,38 @@ components: $ref: '#/components/schemas/TagRequest' required: - initial_version + - plan_duration - plan_name PlanDetail: type: object properties: + active_version: + type: integer + readOnly: true + description: This plan's currently active version. + taxjar_code: + type: string + nullable: true + maxLength: 30 + num_versions: + type: integer + readOnly: true + description: The number of versions that this plan has. external_links: type: array items: $ref: '#/components/schemas/InitialExternalPlanLink' description: The external links that this plan has. - plan_description: - type: string - nullable: true - description: Description of the plan active_subscriptions: type: integer readOnly: true description: The number of active subscriptions that this plan has across all versions. - versions: - type: array - items: - $ref: '#/components/schemas/PlanVersionDetail' - readOnly: true plan_name: type: string description: Name of the plan - tags: - type: array - items: - $ref: '#/components/schemas/Tag' - readOnly: true - description: The tags that this plan has. - num_versions: - type: integer - readOnly: true - description: The number of versions that this plan has. plan_id: type: string - active_version: - type: integer - readOnly: true - description: This plan's currently active version. plan_duration: enum: - monthly @@ -11386,10 +11376,21 @@ components: type: string nullable: true description: Duration of the plan - taxjar_code: + plan_description: type: string nullable: true - maxLength: 30 + description: Description of the plan + tags: + type: array + items: + $ref: '#/components/schemas/Tag' + readOnly: true + description: The tags that this plan has. + versions: + type: array + items: + $ref: '#/components/schemas/PlanVersionDetail' + readOnly: true required: - active_subscriptions - active_version @@ -11620,35 +11621,16 @@ components: PlanVersionDetail: type: object properties: - features: - type: array - items: - $ref: '#/components/schemas/Feature' - active_from: - type: string - format: date-time - readOnly: true - nullable: true - components: - type: array - items: - $ref: '#/components/schemas/PlanComponent' - localized_name: - type: string - readOnly: true - nullable: true - active_to: - type: string - format: date-time - readOnly: true + price_adjustment: + allOf: + - $ref: '#/components/schemas/PriceAdjustment' nullable: true - recurring_charges: - type: array - items: - $ref: '#/components/schemas/RecurringCharge' - readOnly: true - version_id: - type: string + version: + oneOf: + - type: integer + - enum: + - custom_version + type: string readOnly: true status: enum: @@ -11660,18 +11642,6 @@ components: - not_started type: string readOnly: true - alerts: - type: array - items: - $ref: '#/components/schemas/UsageAlert' - readOnly: true - replace_with: - $ref: '#/components/schemas/LightweightPlanVersion' - active_subscriptions: - type: integer - readOnly: true - transition_to: - $ref: '#/components/schemas/LightweightPlan' plan_name: type: string readOnly: true @@ -11679,26 +11649,57 @@ components: type: string format: date-time readOnly: true + plan_id: + type: string + readOnly: true target_customers: type: array items: $ref: '#/components/schemas/LightweightCustomer' - plan_id: + transition_to: + $ref: '#/components/schemas/LightweightPlan' + recurring_charges: + type: array + items: + $ref: '#/components/schemas/RecurringCharge' + readOnly: true + replace_with: + $ref: '#/components/schemas/LightweightPlanVersion' + active_from: type: string + format: date-time readOnly: true + nullable: true currency: $ref: '#/components/schemas/PricingUnit' - price_adjustment: - allOf: - - $ref: '#/components/schemas/PriceAdjustment' + active_subscriptions: + type: integer + readOnly: true + version_id: + type: string + readOnly: true + alerts: + type: array + items: + $ref: '#/components/schemas/UsageAlert' + readOnly: true + localized_name: + type: string + readOnly: true nullable: true - version: - oneOf: - - type: integer - - enum: - - custom_version - type: string + features: + type: array + items: + $ref: '#/components/schemas/Feature' + components: + type: array + items: + $ref: '#/components/schemas/PlanComponent' + active_to: + type: string + format: date-time readOnly: true + nullable: true required: - active_from - active_subscriptions diff --git a/frontend/src/gen-types-camel.ts b/frontend/src/gen-types-camel.ts index 6340824e8..603497645 100644 --- a/frontend/src/gen-types-camel.ts +++ b/frontend/src/gen-types-camel.ts @@ -86,6 +86,9 @@ export interface paths { "/app/customers/{customerId}/delete/": { post: operations["appCustomersDeleteCreate"]; }; + "/app/customers/{customerId}/draftInvoice/": { + get: operations["appCustomersDraftInvoiceRetrieve"]; + }; "/app/customers/summary/": { /** @description Get the current settings for the organization. */ get: operations["appCustomersSummaryRetrieve"]; @@ -100,10 +103,6 @@ export interface paths { "/app/demoRegister/": { post: operations["appDemoRegisterCreate"]; }; - "/app/draftInvoice/": { - /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ - get: operations["appDraftInvoiceRetrieve"]; - }; "/app/events/": { /** @description API endpoint that allows events to be viewed. */ get: operations["appEventsList"]; @@ -152,6 +151,9 @@ export interface paths { get: operations["appMetricsRetrieve"]; patch: operations["appMetricsPartialUpdate"]; }; + "/app/netsuiteCustomers/": { + get: operations["appNetsuiteCustomersRetrieve"]; + }; "/app/netsuiteInvoices/": { get: operations["appNetsuiteInvoicesRetrieve"]; }; @@ -274,6 +276,10 @@ export interface paths { /** @description ViewSet for viewing and editing Plans. */ post: operations["appPlansVersionsTransitionSetCreate"]; }; + "/app/plans/{planId}/versions/next/": { + /** @description ViewSet for viewing and editing Plans. */ + get: operations["appPlansVersionsNextRetrieve"]; + }; "/app/plansByCustomer/": { get: operations["appPlansByCustomerRetrieve"]; }; @@ -301,7 +307,7 @@ export interface paths { post: operations["appSubscriptionsAddonsAttachCreate"]; }; "/app/subscriptions/{subscriptionId}/cancel/": { - post: operations["appSubscriptionsCancelCreate"]; + post: operations["appSubscriptionsCancelCreate2"]; }; "/app/subscriptions/{subscriptionId}/components/{metricId}/changePrepaidUnits/": { post: operations["appSubscriptionsComponentsChangePrepaidUnitsCreate"]; @@ -310,6 +316,17 @@ export interface paths { post: operations["appSubscriptionsSwitchPlanCreate"]; }; "/app/subscriptions/{subscriptionId}/update/": { + post: operations["appSubscriptionsUpdateCreate2"]; + }; + "/app/subscriptions/add/": { + /** @deprecated */ + post: operations["appSubscriptionsAddCreate"]; + }; + "/app/subscriptions/cancel/": { + /** @deprecated */ + post: operations["appSubscriptionsCancelCreate"]; + }; + "/app/subscriptions/update/": { post: operations["appSubscriptionsUpdateCreate"]; }; "/app/switchOrganization/": { @@ -477,14 +494,14 @@ export interface components { initialVersion: components["schemas"]["InitialAddOnVersionCreateRequest"]; }; AddOnDetail: { + /** @description The name of the add-on plan. */ + addonName: string; /** @description This addon's versions. */ versions: (components["schemas"]["AddOnVersion"])[]; - /** @description The ID of the add-on plan. */ - addonId: string; /** @description The description of the add-on plan. */ addonDescription: string; - /** @description The name of the add-on plan. */ - addonName: string; + /** @description The ID of the add-on plan. */ + addonId: string; }; AddOnSubscriptionRecord: { addonSubscriptionId: string; @@ -504,6 +521,9 @@ export interface components { fullyBilled: boolean; /** @description Whether the subscription automatically renews. Defaults to true. */ autoRenew: boolean; + metadata: { + [key: string]: Record | undefined; + }; }; AddOnSubscriptionRecordCreateRequest: { /** @@ -516,6 +536,10 @@ export interface components { * @default 1 */ quantity?: number; + /** @description A JSON object containing additional information about the add-on subscription. This will be returned in the response when you retrieve the add-on subscription. */ + metadata?: { + [key: string]: Record | undefined; + }; }; AddOnUpdate: { addonName?: string; @@ -651,20 +675,20 @@ export interface components { }; BacktestDetail: { backtestId: string; + /** @enum {string} */ + status?: "running" | "completed" | "failed"; backtestName: string; + backtestResults: components["schemas"]["AllSubstitutionResults"]; backtestSubstitutions: (components["schemas"]["BacktestSubstitution"])[]; - /** Format: date-time */ - timeCreated?: string; /** Format: date */ startDate: string; + /** Format: date */ + endDate: string; + /** Format: date-time */ + timeCreated?: string; kpis?: { [key: string]: Record | undefined; }; - backtestResults: components["schemas"]["AllSubstitutionResults"]; - /** @enum {string} */ - status?: "running" | "completed" | "failed"; - /** Format: date */ - endDate: string; }; BacktestSubstitution: { newPlan: components["schemas"]["PlanVersionDetail"]; @@ -872,7 +896,8 @@ export interface components { taxRate: number; /** @enum {string} */ timezone: "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/DarEs_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Ciudad_Juarez" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Fort_Nelson" | "America/Fortaleza" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/PortOf_Spain" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Colombo" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Riyadh" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/IsleOf_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Ulyanovsk" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Wake" | "Pacific/Wallis" | "US/Alaska" | "US/Arizona" | "US/Central" | "US/Eastern" | "US/Hawaii" | "US/Mountain" | "US/Pacific" | "UTC"; - taxProviders: readonly ("taxjar" | "lotus")[]; + /** @description A list of tax providers that are enabled for this customer. The list is ordered, meaning we will succesively try to calculate taxes using each provider until we find one that works. */ + taxProviders: readonly ("taxjar" | "lotus" | "netsuite")[]; }; CustomerBalanceAdjustment: { creditId: string; @@ -1058,24 +1083,6 @@ export interface components { token: string; user: components["schemas"]["User"]; }; - DraftInvoice: { - invoiceId: string; - lineItems: readonly (components["schemas"]["GroupedLineItem"])[]; - /** Format: date-time */ - dueDate: string; - /** Format: double */ - costDue: number; - /** Format: date */ - startDate: string; - /** Format: date-time */ - issueDate: string; - currency: components["schemas"]["PricingUnit"]; - /** Format: date */ - endDate: string; - }; - DraftInvoiceResponse: { - invoice?: (components["schemas"]["DraftInvoice"])[]; - }; EmailRequest: { /** Format: email */ email: string; @@ -1169,17 +1176,6 @@ export interface components { /** @description Whether or not the plan has access to this feature. If your customer can have multiple plans or subscriptions, then you must check the 'access' across all returned plans to determine if the customer can access this feature. */ access: boolean; }; - GroupedLineItem: { - planName: string; - subscriptionFilters: (components["schemas"]["SubscriptionCategoricalFilterDetail"])[]; - /** Format: double */ - subtotal: number; - /** Format: date-time */ - startDate: string; - /** Format: date-time */ - endDate: string; - subItems: (components["schemas"]["LightweightInvoiceLineItem"])[]; - }; ImportCustomerFailure: { /** @enum {string} */ status: "error"; @@ -1212,14 +1208,14 @@ export interface components { email: string; }; InitialAddOnVersionCreateRequest: { - /** @enum {unknown} */ - billingFrequency: "oneTime" | "recurring"; currencyCode: string; - features?: (string)[]; /** @enum {unknown} */ invoiceWhen: "invoiceOnAttach" | "invoiceOnSubscriptionEnd"; - recurringCharges?: (components["schemas"]["RecurringChargeCreateRequest"])[]; + /** @enum {unknown} */ + billingFrequency: "oneTime" | "recurring"; + features?: (string)[]; components?: (components["schemas"]["PlanComponentCreateRequest"])[]; + recurringCharges?: (components["schemas"]["RecurringChargeCreateRequest"])[]; }; InitialExternalPlanLink: { /** @enum {string} */ @@ -1232,16 +1228,23 @@ export interface components { externalPlanId: string; }; InitialPlanVersionCreateRequest: { - localizedName?: string; + priceAdjustment?: components["schemas"]["PriceAdjustmentRequest"]; + /** @default false */ + makeActive?: boolean; + /** + * @default replaceOnRenewal + * @enum {string} + */ + makeActiveType?: "replaceOnRenewal" | "grandfather"; version: number; - targetCustomerIds?: (string)[]; currencyCode: string; + dayAnchor?: number; + localizedName?: string; features?: (string)[]; + components?: (components["schemas"]["PlanComponentCreateRequest"])[]; recurringCharges?: (components["schemas"]["RecurringChargeCreateRequest"])[]; - dayAnchor?: number; + targetCustomerIds?: (string)[]; monthAnchor?: number; - components?: (components["schemas"]["PlanComponentCreateRequest"])[]; - priceAdjustment?: components["schemas"]["PriceAdjustmentRequest"]; }; InviteLinkResponse: { /** Format: email */ @@ -1260,8 +1263,13 @@ export interface components { Invoice: { invoiceId: string; invoiceNumber: string; - /** Format: double */ + /** + * Format: double + * @deprecated + */ costDue: number; + /** Format: double */ + amount: number; currency: components["schemas"]["PricingUnit"]; /** Format: date-time */ issueDate: string; @@ -1288,8 +1296,13 @@ export interface components { InvoiceDetail: { invoiceId: string; invoiceNumber: string; - /** Format: double */ + /** + * Format: double + * @deprecated + */ costDue: number; + /** Format: double */ + amount: number; currency: components["schemas"]["PricingUnit"]; /** Format: date-time */ issueDate: string; @@ -1318,8 +1331,6 @@ export interface components { endDate: string; /** Format: double */ quantity: number; - /** Format: double */ - subtotal: number; /** @enum {string|null} */ billingType: "inArrears" | "intermediate" | "inAdvance" | "oneTime" | "" | null; metadata: ({ @@ -1327,6 +1338,29 @@ export interface components { }) | null; plan: components["schemas"]["LightweightPlanVersion"] | null; subscriptionFilters: readonly (components["schemas"]["SubscriptionCategoricalFilter"])[]; + /** + * Format: double + * @description Base price of the line item. This is the price before any adjustments are applied. + */ + base: number; + adjustments: readonly (components["schemas"]["InvoiceLineItemAdjustment"])[]; + /** + * Format: double + * @description Amount of the line item. This is the price after any adjustments are applied. + */ + amount: number; + /** + * Format: double + * @deprecated + */ + subtotal: number; + }; + InvoiceLineItemAdjustment: { + /** Format: decimal */ + amount: string; + account: string; + /** @enum {unknown} */ + adjustmentType: "salesTax" | "planAdjustment"; }; InvoiceLineItemRequest: { name: string; @@ -1336,13 +1370,26 @@ export interface components { endDate: string; /** Format: double */ quantity: number; - /** Format: double */ - subtotal: number; /** @enum {string|null} */ billingType: "inArrears" | "intermediate" | "inAdvance" | "oneTime" | "" | null; metadata: ({ [key: string]: Record | undefined; }) | null; + /** + * Format: double + * @description Base price of the line item. This is the price before any adjustments are applied. + */ + base: number; + /** + * Format: double + * @description Amount of the line item. This is the price after any adjustments are applied. + */ + amount: number; + /** + * Format: double + * @deprecated + */ + subtotal: number; }; InvoicePaidRequest: { payload: components["schemas"]["InvoiceRequest"]; @@ -1352,6 +1399,11 @@ export interface components { }; InvoiceRequest: { invoiceId: string; + /** + * Format: double + * @deprecated + */ + costDue: number; currency: components["schemas"]["PricingUnitRequest"]; /** @enum {string|null} */ externalPaymentObjType: "stripe" | "braintree" | "" | null; @@ -1421,42 +1473,32 @@ export interface components { address?: components["schemas"]["Address"] | null; }; LightweightInvoice: { + externalPaymentObjId: string; + invoiceNumber: string; invoiceId: string; - /** @enum {string|null} */ - externalPaymentObjType: "stripe" | "braintree" | "" | null; - /** Format: uri */ - invoicePdf: string; - /** Format: double */ - costDue: number; /** Format: date-time */ - dueDate: string; - /** Format: date */ - startDate: string; - seller: components["schemas"]["Seller"]; + issueDate: string; /** @enum {unknown} */ paymentStatus: "draft" | "voided" | "paid" | "unpaid"; - /** Format: date-time */ - issueDate: string; currency: components["schemas"]["PricingUnit"]; - externalPaymentObjId: string; - invoiceNumber: string; - /** Format: date */ - endDate: string; - }; - LightweightInvoiceLineItem: { + seller: components["schemas"]["Seller"]; /** Format: double */ - quantity: number; - subscriptionFilters: readonly (components["schemas"]["SubscriptionCategoricalFilter"])[]; - /** Format: date-time */ + amount: number; + /** + * Format: double + * @deprecated + */ + costDue: number; + /** Format: date */ startDate: string; - plan: components["schemas"]["LightweightPlanVersion"] | null; - name: string; - /** Format: double */ - subtotal: number; + /** Format: uri */ + invoicePdf: string; /** @enum {string|null} */ - billingType: "inArrears" | "intermediate" | "inAdvance" | "oneTime" | "" | null; - /** Format: date-time */ + externalPaymentObjType: "stripe" | "braintree" | "" | null; + /** Format: date */ endDate: string; + /** Format: date-time */ + dueDate: string; }; LightweightMetric: { metricId: string; @@ -1486,46 +1528,52 @@ export interface components { planId: string; }; LightweightSubscriptionRecord: { - planDetail: components["schemas"]["LightweightPlanVersion"]; - /** @description Whether the subscription automatically renews. Defaults to true. */ - autoRenew: boolean; - subscriptionFilters: readonly (components["schemas"]["SubscriptionCategoricalFilter"])[]; - subscriptionId: string; + billingPlan: components["schemas"]["LightweightPlanVersion"]; + fullyBilled: boolean; /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ isNew: boolean; + addons: (components["schemas"]["LightweightAddOnSubscriptionRecord"])[]; + customer: components["schemas"]["LightweightCustomer"]; + subscriptionId: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + autoRenew: boolean; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ startDate: string; - billingPlan: components["schemas"]["LightweightPlanVersion"]; - fullyBilled: boolean; - addons: (components["schemas"]["LightweightAddOnSubscriptionRecord"])[]; - customer: components["schemas"]["LightweightCustomer"]; + subscriptionFilters: readonly (components["schemas"]["SubscriptionCategoricalFilter"])[]; + planDetail: components["schemas"]["LightweightPlanVersion"]; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ endDate: string; + metadata: { + [key: string]: Record | undefined; + }; }; LightweightSubscriptionRecordRequest: { - /** @description Whether the subscription automatically renews. Defaults to true. */ - autoRenew: boolean; - subscriptionId: string; + billingPlan: components["schemas"]["LightweightPlanVersionRequest"]; /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ isNew: boolean; + addons: (components["schemas"]["LightweightAddOnSubscriptionRecordRequest"])[]; + subscriptionId: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + autoRenew: boolean; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ startDate: string; - billingPlan: components["schemas"]["LightweightPlanVersionRequest"]; - addons: (components["schemas"]["LightweightAddOnSubscriptionRecordRequest"])[]; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ endDate: string; + metadata: { + [key: string]: Record | undefined; + }; }; LightweightUser: { /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ @@ -1673,38 +1721,38 @@ export interface components { numericFilters?: (components["schemas"]["NumericFilterDetailRequest"])[]; }; MetricDetail: { - /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ - customSql: string; - /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ - propertyName: string; - numericFilters: (components["schemas"]["NumericFilter"])[]; /** @description Name of the event that this metric is tracking. */ eventName: string; + /** + * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. + * @enum {string} + */ + metricType: "counter" | "rate" | "custom" | "gauge"; categoricalFilters: (components["schemas"]["CategoricalFilter"])[]; - metricName: string; /** * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. * @enum {string|null} */ granularity: "seconds" | "minutes" | "hours" | "days" | "months" | "quarters" | "years" | "total" | "" | null; - metricId: string; /** * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. * @enum {string|null} */ eventType: "delta" | "total" | "" | null; - /** - * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. - * @enum {string} - */ - metricType: "counter" | "rate" | "custom" | "gauge"; + /** @description Whether or not this metric is a cost metric (used to track costs to your business). */ + isCostMetric: boolean; + metricName: string; + metricId: string; + /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ + customSql: string; + /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ + propertyName: string; /** * @description The proration of the metric. Only applies to metrics of type 'gauge'. * @enum {string|null} */ proration: "seconds" | "minutes" | "hours" | "days" | "months" | "quarters" | "years" | "total" | "" | null; - /** @description Whether or not this metric is a cost metric (used to track costs to your business). */ - isCostMetric: boolean; + numericFilters: (components["schemas"]["NumericFilter"])[]; /** * @description The type of aggregation that should be used for this metric. Please refer to our documentation for an explanation of the different types. * @enum {string} @@ -1732,9 +1780,8 @@ export interface components { /** @enum {string} */ status?: "active" | "archived"; }; - NetsuiteInvoiceCSVView: { - /** Format: uri */ - url: string; + NextPlanVersionNumberResponse: { + version: number; }; NumericFilter: { propertyName: string; @@ -1779,7 +1826,7 @@ export interface components { timezone: "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" | "Africa/Algiers" | "Africa/Asmara" | "Africa/Bamako" | "Africa/Bangui" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Blantyre" | "Africa/Brazzaville" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Ceuta" | "Africa/Conakry" | "Africa/Dakar" | "Africa/DarEs_Salaam" | "Africa/Djibouti" | "Africa/Douala" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Kampala" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Lome" | "Africa/Luanda" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Malabo" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Mogadishu" | "Africa/Monrovia" | "Africa/Nairobi" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Porto-Novo" | "Africa/Sao_Tome" | "Africa/Tripoli" | "Africa/Tunis" | "Africa/Windhoek" | "America/Adak" | "America/Anchorage" | "America/Anguilla" | "America/Antigua" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Aruba" | "America/Asuncion" | "America/Atikokan" | "America/Bahia" | "America/Bahia_Banderas" | "America/Barbados" | "America/Belem" | "America/Belize" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Bogota" | "America/Boise" | "America/Cambridge_Bay" | "America/Campo_Grande" | "America/Cancun" | "America/Caracas" | "America/Cayenne" | "America/Cayman" | "America/Chicago" | "America/Chihuahua" | "America/Ciudad_Juarez" | "America/Costa_Rica" | "America/Creston" | "America/Cuiaba" | "America/Curacao" | "America/Danmarkshavn" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Detroit" | "America/Dominica" | "America/Edmonton" | "America/Eirunepe" | "America/El_Salvador" | "America/Fort_Nelson" | "America/Fortaleza" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grand_Turk" | "America/Grenada" | "America/Guadeloupe" | "America/Guatemala" | "America/Guayaquil" | "America/Guyana" | "America/Halifax" | "America/Havana" | "America/Hermosillo" | "America/Indiana/Indianapolis" | "America/Indiana/Knox" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Tell_City" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Inuvik" | "America/Iqaluit" | "America/Jamaica" | "America/Juneau" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Kralendijk" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Lower_Princes" | "America/Maceio" | "America/Managua" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Matamoros" | "America/Mazatlan" | "America/Menominee" | "America/Merida" | "America/Metlakatla" | "America/Mexico_City" | "America/Miquelon" | "America/Moncton" | "America/Monterrey" | "America/Montevideo" | "America/Montserrat" | "America/Nassau" | "America/New_York" | "America/Nome" | "America/Noronha" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Nuuk" | "America/Ojinaga" | "America/Panama" | "America/Paramaribo" | "America/Phoenix" | "America/Port-au-Prince" | "America/PortOf_Spain" | "America/Porto_Velho" | "America/Puerto_Rico" | "America/Punta_Arenas" | "America/Rankin_Inlet" | "America/Recife" | "America/Regina" | "America/Resolute" | "America/Rio_Branco" | "America/Santarem" | "America/Santiago" | "America/Santo_Domingo" | "America/Sao_Paulo" | "America/Scoresbysund" | "America/Sitka" | "America/St_Barthelemy" | "America/St_Johns" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Thule" | "America/Tijuana" | "America/Toronto" | "America/Tortola" | "America/Vancouver" | "America/Whitehorse" | "America/Winnipeg" | "America/Yakutat" | "America/Yellowknife" | "Antarctica/Casey" | "Antarctica/Davis" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Antarctica/Mawson" | "Antarctica/McMurdo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Antarctica/Syowa" | "Antarctica/Troll" | "Antarctica/Vostok" | "Arctic/Longyearbyen" | "Asia/Aden" | "Asia/Almaty" | "Asia/Amman" | "Asia/Anadyr" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Beirut" | "Asia/Bishkek" | "Asia/Brunei" | "Asia/Chita" | "Asia/Choibalsan" | "Asia/Colombo" | "Asia/Damascus" | "Asia/Dhaka" | "Asia/Dili" | "Asia/Dubai" | "Asia/Dushanbe" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Ho_Chi_Minh" | "Asia/Hong_Kong" | "Asia/Hovd" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jayapura" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Khandyga" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Kuwait" | "Asia/Macau" | "Asia/Magadan" | "Asia/Makassar" | "Asia/Manila" | "Asia/Muscat" | "Asia/Nicosia" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Omsk" | "Asia/Oral" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Pyongyang" | "Asia/Qatar" | "Asia/Qostanay" | "Asia/Qyzylorda" | "Asia/Riyadh" | "Asia/Sakhalin" | "Asia/Samarkand" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Thimphu" | "Asia/Tokyo" | "Asia/Tomsk" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Ust-Nera" | "Asia/Vientiane" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Bermuda" | "Atlantic/Canary" | "Atlantic/Cape_Verde" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/South_Georgia" | "Atlantic/St_Helena" | "Atlantic/Stanley" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Broken_Hill" | "Australia/Darwin" | "Australia/Eucla" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Lord_Howe" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Canada/Atlantic" | "Canada/Central" | "Canada/Eastern" | "Canada/Mountain" | "Canada/Newfoundland" | "Canada/Pacific" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Astrakhan" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Busingen" | "Europe/Chisinau" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Gibraltar" | "Europe/Guernsey" | "Europe/Helsinki" | "Europe/IsleOf_Man" | "Europe/Istanbul" | "Europe/Jersey" | "Europe/Kaliningrad" | "Europe/Kirov" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Mariehamn" | "Europe/Minsk" | "Europe/Monaco" | "Europe/Moscow" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Saratov" | "Europe/Simferopol" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Tirane" | "Europe/Ulyanovsk" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT" | "Indian/Antananarivo" | "Indian/Chagos" | "Indian/Christmas" | "Indian/Cocos" | "Indian/Comoro" | "Indian/Kerguelen" | "Indian/Mahe" | "Indian/Maldives" | "Indian/Mauritius" | "Indian/Mayotte" | "Indian/Reunion" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Bougainville" | "Pacific/Chatham" | "Pacific/Chuuk" | "Pacific/Easter" | "Pacific/Efate" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Galapagos" | "Pacific/Gambier" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Kanton" | "Pacific/Kiritimati" | "Pacific/Kosrae" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Marquesas" | "Pacific/Midway" | "Pacific/Nauru" | "Pacific/Niue" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Palau" | "Pacific/Pitcairn" | "Pacific/Pohnpei" | "Pacific/Port_Moresby" | "Pacific/Rarotonga" | "Pacific/Saipan" | "Pacific/Tahiti" | "Pacific/Tarawa" | "Pacific/Tongatapu" | "Pacific/Wake" | "Pacific/Wallis" | "US/Alaska" | "US/Arizona" | "US/Central" | "US/Eastern" | "US/Hawaii" | "US/Mountain" | "US/Pacific" | "UTC"; stripeAccountId: string; braintreeMerchantId: string; - taxProviders: readonly ("taxjar" | "lotus")[]; + taxProviders: readonly ("taxjar" | "lotus" | "netsuite")[]; }; OrganizationCreateRequest: { organizationName: string; @@ -1888,7 +1935,7 @@ export interface components { paymentProvider?: "stripe" | "braintree"; paymentProviderId?: string; nangoConnected?: boolean; - taxProviders?: ("taxjar" | "lotus")[]; + taxProviders?: ("taxjar" | "lotus" | "netsuite")[]; }; PatchedPlanUpdateRequest: { /** @description Name of the plan */ @@ -1963,6 +2010,8 @@ export interface components { externalLinks: (components["schemas"]["InitialExternalPlanLink"])[]; /** @description The number of versions that this plan has. */ numVersions: number; + /** @description This plan's currently active version. */ + activeVersion: number; /** @description The number of active subscriptions that this plan has across all versions. */ activeSubscriptions: number; /** @description The tags that this plan has. */ @@ -2023,32 +2072,34 @@ export interface components { * @description Duration of the plan * @enum {string|null} */ - planDuration?: "monthly" | "quarterly" | "yearly" | "" | null; + planDuration: "monthly" | "quarterly" | "yearly" | "" | null; initialExternalLinks?: (components["schemas"]["InitialExternalPlanLinkRequest"])[]; initialVersion: components["schemas"]["InitialPlanVersionCreateRequest"]; tags?: (components["schemas"]["TagRequest"])[]; }; PlanDetail: { + /** @description This plan's currently active version. */ + activeVersion: number; + taxjarCode?: string; + /** @description The number of versions that this plan has. */ + numVersions: number; + /** @description The external links that this plan has. */ + externalLinks: (components["schemas"]["InitialExternalPlanLink"])[]; + /** @description The number of active subscriptions that this plan has across all versions. */ + activeSubscriptions: number; /** @description Name of the plan */ planName: string; - versions: readonly (components["schemas"]["PlanVersionDetail"])[]; + planId: string; /** * @description Duration of the plan * @enum {string|null} */ planDuration: "monthly" | "quarterly" | "yearly" | "" | null; - /** @description The tags that this plan has. */ - tags: readonly (components["schemas"]["Tag"])[]; /** @description Description of the plan */ planDescription: string; - taxjarCode?: string; - /** @description The number of versions that this plan has. */ - numVersions: number; - /** @description The number of active subscriptions that this plan has across all versions. */ - activeSubscriptions: number; - planId: string; - /** @description The external links that this plan has. */ - externalLinks: (components["schemas"]["InitialExternalPlanLink"])[]; + /** @description The tags that this plan has. */ + tags: readonly (components["schemas"]["Tag"])[]; + versions: readonly (components["schemas"]["PlanVersionDetail"])[]; }; PlanNameAndID: { /** @description Name of the plan */ @@ -2087,6 +2138,9 @@ export interface components { /** Format: date-time */ activeTo: string; localizedName: string; + targetCustomers: (components["schemas"]["LightweightCustomer"])[]; + /** Format: date-time */ + createdOn: string; /** @deprecated */ usageBillingFrequency: string; /** @@ -2115,28 +2169,38 @@ export interface components { version: number; targetCustomerIds?: (string)[]; localizedName?: string; + /** @default false */ + makeActive?: boolean; + /** + * @default replaceOnRenewal + * @enum {string} + */ + makeActiveType?: "replaceOnRenewal" | "grandfather"; }; PlanVersionDetail: { - replaceWith: components["schemas"]["LightweightPlanVersion"]; + priceAdjustment: components["schemas"]["PriceAdjustment"] | null; + version: number | "customVersion"; + /** @enum {string} */ + status: "active" | "retiring" | "grandfathered" | "deleted" | "inactive" | "notStarted"; planName: string; /** Format: date-time */ - activeFrom: string; + createdOn: string; + planId: string; + targetCustomers: (components["schemas"]["LightweightCustomer"])[]; + transitionTo: components["schemas"]["LightweightPlan"]; recurringCharges: readonly (components["schemas"]["RecurringCharge"])[]; - localizedName: string; + replaceWith: components["schemas"]["LightweightPlanVersion"]; /** Format: date-time */ - activeTo: string; - features: (components["schemas"]["Feature"])[]; - planId: string; - versionId: string; + activeFrom: string; currency: components["schemas"]["PricingUnit"]; - components: (components["schemas"]["PlanComponent"])[]; - version: number | "customVersion"; - alerts: readonly (components["schemas"]["UsageAlert"])[]; activeSubscriptions: number; - transitionTo: components["schemas"]["LightweightPlan"]; - /** @enum {string} */ - status: "active" | "retiring" | "grandfathered" | "deleted" | "inactive" | "notStarted"; - priceAdjustment: components["schemas"]["PriceAdjustment"] | null; + versionId: string; + alerts: readonly (components["schemas"]["UsageAlert"])[]; + localizedName: string; + features: (components["schemas"]["Feature"])[]; + components: (components["schemas"]["PlanComponent"])[]; + /** Format: date-time */ + activeTo: string; }; PlanVersionHistoricalSubscription: { customerId: string; @@ -2414,12 +2478,10 @@ export interface components { revenueByMetric: (components["schemas"]["MetricRevenue"])[]; topCustomers: components["schemas"]["TopCustomers"]; }; - SubscriptionCategoricalFilter: { - value: string; - /** @description The string name of the property to filter on. Example: 'productId' */ - propertyName: string; + SubscriptionCancelledRequest: { + payload: components["schemas"]["SubscriptionRecordRequest"]; }; - SubscriptionCategoricalFilterDetail: { + SubscriptionCategoricalFilter: { value: string; /** @description The string name of the property to filter on. Example: 'productId' */ propertyName: string; @@ -2429,8 +2491,12 @@ export interface components { /** @description The string name of the property to filter on. Example: 'productId' */ propertyName: string; }; + SubscriptionCreatedRequest: { + payload: components["schemas"]["SubscriptionRecordRequest"]; + }; SubscriptionCustomerSummary: { billingPlanName: string; + planVersion: number; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. @@ -2460,6 +2526,9 @@ export interface components { billingPlan: components["schemas"]["LightweightPlanVersion"]; fullyBilled: boolean; addons: (components["schemas"]["LightweightAddOnSubscriptionRecord"])[]; + metadata: { + [key: string]: Record | undefined; + }; }; SubscriptionRecordCancelRequest: { /** @@ -2505,6 +2574,10 @@ export interface components { planId?: string; /** @description The initial units for the plan components' prepaid fixed charges. This is only required if the plan has plan components where you did not specify the initial units. */ componentFixedChargesInitialUnits?: (components["schemas"]["ComponentsFixedChargeInitialValueRequest"])[]; + /** @description A JSON object containing additional information about the subscription. */ + metadata?: { + [key: string]: Record | undefined; + }; }; SubscriptionRecordCreateSerializerOldRequest: { /** @@ -2530,6 +2603,29 @@ export interface components { */ planId?: string; }; + SubscriptionRecordRequest: { + subscriptionId: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + startDate: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + endDate: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + autoRenew: boolean; + /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ + isNew: boolean; + subscriptionFilters: (components["schemas"]["SubscriptionCategoricalFilterRequest"])[]; + billingPlan: components["schemas"]["LightweightPlanVersionRequest"]; + addons: (components["schemas"]["LightweightAddOnSubscriptionRecordRequest"])[]; + metadata: { + [key: string]: Record | undefined; + }; + }; SubscriptionRecordSwitchPlanRequest: { /** * Format: uuid @@ -2559,6 +2655,10 @@ export interface components { * @description Change the end date for the subscription. */ endDate?: string; + /** @description Update the metadata for the subscription. */ + metadata?: { + [key: string]: Record | undefined; + }; }; SubscriptionRecordUpdateSerializerOldRequest: { /** @@ -2586,6 +2686,9 @@ export interface components { */ endDate?: string; }; + SubscriptionRenewedRequest: { + payload: components["schemas"]["SubscriptionRecordRequest"]; + }; Tag: { tagName: string; tagHex: string; @@ -2637,6 +2740,11 @@ export interface components { status: "success"; detail: string; }; + URLResponse: { + /** Format: uri */ + url: string; + exists: boolean; + }; UsageAlert: { usageAlertId: string; metric: components["schemas"]["Metric"]; @@ -2703,15 +2811,15 @@ export interface components { WebhookEndpointRequest: { name?: string; webhookUrl: string; - triggersIn: ("invoice.created" | "invoice.paid" | "invoice.pastDue" | "usageAlert.triggered" | "customer.created")[]; + triggersIn: ("customer.created" | "invoice.created" | "invoice.paid" | "invoice.pastDue" | "subscription.created" | "usageAlert.triggered" | "subscription.cancelled" | "subscription.renewed")[]; }; WebhookTrigger: { /** @enum {string} */ - triggerName: "invoice.created" | "invoice.paid" | "invoice.pastDue" | "usageAlert.triggered" | "customer.created"; + triggerName: "customer.created" | "invoice.created" | "invoice.paid" | "invoice.pastDue" | "subscription.created" | "usageAlert.triggered" | "subscription.cancelled" | "subscription.renewed"; }; WebhookTriggerRequest: { /** @enum {string} */ - triggerName: "invoice.created" | "invoice.paid" | "invoice.pastDue" | "usageAlert.triggered" | "customer.created"; + triggerName: "customer.created" | "invoice.created" | "invoice.paid" | "invoice.pastDue" | "subscription.created" | "usageAlert.triggered" | "subscription.cancelled" | "subscription.renewed"; }; }; responses: never; @@ -2985,6 +3093,7 @@ export interface operations { appCostAnalysisRetrieve: { /** @description Returns the revenue for an organization in a given time period. */ parameters: { + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ query: { customerId: string; endDate: string; @@ -3172,6 +3281,20 @@ export interface operations { }; }; }; + appCustomersDraftInvoiceRetrieve: { + parameters: { + query?: { + includeNextPeriod?: boolean; + }; + path: { + customerId: string; + }; + }; + responses: { + /** @description No response body */ + 200: never; + }; + }; appCustomersSummaryRetrieve: { /** @description Get the current settings for the organization. */ responses: { @@ -3234,23 +3357,6 @@ export interface operations { }; }; }; - appDraftInvoiceRetrieve: { - /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ - parameters: { - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - query: { - customerId: string; - includeNextPeriod?: boolean; - }; - }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["DraftInvoiceResponse"]; - }; - }; - }; - }; appEventsList: { /** @description API endpoint that allows events to be viewed. */ parameters?: { @@ -3558,11 +3664,20 @@ export interface operations { }; }; }; + appNetsuiteCustomersRetrieve: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["URLResponse"]; + }; + }; + }; + }; appNetsuiteInvoicesRetrieve: { responses: { 200: { content: { - "application/json": components["schemas"]["NetsuiteInvoiceCSVView"]; + "application/json": components["schemas"]["URLResponse"]; }; }; }; @@ -4295,6 +4410,21 @@ export interface operations { }; }; }; + appPlansVersionsNextRetrieve: { + /** @description ViewSet for viewing and editing Plans. */ + parameters: { + path: { + planId: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["NextPlanVersionNumberResponse"]; + }; + }; + }; + }; appPlansByCustomerRetrieve: { responses: { 200: { @@ -4460,7 +4590,7 @@ export interface operations { }; }; }; - appSubscriptionsCancelCreate: { + appSubscriptionsCancelCreate2: { parameters: { /** @description The ID of the subscription to cancel. */ path: { @@ -4528,7 +4658,7 @@ export interface operations { }; }; }; - appSubscriptionsUpdateCreate: { + appSubscriptionsUpdateCreate2: { parameters: { /** @description The ID of the subscription to update. */ path: { @@ -4550,6 +4680,76 @@ export interface operations { }; }; }; + appSubscriptionsAddCreate: { + /** @deprecated */ + requestBody: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCreateSerializerOldRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCreateSerializerOldRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCreateSerializerOldRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; + }; + appSubscriptionsCancelCreate: { + /** @deprecated */ + parameters: { + /** @description Filter to a specific customer. */ + /** @description Filter to a specific plan. If not specified, all plans will be included in the cancellation request. */ + /** @description Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'propertyName' and a key of 'value'. */ + query: { + customerId: string; + planId?: string; + subscriptionFilters?: (components["schemas"]["SubscriptionCategoricalFilterRequest"])[]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCancelRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCancelRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCancelRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": (components["schemas"]["SubscriptionRecord"])[]; + }; + }; + }; + }; + appSubscriptionsUpdateCreate: { + parameters: { + /** @description Filter to a specific customer. */ + /** @description Filter to a specific plan. */ + /** @description Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'propertyName' and a key of 'value'. */ + query: { + customerId: string; + planId: string; + subscriptionFilters?: (components["schemas"]["SubscriptionCategoricalFilterRequest"])[]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordUpdateSerializerOldRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordUpdateSerializerOldRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordUpdateSerializerOldRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": (components["schemas"]["SubscriptionRecord"])[]; + }; + }; + }; + }; appSwitchOrganizationCreate: { /** @description Get the current settings for the organization. */ requestBody: { diff --git a/frontend/src/gen-types.ts b/frontend/src/gen-types.ts index ae85527c6..187768ac6 100644 --- a/frontend/src/gen-types.ts +++ b/frontend/src/gen-types.ts @@ -14,3343 +14,1401 @@ type OneOf = T extends [infer Only] ? OneOf<[XOR, ...Rest]> : never; -export interface components { - schemas: { - APIToken: { - /** @description A free-form name for the API key. Need not be unique. 50 characters max. */ - name?: string; - prefix: string; - /** - * Expires - * Format: date-time - * @description Once API key expires, clients cannot use it anymore. - */ - expiry_date?: string; - /** Format: date-time */ - created: string; - }; - APITokenCreateResponse: { - api_key: components["schemas"]["APIToken"]; - key: string; - }; - APITokenRequest: { - /** @description A free-form name for the API key. Need not be unique. 50 characters max. */ - name?: string; - /** - * Expires - * Format: date-time - * @description Once API key expires, clients cannot use it anymore. - */ - expiry_date?: string; - }; - APITokenRollResponse: { - api_key: components["schemas"]["APIToken"]; - key: string; - }; - AccessMethodsSubscriptionRecord: { - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - start_date: string; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - end_date: string; - subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; - plan: components["schemas"]["LightweightPlanVersion"]; - }; - /** @description DRF serializer for :class:`~activity.models.Action`. */ - Action: { - id: number; - actor: string; - verb: string; - action_object: string; - target: string; - public?: boolean; - description?: string; - /** Format: date-time */ - timestamp?: string; - }; - AddFeatureRequest: { - /** - * Format: uuid - * @description The feature_id of the feature you want to add to the plan. - */ - feature_id: string; - }; - AddFeatureResponse: { - success: boolean; - message: string; - }; - AddFeatureToAddOnRequest: { - /** @description The version_ids of the AddOn versions you want to add the feature to. If you want to apply to all versions, use the all_versions parameter. */ - version_ids?: string[]; - /** - * Format: uuid - * @description The feature_id of the feature you want to add to the plan. - */ - feature_id: string; - }; - AddFeatureToAddOnResponse: { - success: boolean; - message: string; - }; - AddFeatureToPlanRequest: { - /** @description The version_ids of the plan versions you want to add the feature to. If you want to apply to all versions, use the all_versions parameter. */ - version_ids?: string[]; - /** - * @description Whether or not to apply this feature to all versions of the feature. If you want to apply to specific versions, use the version_ids parameter. - * @default false - */ - all_versions?: boolean; - /** - * Format: uuid - * @description The feature_id of the feature you want to add to the plan. - */ - feature_id: string; - }; - AddFeatureToPlanResponse: { - success: boolean; - message: string; - }; - AddFeatureToPlanVersionNumberResponse: { - success: boolean; - message: string; - }; - AddOnCreateRequest: { - /** @description The name of the add-on plan. */ - addon_name: string; - /** @description The description of the add-on plan. */ - addon_description: string; - /** @description The initial version of the add-on plan. */ - initial_version: components["schemas"]["InitialAddOnVersionCreateRequest"]; - }; - AddOnDetail: { - /** @description This addon's versions. */ - versions: components["schemas"]["AddOnVersion"][]; - /** @description The ID of the add-on plan. */ - addon_id: string; - /** @description The description of the add-on plan. */ - addon_description: string; - /** @description The name of the add-on plan. */ - addon_name: string; - }; - AddOnSubscriptionRecord: { - addon_subscription_id: string; - customer: components["schemas"]["LightweightCustomer"]; - addon: components["schemas"]["LightweightAddOn"]; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - start_date: string; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - end_date: string; - parent: components["schemas"]["LightweightSubscriptionRecord"]; - fully_billed: boolean; - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew: boolean; - }; - AddOnSubscriptionRecordCreateRequest: { - /** - * Format: uuid - * @description The add-on to be applied to the subscription. - */ - addon_id?: string; - /** - * @description The quantity of the add-on to be applied to the subscription. Flat fees of add-ons will be multiplied by this quantity. Usage-based components of add-ons will be unaffected by the quantity. - * @default 1 - */ - quantity?: number; - }; - AddOnUpdate: { - addon_name?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; - }; - AddOnVersion: { - recurring_charges: components["schemas"]["RecurringCharge"][]; - components: components["schemas"]["PlanComponent"][]; - features: components["schemas"]["Feature"][]; - /** @enum {string} */ - status: - | "active" - | "retiring" - | "grandfathered" - | "deleted" - | "inactive" - | "not_started"; - /** @description Currency of the plan. Can only be null if the flat fee is 0 and all components are of type free. */ - currency: components["schemas"]["PricingUnit"]; - /** @description The number of active instances of this version of the add-on plan. */ - active_instances: number; - /** @enum {unknown} */ - invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; - /** @enum {unknown} */ - billing_frequency: "one_time" | "recurring"; - /** @enum {string} */ - addon_type: "usage_based" | "flat"; - }; - AddOnVersionCreateRequest: { - /** Format: uuid */ - addon_id: string; - recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; - components?: components["schemas"]["PlanComponentCreateRequest"][]; - features?: string[]; - currency_code: string; - /** @enum {unknown} */ - invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; - /** @enum {unknown} */ - billing_frequency: "one_time" | "recurring"; - }; - AddOnVersionDetail: { - recurring_charges: components["schemas"]["RecurringCharge"][]; - components: components["schemas"]["PlanComponent"][]; - features: components["schemas"]["Feature"][]; - /** @enum {string} */ - status: - | "active" - | "retiring" - | "grandfathered" - | "deleted" - | "inactive" - | "not_started"; - /** @description Currency of the plan. Can only be null if the flat fee is 0 and all components are of type free. */ - currency: components["schemas"]["PricingUnit"]; - /** @description The number of active instances of this version of the add-on plan. */ - active_instances: number; - /** @enum {unknown} */ - invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; - /** @enum {unknown} */ - billing_frequency: "one_time" | "recurring"; - /** @enum {string} */ - addon_type: "usage_based" | "flat"; - }; - AddOnVersionUpdate: { - addon_version_name?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; - }; - AddPlanTags: { - tags?: components["schemas"]["Tag"][]; - success: boolean; - message: string; - }; - AddPlanTagsRequest: { - tags?: components["schemas"]["TagRequest"][]; - }; - AddTargetCustomerResponse: { - success: boolean; - message: string; - }; - Address: { - /** @description City, district, suburb, town, or village */ - city: string; - /** - * @description Two-letter country code (ISO 3166-1 alpha-2) - * @enum {string} - */ - country: - | "AW" - | "AF" - | "AO" - | "AI" - | "AX" - | "AL" - | "AD" - | "AE" - | "AR" - | "AM" - | "AS" - | "AQ" - | "TF" - | "AG" - | "AU" - | "AT" - | "AZ" - | "BI" - | "BE" - | "BJ" - | "BQ" - | "BF" - | "BD" - | "BG" - | "BH" - | "BS" - | "BA" - | "BL" - | "BY" - | "BZ" - | "BM" - | "BO" - | "BR" - | "BB" - | "BN" - | "BT" - | "BV" - | "BW" - | "CF" - | "CA" - | "CC" - | "CH" - | "CL" - | "CN" - | "CI" - | "CM" - | "CD" - | "CG" - | "CK" - | "CO" - | "KM" - | "CV" - | "CR" - | "CU" - | "CW" - | "CX" - | "KY" - | "CY" - | "CZ" - | "DE" - | "DJ" - | "DM" - | "DK" - | "DO" - | "DZ" - | "EC" - | "EG" - | "ER" - | "EH" - | "ES" - | "EE" - | "ET" - | "FI" - | "FJ" - | "FK" - | "FR" - | "FO" - | "FM" - | "GA" - | "GB" - | "GE" - | "GG" - | "GH" - | "GI" - | "GN" - | "GP" - | "GM" - | "GW" - | "GQ" - | "GR" - | "GD" - | "GL" - | "GT" - | "GF" - | "GU" - | "GY" - | "HK" - | "HM" - | "HN" - | "HR" - | "HT" - | "HU" - | "ID" - | "IM" - | "IN" - | "IO" - | "IE" - | "IR" - | "IQ" - | "IS" - | "IL" - | "IT" - | "JM" - | "JE" - | "JO" - | "JP" - | "KZ" - | "KE" - | "KG" - | "KH" - | "KI" - | "KN" - | "KR" - | "KW" - | "LA" - | "LB" - | "LR" - | "LY" - | "LC" - | "LI" - | "LK" - | "LS" - | "LT" - | "LU" - | "LV" - | "MO" - | "MF" - | "MA" - | "MC" - | "MD" - | "MG" - | "MV" - | "MX" - | "MH" - | "MK" - | "ML" - | "MT" - | "MM" - | "ME" - | "MN" - | "MP" - | "MZ" - | "MR" - | "MS" - | "MQ" - | "MU" - | "MW" - | "MY" - | "YT" - | "NA" - | "NC" - | "NE" - | "NF" - | "NG" - | "NI" - | "NU" - | "NL" - | "NO" - | "NP" - | "NR" - | "NZ" - | "OM" - | "PK" - | "PA" - | "PN" - | "PE" - | "PH" - | "PW" - | "PG" - | "PL" - | "PR" - | "KP" - | "PT" - | "PY" - | "PS" - | "PF" - | "QA" - | "RE" - | "RO" - | "RU" - | "RW" - | "SA" - | "SD" - | "SN" - | "SG" - | "GS" - | "SH" - | "SJ" - | "SB" - | "SL" - | "SV" - | "SM" - | "SO" - | "PM" - | "RS" - | "SS" - | "ST" - | "SR" - | "SK" - | "SI" - | "SE" - | "SZ" - | "SX" - | "SC" - | "SY" - | "TC" - | "TD" - | "TG" - | "TH" - | "TJ" - | "TK" - | "TM" - | "TL" - | "TO" - | "TT" - | "TN" - | "TR" - | "TV" - | "TW" - | "TZ" - | "UG" - | "UA" - | "UM" - | "UY" - | "US" - | "UZ" - | "VA" - | "VC" - | "VE" - | "VG" - | "VI" - | "VN" - | "VU" - | "WF" - | "WS" - | "YE" - | "ZA" - | "ZM" - | "ZW"; - /** @description Address line 1 (e.g., street, PO Box, or company name) */ - line1: string; - /** @description Address line 2 (e.g., apartment, suite, unit, or building) */ - line2?: string; - /** @description ZIP or postal code */ - postal_code: string; - /** @description State, county, province, or region */ - state?: string; - }; - AddressRequest: { - /** @description City, district, suburb, town, or village */ - city: string; - /** - * @description Two-letter country code (ISO 3166-1 alpha-2) - * @enum {string} - */ - country: - | "AW" - | "AF" - | "AO" - | "AI" - | "AX" - | "AL" - | "AD" - | "AE" - | "AR" - | "AM" - | "AS" - | "AQ" - | "TF" - | "AG" - | "AU" - | "AT" - | "AZ" - | "BI" - | "BE" - | "BJ" - | "BQ" - | "BF" - | "BD" - | "BG" - | "BH" - | "BS" - | "BA" - | "BL" - | "BY" - | "BZ" - | "BM" - | "BO" - | "BR" - | "BB" - | "BN" - | "BT" - | "BV" - | "BW" - | "CF" - | "CA" - | "CC" - | "CH" - | "CL" - | "CN" - | "CI" - | "CM" - | "CD" - | "CG" - | "CK" - | "CO" - | "KM" - | "CV" - | "CR" - | "CU" - | "CW" - | "CX" - | "KY" - | "CY" - | "CZ" - | "DE" - | "DJ" - | "DM" - | "DK" - | "DO" - | "DZ" - | "EC" - | "EG" - | "ER" - | "EH" - | "ES" - | "EE" - | "ET" - | "FI" - | "FJ" - | "FK" - | "FR" - | "FO" - | "FM" - | "GA" - | "GB" - | "GE" - | "GG" - | "GH" - | "GI" - | "GN" - | "GP" - | "GM" - | "GW" - | "GQ" - | "GR" - | "GD" - | "GL" - | "GT" - | "GF" - | "GU" - | "GY" - | "HK" - | "HM" - | "HN" - | "HR" - | "HT" - | "HU" - | "ID" - | "IM" - | "IN" - | "IO" - | "IE" - | "IR" - | "IQ" - | "IS" - | "IL" - | "IT" - | "JM" - | "JE" - | "JO" - | "JP" - | "KZ" - | "KE" - | "KG" - | "KH" - | "KI" - | "KN" - | "KR" - | "KW" - | "LA" - | "LB" - | "LR" - | "LY" - | "LC" - | "LI" - | "LK" - | "LS" - | "LT" - | "LU" - | "LV" - | "MO" - | "MF" - | "MA" - | "MC" - | "MD" - | "MG" - | "MV" - | "MX" - | "MH" - | "MK" - | "ML" - | "MT" - | "MM" - | "ME" - | "MN" - | "MP" - | "MZ" - | "MR" - | "MS" - | "MQ" - | "MU" - | "MW" - | "MY" - | "YT" - | "NA" - | "NC" - | "NE" - | "NF" - | "NG" - | "NI" - | "NU" - | "NL" - | "NO" - | "NP" - | "NR" - | "NZ" - | "OM" - | "PK" - | "PA" - | "PN" - | "PE" - | "PH" - | "PW" - | "PG" - | "PL" - | "PR" - | "KP" - | "PT" - | "PY" - | "PS" - | "PF" - | "QA" - | "RE" - | "RO" - | "RU" - | "RW" - | "SA" - | "SD" - | "SN" - | "SG" - | "GS" - | "SH" - | "SJ" - | "SB" - | "SL" - | "SV" - | "SM" - | "SO" - | "PM" - | "RS" - | "SS" - | "ST" - | "SR" - | "SK" - | "SI" - | "SE" - | "SZ" - | "SX" - | "SC" - | "SY" - | "TC" - | "TD" - | "TG" - | "TH" - | "TJ" - | "TK" - | "TM" - | "TL" - | "TO" - | "TT" - | "TN" - | "TR" - | "TV" - | "TW" - | "TZ" - | "UG" - | "UA" - | "UM" - | "UY" - | "US" - | "UZ" - | "VA" - | "VC" - | "VE" - | "VG" - | "VI" - | "VN" - | "VU" - | "WF" - | "WS" - | "YE" - | "ZA" - | "ZM" - | "ZW"; - /** @description Address line 1 (e.g., street, PO Box, or company name) */ - line1: string; - /** @description Address line 2 (e.g., apartment, suite, unit, or building) */ - line2?: string; - /** @description ZIP or postal code */ - postal_code: string; - /** @description State, county, province, or region */ - state?: string; - }; - AllSubstitutionResults: { - substitution_results?: components["schemas"]["SingleSubstitution"][]; - /** Format: double */ - original_plans_revenue?: number; - /** Format: double */ - new_plans_revenue?: number; - /** Format: double */ - pct_revenue_change?: number; - }; - BacktestCreate: { - /** Format: date */ - start_date: string; - /** Format: date */ - end_date: string; - kpis: "total_revenue"[]; - backtest_name: string; - }; - BacktestCreateRequest: { - /** Format: date */ - start_date: string; - /** Format: date */ - end_date: string; - substitutions: components["schemas"]["BacktestSubstitutionMultiRequest"][]; - kpis: "total_revenue"[]; - backtest_name: string; - }; - BacktestDetail: { - backtest_id: string; - backtest_name: string; - backtest_substitutions: components["schemas"]["BacktestSubstitution"][]; - /** Format: date-time */ - time_created?: string; - /** Format: date */ - start_date: string; - kpis?: { - [key: string]: Record | undefined; - }; - backtest_results: components["schemas"]["AllSubstitutionResults"]; - /** @enum {string} */ - status?: "running" | "completed" | "failed"; - /** Format: date */ - end_date: string; - }; - BacktestSubstitution: { - new_plan: components["schemas"]["PlanVersionDetail"]; - original_plan: components["schemas"]["PlanVersionDetail"]; - }; - BacktestSubstitutionMulti: { - /** Format: uuid */ - new_plan: string; - original_plans: string[]; - }; - BacktestSubstitutionMultiRequest: { - /** Format: uuid */ - new_plan: string; - original_plans: string[]; - }; - BacktestSummary: { - backtest_name: string; - /** Format: date */ - start_date: string; - /** Format: date */ - end_date: string; - /** Format: date-time */ - time_created?: string; - kpis?: { - [key: string]: Record | undefined; - }; - /** @enum {string} */ - status?: "running" | "completed" | "failed"; - backtest_id: string; - }; - BatchEventRequest: { - batch: components["schemas"]["EventRequest"][]; - }; - CategoricalFilter: { - property_name: string; - /** @enum {string} */ - operator: "isin" | "isnotin"; - comparison_value: string[]; - }; - CategoricalFilterDetailRequest: { - property_name: string; - /** @enum {string} */ - operator: "isin" | "isnotin"; - comparison_value: string[]; - }; - CategoricalFilterRequest: { - property_name: string; - /** @enum {string} */ - operator: "isin" | "isnotin"; - comparison_value: string[]; - }; - ChangeActiveDateResponse: { - success: boolean; - message: string; - }; - ChangeActiveDatesRequest: { - /** @description The version_ids of the plan versions you want to add the feature to. If you want to apply to all versions, use the all_versions parameter. */ - version_ids?: string[]; - /** - * @description Whether or not to apply this feature to all versions of the feature. If you want to apply to specific versions, use the version_ids parameter. - * @default false - */ - all_versions?: boolean; - /** - * Format: date-time - * @description The date and time that the feature should be active from. If you want to make this inactive, you can pass null here. - */ - active_from?: string; - /** - * Format: date-time - * @description The date and time that the feature should be active until. If you want to make this active indefinitely, you can pass null here. - */ - active_to?: string; - }; - ChangePrepaidUnitsRequest: { - /** - * Format: double - * @description The new prepaid units for the customer. - */ - units: number; - /** - * @description Whether or not to immediately invoice the customer for the change in prepaid units. - * @default true - */ - invoice_now?: boolean; - }; - ChangeUserOrganizationRequestRequest: { - /** @description The organization ID to transfer to */ - transfer_to_organization_id: string; - }; - ComponentCharge: { - /** - * Format: double - * @description The number of units to charge for. If left null, then it will be required at subscription create time. - */ - units: number; - /** @enum {unknown} */ - charge_behavior: "prorate" | "full"; - }; - ComponentChargeCreateRequest: { - /** - * Format: double - * @description The number of units to charge for. If left null, then it will be required at subscription create time. - */ - units: number; - /** @enum {unknown} */ - charge_behavior: "prorate" | "full"; - }; - ComponentUsage: { - /** @description The name of the event you are checking access for. */ - event_name: string; - /** @description The name of the metric. */ - metric_name: string; - /** @description The metric_id of the metric. This metric_id can be found in the Lotus frontend if you haven't seen it before. */ - metric_id: string; - /** - * Format: double - * @description The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. - */ - metric_usage: number; - /** - * Format: double - * @description If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be null if you did not specify a free tier for this metric. - */ - metric_free_limit: number; - /** - * Format: double - * @description The total limit of the metric. Will be null if you did not specify a limit for this metric. - */ - metric_total_limit: number; - }; - ComponentsFixedChargeInitialValueRequest: { - /** - * Format: uuid - * @description The id of the metric that this initial value is for - */ - metric_id: string; - /** - * Format: double - * @description The number of units of the metric that this initial value is for - */ - units: number; - }; - ConfirmConnected: { - organization_id: string; - }; - ConfirmIdemsReceived: { - /** @enum {string} */ - status: "success"; - ids_not_found: string[]; - }; - ConfirmIdemsReceivedFailure: { - /** @enum {string} */ - status: "failure"; - error: string; - }; - ConfirmIdemsReceivedRequestRequest: { - idempotency_ids: string[]; - /** @default 30 */ - number_days_lookback?: number; - customer_id?: string; - }; - CostAnalysis: { - per_day: components["schemas"]["SingleDayCostAnalysis"][]; - /** Format: double */ - total_cost: number; - /** Format: double */ - total_revenue: number; - /** Format: double */ - margin: number; - }; - CreditDrawdown: { - credit_id: string; - /** Format: double */ - amount: number; - description?: string; - /** Format: date-time */ - applied_at: string; - }; - Customer: { - customer_id: string; - /** Format: email */ - email: string; - /** @description The display name of the customer */ - customer_name: string; - invoices: readonly components["schemas"]["LightweightInvoice"][]; - /** Format: double */ - total_amount_due: number; - subscriptions: readonly components["schemas"]["SubscriptionRecord"][]; - /** @description A dictionary containing the customer's integrations. Keys are the integration type, and the value is a dictionary containing the integration's properties, which can vary by integration. */ - integrations: components["schemas"]["CustomerIntegrations"]; - default_currency: components["schemas"]["PricingUnit"]; - /** @enum {string|null} */ - payment_provider: "stripe" | "braintree" | "" | null; - payment_provider_id: string; - has_payment_method: boolean; - /** @deprecated */ - address?: components["schemas"]["Address"] | null; - billing_address: components["schemas"]["Address"] | null; - shipping_address: components["schemas"]["Address"] | null; - /** - * Format: double - * @description Tax rate as percentage. For example, 10.5 for 10.5% - */ - tax_rate: number; - /** @enum {string} */ - timezone: - | "Africa/Abidjan" - | "Africa/Accra" - | "Africa/Addis_Ababa" - | "Africa/Algiers" - | "Africa/Asmara" - | "Africa/Bamako" - | "Africa/Bangui" - | "Africa/Banjul" - | "Africa/Bissau" - | "Africa/Blantyre" - | "Africa/Brazzaville" - | "Africa/Bujumbura" - | "Africa/Cairo" - | "Africa/Casablanca" - | "Africa/Ceuta" - | "Africa/Conakry" - | "Africa/Dakar" - | "Africa/Dar_es_Salaam" - | "Africa/Djibouti" - | "Africa/Douala" - | "Africa/El_Aaiun" - | "Africa/Freetown" - | "Africa/Gaborone" - | "Africa/Harare" - | "Africa/Johannesburg" - | "Africa/Juba" - | "Africa/Kampala" - | "Africa/Khartoum" - | "Africa/Kigali" - | "Africa/Kinshasa" - | "Africa/Lagos" - | "Africa/Libreville" - | "Africa/Lome" - | "Africa/Luanda" - | "Africa/Lubumbashi" - | "Africa/Lusaka" - | "Africa/Malabo" - | "Africa/Maputo" - | "Africa/Maseru" - | "Africa/Mbabane" - | "Africa/Mogadishu" - | "Africa/Monrovia" - | "Africa/Nairobi" - | "Africa/Ndjamena" - | "Africa/Niamey" - | "Africa/Nouakchott" - | "Africa/Ouagadougou" - | "Africa/Porto-Novo" - | "Africa/Sao_Tome" - | "Africa/Tripoli" - | "Africa/Tunis" - | "Africa/Windhoek" - | "America/Adak" - | "America/Anchorage" - | "America/Anguilla" - | "America/Antigua" - | "America/Araguaina" - | "America/Argentina/Buenos_Aires" - | "America/Argentina/Catamarca" - | "America/Argentina/Cordoba" - | "America/Argentina/Jujuy" - | "America/Argentina/La_Rioja" - | "America/Argentina/Mendoza" - | "America/Argentina/Rio_Gallegos" - | "America/Argentina/Salta" - | "America/Argentina/San_Juan" - | "America/Argentina/San_Luis" - | "America/Argentina/Tucuman" - | "America/Argentina/Ushuaia" - | "America/Aruba" - | "America/Asuncion" - | "America/Atikokan" - | "America/Bahia" - | "America/Bahia_Banderas" - | "America/Barbados" - | "America/Belem" - | "America/Belize" - | "America/Blanc-Sablon" - | "America/Boa_Vista" - | "America/Bogota" - | "America/Boise" - | "America/Cambridge_Bay" - | "America/Campo_Grande" - | "America/Cancun" - | "America/Caracas" - | "America/Cayenne" - | "America/Cayman" - | "America/Chicago" - | "America/Chihuahua" - | "America/Ciudad_Juarez" - | "America/Costa_Rica" - | "America/Creston" - | "America/Cuiaba" - | "America/Curacao" - | "America/Danmarkshavn" - | "America/Dawson" - | "America/Dawson_Creek" - | "America/Denver" - | "America/Detroit" - | "America/Dominica" - | "America/Edmonton" - | "America/Eirunepe" - | "America/El_Salvador" - | "America/Fort_Nelson" - | "America/Fortaleza" - | "America/Glace_Bay" - | "America/Goose_Bay" - | "America/Grand_Turk" - | "America/Grenada" - | "America/Guadeloupe" - | "America/Guatemala" - | "America/Guayaquil" - | "America/Guyana" - | "America/Halifax" - | "America/Havana" - | "America/Hermosillo" - | "America/Indiana/Indianapolis" - | "America/Indiana/Knox" - | "America/Indiana/Marengo" - | "America/Indiana/Petersburg" - | "America/Indiana/Tell_City" - | "America/Indiana/Vevay" - | "America/Indiana/Vincennes" - | "America/Indiana/Winamac" - | "America/Inuvik" - | "America/Iqaluit" - | "America/Jamaica" - | "America/Juneau" - | "America/Kentucky/Louisville" - | "America/Kentucky/Monticello" - | "America/Kralendijk" - | "America/La_Paz" - | "America/Lima" - | "America/Los_Angeles" - | "America/Lower_Princes" - | "America/Maceio" - | "America/Managua" - | "America/Manaus" - | "America/Marigot" - | "America/Martinique" - | "America/Matamoros" - | "America/Mazatlan" - | "America/Menominee" - | "America/Merida" - | "America/Metlakatla" - | "America/Mexico_City" - | "America/Miquelon" - | "America/Moncton" - | "America/Monterrey" - | "America/Montevideo" - | "America/Montserrat" - | "America/Nassau" - | "America/New_York" - | "America/Nome" - | "America/Noronha" - | "America/North_Dakota/Beulah" - | "America/North_Dakota/Center" - | "America/North_Dakota/New_Salem" - | "America/Nuuk" - | "America/Ojinaga" - | "America/Panama" - | "America/Paramaribo" - | "America/Phoenix" - | "America/Port-au-Prince" - | "America/Port_of_Spain" - | "America/Porto_Velho" - | "America/Puerto_Rico" - | "America/Punta_Arenas" - | "America/Rankin_Inlet" - | "America/Recife" - | "America/Regina" - | "America/Resolute" - | "America/Rio_Branco" - | "America/Santarem" - | "America/Santiago" - | "America/Santo_Domingo" - | "America/Sao_Paulo" - | "America/Scoresbysund" - | "America/Sitka" - | "America/St_Barthelemy" - | "America/St_Johns" - | "America/St_Kitts" - | "America/St_Lucia" - | "America/St_Thomas" - | "America/St_Vincent" - | "America/Swift_Current" - | "America/Tegucigalpa" - | "America/Thule" - | "America/Tijuana" - | "America/Toronto" - | "America/Tortola" - | "America/Vancouver" - | "America/Whitehorse" - | "America/Winnipeg" - | "America/Yakutat" - | "America/Yellowknife" - | "Antarctica/Casey" - | "Antarctica/Davis" - | "Antarctica/DumontDUrville" - | "Antarctica/Macquarie" - | "Antarctica/Mawson" - | "Antarctica/McMurdo" - | "Antarctica/Palmer" - | "Antarctica/Rothera" - | "Antarctica/Syowa" - | "Antarctica/Troll" - | "Antarctica/Vostok" - | "Arctic/Longyearbyen" - | "Asia/Aden" - | "Asia/Almaty" - | "Asia/Amman" - | "Asia/Anadyr" - | "Asia/Aqtau" - | "Asia/Aqtobe" - | "Asia/Ashgabat" - | "Asia/Atyrau" - | "Asia/Baghdad" - | "Asia/Bahrain" - | "Asia/Baku" - | "Asia/Bangkok" - | "Asia/Barnaul" - | "Asia/Beirut" - | "Asia/Bishkek" - | "Asia/Brunei" - | "Asia/Chita" - | "Asia/Choibalsan" - | "Asia/Colombo" - | "Asia/Damascus" - | "Asia/Dhaka" - | "Asia/Dili" - | "Asia/Dubai" - | "Asia/Dushanbe" - | "Asia/Famagusta" - | "Asia/Gaza" - | "Asia/Hebron" - | "Asia/Ho_Chi_Minh" - | "Asia/Hong_Kong" - | "Asia/Hovd" - | "Asia/Irkutsk" - | "Asia/Jakarta" - | "Asia/Jayapura" - | "Asia/Jerusalem" - | "Asia/Kabul" - | "Asia/Kamchatka" - | "Asia/Karachi" - | "Asia/Kathmandu" - | "Asia/Khandyga" - | "Asia/Kolkata" - | "Asia/Krasnoyarsk" - | "Asia/Kuala_Lumpur" - | "Asia/Kuching" - | "Asia/Kuwait" - | "Asia/Macau" - | "Asia/Magadan" - | "Asia/Makassar" - | "Asia/Manila" - | "Asia/Muscat" - | "Asia/Nicosia" - | "Asia/Novokuznetsk" - | "Asia/Novosibirsk" - | "Asia/Omsk" - | "Asia/Oral" - | "Asia/Phnom_Penh" - | "Asia/Pontianak" - | "Asia/Pyongyang" - | "Asia/Qatar" - | "Asia/Qostanay" - | "Asia/Qyzylorda" - | "Asia/Riyadh" - | "Asia/Sakhalin" - | "Asia/Samarkand" - | "Asia/Seoul" - | "Asia/Shanghai" - | "Asia/Singapore" - | "Asia/Srednekolymsk" - | "Asia/Taipei" - | "Asia/Tashkent" - | "Asia/Tbilisi" - | "Asia/Tehran" - | "Asia/Thimphu" - | "Asia/Tokyo" - | "Asia/Tomsk" - | "Asia/Ulaanbaatar" - | "Asia/Urumqi" - | "Asia/Ust-Nera" - | "Asia/Vientiane" - | "Asia/Vladivostok" - | "Asia/Yakutsk" - | "Asia/Yangon" - | "Asia/Yekaterinburg" - | "Asia/Yerevan" - | "Atlantic/Azores" - | "Atlantic/Bermuda" - | "Atlantic/Canary" - | "Atlantic/Cape_Verde" - | "Atlantic/Faroe" - | "Atlantic/Madeira" - | "Atlantic/Reykjavik" - | "Atlantic/South_Georgia" - | "Atlantic/St_Helena" - | "Atlantic/Stanley" - | "Australia/Adelaide" - | "Australia/Brisbane" - | "Australia/Broken_Hill" - | "Australia/Darwin" - | "Australia/Eucla" - | "Australia/Hobart" - | "Australia/Lindeman" - | "Australia/Lord_Howe" - | "Australia/Melbourne" - | "Australia/Perth" - | "Australia/Sydney" - | "Canada/Atlantic" - | "Canada/Central" - | "Canada/Eastern" - | "Canada/Mountain" - | "Canada/Newfoundland" - | "Canada/Pacific" - | "Europe/Amsterdam" - | "Europe/Andorra" - | "Europe/Astrakhan" - | "Europe/Athens" - | "Europe/Belgrade" - | "Europe/Berlin" - | "Europe/Bratislava" - | "Europe/Brussels" - | "Europe/Bucharest" - | "Europe/Budapest" - | "Europe/Busingen" - | "Europe/Chisinau" - | "Europe/Copenhagen" - | "Europe/Dublin" - | "Europe/Gibraltar" - | "Europe/Guernsey" - | "Europe/Helsinki" - | "Europe/Isle_of_Man" - | "Europe/Istanbul" - | "Europe/Jersey" - | "Europe/Kaliningrad" - | "Europe/Kirov" - | "Europe/Kyiv" - | "Europe/Lisbon" - | "Europe/Ljubljana" - | "Europe/London" - | "Europe/Luxembourg" - | "Europe/Madrid" - | "Europe/Malta" - | "Europe/Mariehamn" - | "Europe/Minsk" - | "Europe/Monaco" - | "Europe/Moscow" - | "Europe/Oslo" - | "Europe/Paris" - | "Europe/Podgorica" - | "Europe/Prague" - | "Europe/Riga" - | "Europe/Rome" - | "Europe/Samara" - | "Europe/San_Marino" - | "Europe/Sarajevo" - | "Europe/Saratov" - | "Europe/Simferopol" - | "Europe/Skopje" - | "Europe/Sofia" - | "Europe/Stockholm" - | "Europe/Tallinn" - | "Europe/Tirane" - | "Europe/Ulyanovsk" - | "Europe/Vaduz" - | "Europe/Vatican" - | "Europe/Vienna" - | "Europe/Vilnius" - | "Europe/Volgograd" - | "Europe/Warsaw" - | "Europe/Zagreb" - | "Europe/Zurich" - | "GMT" - | "Indian/Antananarivo" - | "Indian/Chagos" - | "Indian/Christmas" - | "Indian/Cocos" - | "Indian/Comoro" - | "Indian/Kerguelen" - | "Indian/Mahe" - | "Indian/Maldives" - | "Indian/Mauritius" - | "Indian/Mayotte" - | "Indian/Reunion" - | "Pacific/Apia" - | "Pacific/Auckland" - | "Pacific/Bougainville" - | "Pacific/Chatham" - | "Pacific/Chuuk" - | "Pacific/Easter" - | "Pacific/Efate" - | "Pacific/Fakaofo" - | "Pacific/Fiji" - | "Pacific/Funafuti" - | "Pacific/Galapagos" - | "Pacific/Gambier" - | "Pacific/Guadalcanal" - | "Pacific/Guam" - | "Pacific/Honolulu" - | "Pacific/Kanton" - | "Pacific/Kiritimati" - | "Pacific/Kosrae" - | "Pacific/Kwajalein" - | "Pacific/Majuro" - | "Pacific/Marquesas" - | "Pacific/Midway" - | "Pacific/Nauru" - | "Pacific/Niue" - | "Pacific/Norfolk" - | "Pacific/Noumea" - | "Pacific/Pago_Pago" - | "Pacific/Palau" - | "Pacific/Pitcairn" - | "Pacific/Pohnpei" - | "Pacific/Port_Moresby" - | "Pacific/Rarotonga" - | "Pacific/Saipan" - | "Pacific/Tahiti" - | "Pacific/Tarawa" - | "Pacific/Tongatapu" - | "Pacific/Wake" - | "Pacific/Wallis" - | "US/Alaska" - | "US/Arizona" - | "US/Central" - | "US/Eastern" - | "US/Hawaii" - | "US/Mountain" - | "US/Pacific" - | "UTC"; - tax_providers: readonly ("taxjar" | "lotus")[]; - }; - CustomerBalanceAdjustment: { - credit_id: string; - customer: components["schemas"]["LightweightCustomer"]; - /** Format: double */ - amount: number; - /** Format: double */ - amount_remaining: number; - currency: components["schemas"]["PricingUnit"]; - description: string; - /** Format: date-time */ - effective_at: string; - /** Format: date-time */ - expires_at: string; - /** @enum {string} */ - status: "active" | "inactive"; - /** Format: double */ - amount_paid: number; - amount_paid_currency: components["schemas"]["PricingUnit"] | null; - drawdowns: readonly components["schemas"]["CreditDrawdown"][]; - }; - CustomerBalanceAdjustmentCreateRequest: { - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - customer_id: string; - /** Format: double */ - amount: number; - currency_code: string; - description?: string; - /** Format: date-time */ - effective_at?: string; - /** Format: date-time */ - expires_at?: string; - /** Format: double */ - amount_paid?: number; - amount_paid_currency_code?: string; - }; - CustomerBalanceAdjustmentUpdateRequest: { - description?: string; - /** Format: date-time */ - expires_at?: string; - }; - CustomerBraintreeIntegration: { - braintree_id: string; - has_payment_method: boolean; - }; - CustomerCreateRequest: { - /** @description The display name of the customer */ - customer_name?: string; - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - customer_id: string; - /** - * Format: email - * @description The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider - */ - email: string; - /** - * @description The payment provider this customer is associated with. Currently, only Stripe is supported. - * @enum {string} - */ - payment_provider?: "stripe" | "braintree"; - /** @description The customer's ID in the specified payment provider. Please note that payment_provider and payment_provider_id are mutually necessary. */ - payment_provider_id?: string; - /** @description Extra metadata for the customer */ - properties?: { - [key: string]: Record | undefined; - } | null; - /** @description The currency code this customer will be invoiced in. Codes are 3 letters, e.g. 'USD'. */ - default_currency_code?: string; - /** @deprecated */ - address?: components["schemas"]["AddressRequest"] | null; - billing_address?: components["schemas"]["AddressRequest"] | null; - shipping_address?: components["schemas"]["AddressRequest"] | null; - /** - * Format: double - * @description Tax rate as percentage. For example, 10.5 for 10.5% - */ - tax_rate?: number; - }; - CustomerCreatedRequest: { - payload: components["schemas"]["CustomerRequest"]; - }; - CustomerDeleteResponse: { - customer_id: string; - /** Format: date-time */ - deleted: string; - /** Format: email */ - email: string; - num_subscriptions_deleted: number; - num_addons_deleted: number; - }; - CustomerIntegrations: { - stripe?: components["schemas"]["CustomerStripeIntegration"] | null; - braintree?: components["schemas"]["CustomerBraintreeIntegration"] | null; - }; - CustomerRequest: { - customer_id: string; - /** Format: email */ - email: string; - default_currency: components["schemas"]["PricingUnitRequest"]; - /** @enum {string|null} */ - payment_provider: "stripe" | "braintree" | "" | null; - /** @enum {string} */ - timezone: - | "Africa/Abidjan" - | "Africa/Accra" - | "Africa/Addis_Ababa" - | "Africa/Algiers" - | "Africa/Asmara" - | "Africa/Bamako" - | "Africa/Bangui" - | "Africa/Banjul" - | "Africa/Bissau" - | "Africa/Blantyre" - | "Africa/Brazzaville" - | "Africa/Bujumbura" - | "Africa/Cairo" - | "Africa/Casablanca" - | "Africa/Ceuta" - | "Africa/Conakry" - | "Africa/Dakar" - | "Africa/Dar_es_Salaam" - | "Africa/Djibouti" - | "Africa/Douala" - | "Africa/El_Aaiun" - | "Africa/Freetown" - | "Africa/Gaborone" - | "Africa/Harare" - | "Africa/Johannesburg" - | "Africa/Juba" - | "Africa/Kampala" - | "Africa/Khartoum" - | "Africa/Kigali" - | "Africa/Kinshasa" - | "Africa/Lagos" - | "Africa/Libreville" - | "Africa/Lome" - | "Africa/Luanda" - | "Africa/Lubumbashi" - | "Africa/Lusaka" - | "Africa/Malabo" - | "Africa/Maputo" - | "Africa/Maseru" - | "Africa/Mbabane" - | "Africa/Mogadishu" - | "Africa/Monrovia" - | "Africa/Nairobi" - | "Africa/Ndjamena" - | "Africa/Niamey" - | "Africa/Nouakchott" - | "Africa/Ouagadougou" - | "Africa/Porto-Novo" - | "Africa/Sao_Tome" - | "Africa/Tripoli" - | "Africa/Tunis" - | "Africa/Windhoek" - | "America/Adak" - | "America/Anchorage" - | "America/Anguilla" - | "America/Antigua" - | "America/Araguaina" - | "America/Argentina/Buenos_Aires" - | "America/Argentina/Catamarca" - | "America/Argentina/Cordoba" - | "America/Argentina/Jujuy" - | "America/Argentina/La_Rioja" - | "America/Argentina/Mendoza" - | "America/Argentina/Rio_Gallegos" - | "America/Argentina/Salta" - | "America/Argentina/San_Juan" - | "America/Argentina/San_Luis" - | "America/Argentina/Tucuman" - | "America/Argentina/Ushuaia" - | "America/Aruba" - | "America/Asuncion" - | "America/Atikokan" - | "America/Bahia" - | "America/Bahia_Banderas" - | "America/Barbados" - | "America/Belem" - | "America/Belize" - | "America/Blanc-Sablon" - | "America/Boa_Vista" - | "America/Bogota" - | "America/Boise" - | "America/Cambridge_Bay" - | "America/Campo_Grande" - | "America/Cancun" - | "America/Caracas" - | "America/Cayenne" - | "America/Cayman" - | "America/Chicago" - | "America/Chihuahua" - | "America/Ciudad_Juarez" - | "America/Costa_Rica" - | "America/Creston" - | "America/Cuiaba" - | "America/Curacao" - | "America/Danmarkshavn" - | "America/Dawson" - | "America/Dawson_Creek" - | "America/Denver" - | "America/Detroit" - | "America/Dominica" - | "America/Edmonton" - | "America/Eirunepe" - | "America/El_Salvador" - | "America/Fort_Nelson" - | "America/Fortaleza" - | "America/Glace_Bay" - | "America/Goose_Bay" - | "America/Grand_Turk" - | "America/Grenada" - | "America/Guadeloupe" - | "America/Guatemala" - | "America/Guayaquil" - | "America/Guyana" - | "America/Halifax" - | "America/Havana" - | "America/Hermosillo" - | "America/Indiana/Indianapolis" - | "America/Indiana/Knox" - | "America/Indiana/Marengo" - | "America/Indiana/Petersburg" - | "America/Indiana/Tell_City" - | "America/Indiana/Vevay" - | "America/Indiana/Vincennes" - | "America/Indiana/Winamac" - | "America/Inuvik" - | "America/Iqaluit" - | "America/Jamaica" - | "America/Juneau" - | "America/Kentucky/Louisville" - | "America/Kentucky/Monticello" - | "America/Kralendijk" - | "America/La_Paz" - | "America/Lima" - | "America/Los_Angeles" - | "America/Lower_Princes" - | "America/Maceio" - | "America/Managua" - | "America/Manaus" - | "America/Marigot" - | "America/Martinique" - | "America/Matamoros" - | "America/Mazatlan" - | "America/Menominee" - | "America/Merida" - | "America/Metlakatla" - | "America/Mexico_City" - | "America/Miquelon" - | "America/Moncton" - | "America/Monterrey" - | "America/Montevideo" - | "America/Montserrat" - | "America/Nassau" - | "America/New_York" - | "America/Nome" - | "America/Noronha" - | "America/North_Dakota/Beulah" - | "America/North_Dakota/Center" - | "America/North_Dakota/New_Salem" - | "America/Nuuk" - | "America/Ojinaga" - | "America/Panama" - | "America/Paramaribo" - | "America/Phoenix" - | "America/Port-au-Prince" - | "America/Port_of_Spain" - | "America/Porto_Velho" - | "America/Puerto_Rico" - | "America/Punta_Arenas" - | "America/Rankin_Inlet" - | "America/Recife" - | "America/Regina" - | "America/Resolute" - | "America/Rio_Branco" - | "America/Santarem" - | "America/Santiago" - | "America/Santo_Domingo" - | "America/Sao_Paulo" - | "America/Scoresbysund" - | "America/Sitka" - | "America/St_Barthelemy" - | "America/St_Johns" - | "America/St_Kitts" - | "America/St_Lucia" - | "America/St_Thomas" - | "America/St_Vincent" - | "America/Swift_Current" - | "America/Tegucigalpa" - | "America/Thule" - | "America/Tijuana" - | "America/Toronto" - | "America/Tortola" - | "America/Vancouver" - | "America/Whitehorse" - | "America/Winnipeg" - | "America/Yakutat" - | "America/Yellowknife" - | "Antarctica/Casey" - | "Antarctica/Davis" - | "Antarctica/DumontDUrville" - | "Antarctica/Macquarie" - | "Antarctica/Mawson" - | "Antarctica/McMurdo" - | "Antarctica/Palmer" - | "Antarctica/Rothera" - | "Antarctica/Syowa" - | "Antarctica/Troll" - | "Antarctica/Vostok" - | "Arctic/Longyearbyen" - | "Asia/Aden" - | "Asia/Almaty" - | "Asia/Amman" - | "Asia/Anadyr" - | "Asia/Aqtau" - | "Asia/Aqtobe" - | "Asia/Ashgabat" - | "Asia/Atyrau" - | "Asia/Baghdad" - | "Asia/Bahrain" - | "Asia/Baku" - | "Asia/Bangkok" - | "Asia/Barnaul" - | "Asia/Beirut" - | "Asia/Bishkek" - | "Asia/Brunei" - | "Asia/Chita" - | "Asia/Choibalsan" - | "Asia/Colombo" - | "Asia/Damascus" - | "Asia/Dhaka" - | "Asia/Dili" - | "Asia/Dubai" - | "Asia/Dushanbe" - | "Asia/Famagusta" - | "Asia/Gaza" - | "Asia/Hebron" - | "Asia/Ho_Chi_Minh" - | "Asia/Hong_Kong" - | "Asia/Hovd" - | "Asia/Irkutsk" - | "Asia/Jakarta" - | "Asia/Jayapura" - | "Asia/Jerusalem" - | "Asia/Kabul" - | "Asia/Kamchatka" - | "Asia/Karachi" - | "Asia/Kathmandu" - | "Asia/Khandyga" - | "Asia/Kolkata" - | "Asia/Krasnoyarsk" - | "Asia/Kuala_Lumpur" - | "Asia/Kuching" - | "Asia/Kuwait" - | "Asia/Macau" - | "Asia/Magadan" - | "Asia/Makassar" - | "Asia/Manila" - | "Asia/Muscat" - | "Asia/Nicosia" - | "Asia/Novokuznetsk" - | "Asia/Novosibirsk" - | "Asia/Omsk" - | "Asia/Oral" - | "Asia/Phnom_Penh" - | "Asia/Pontianak" - | "Asia/Pyongyang" - | "Asia/Qatar" - | "Asia/Qostanay" - | "Asia/Qyzylorda" - | "Asia/Riyadh" - | "Asia/Sakhalin" - | "Asia/Samarkand" - | "Asia/Seoul" - | "Asia/Shanghai" - | "Asia/Singapore" - | "Asia/Srednekolymsk" - | "Asia/Taipei" - | "Asia/Tashkent" - | "Asia/Tbilisi" - | "Asia/Tehran" - | "Asia/Thimphu" - | "Asia/Tokyo" - | "Asia/Tomsk" - | "Asia/Ulaanbaatar" - | "Asia/Urumqi" - | "Asia/Ust-Nera" - | "Asia/Vientiane" - | "Asia/Vladivostok" - | "Asia/Yakutsk" - | "Asia/Yangon" - | "Asia/Yekaterinburg" - | "Asia/Yerevan" - | "Atlantic/Azores" - | "Atlantic/Bermuda" - | "Atlantic/Canary" - | "Atlantic/Cape_Verde" - | "Atlantic/Faroe" - | "Atlantic/Madeira" - | "Atlantic/Reykjavik" - | "Atlantic/South_Georgia" - | "Atlantic/St_Helena" - | "Atlantic/Stanley" - | "Australia/Adelaide" - | "Australia/Brisbane" - | "Australia/Broken_Hill" - | "Australia/Darwin" - | "Australia/Eucla" - | "Australia/Hobart" - | "Australia/Lindeman" - | "Australia/Lord_Howe" - | "Australia/Melbourne" - | "Australia/Perth" - | "Australia/Sydney" - | "Canada/Atlantic" - | "Canada/Central" - | "Canada/Eastern" - | "Canada/Mountain" - | "Canada/Newfoundland" - | "Canada/Pacific" - | "Europe/Amsterdam" - | "Europe/Andorra" - | "Europe/Astrakhan" - | "Europe/Athens" - | "Europe/Belgrade" - | "Europe/Berlin" - | "Europe/Bratislava" - | "Europe/Brussels" - | "Europe/Bucharest" - | "Europe/Budapest" - | "Europe/Busingen" - | "Europe/Chisinau" - | "Europe/Copenhagen" - | "Europe/Dublin" - | "Europe/Gibraltar" - | "Europe/Guernsey" - | "Europe/Helsinki" - | "Europe/Isle_of_Man" - | "Europe/Istanbul" - | "Europe/Jersey" - | "Europe/Kaliningrad" - | "Europe/Kirov" - | "Europe/Kyiv" - | "Europe/Lisbon" - | "Europe/Ljubljana" - | "Europe/London" - | "Europe/Luxembourg" - | "Europe/Madrid" - | "Europe/Malta" - | "Europe/Mariehamn" - | "Europe/Minsk" - | "Europe/Monaco" - | "Europe/Moscow" - | "Europe/Oslo" - | "Europe/Paris" - | "Europe/Podgorica" - | "Europe/Prague" - | "Europe/Riga" - | "Europe/Rome" - | "Europe/Samara" - | "Europe/San_Marino" - | "Europe/Sarajevo" - | "Europe/Saratov" - | "Europe/Simferopol" - | "Europe/Skopje" - | "Europe/Sofia" - | "Europe/Stockholm" - | "Europe/Tallinn" - | "Europe/Tirane" - | "Europe/Ulyanovsk" - | "Europe/Vaduz" - | "Europe/Vatican" - | "Europe/Vienna" - | "Europe/Vilnius" - | "Europe/Volgograd" - | "Europe/Warsaw" - | "Europe/Zagreb" - | "Europe/Zurich" - | "GMT" - | "Indian/Antananarivo" - | "Indian/Chagos" - | "Indian/Christmas" - | "Indian/Cocos" - | "Indian/Comoro" - | "Indian/Kerguelen" - | "Indian/Mahe" - | "Indian/Maldives" - | "Indian/Mauritius" - | "Indian/Mayotte" - | "Indian/Reunion" - | "Pacific/Apia" - | "Pacific/Auckland" - | "Pacific/Bougainville" - | "Pacific/Chatham" - | "Pacific/Chuuk" - | "Pacific/Easter" - | "Pacific/Efate" - | "Pacific/Fakaofo" - | "Pacific/Fiji" - | "Pacific/Funafuti" - | "Pacific/Galapagos" - | "Pacific/Gambier" - | "Pacific/Guadalcanal" - | "Pacific/Guam" - | "Pacific/Honolulu" - | "Pacific/Kanton" - | "Pacific/Kiritimati" - | "Pacific/Kosrae" - | "Pacific/Kwajalein" - | "Pacific/Majuro" - | "Pacific/Marquesas" - | "Pacific/Midway" - | "Pacific/Nauru" - | "Pacific/Niue" - | "Pacific/Norfolk" - | "Pacific/Noumea" - | "Pacific/Pago_Pago" - | "Pacific/Palau" - | "Pacific/Pitcairn" - | "Pacific/Pohnpei" - | "Pacific/Port_Moresby" - | "Pacific/Rarotonga" - | "Pacific/Saipan" - | "Pacific/Tahiti" - | "Pacific/Tarawa" - | "Pacific/Tongatapu" - | "Pacific/Wake" - | "Pacific/Wallis" - | "US/Alaska" - | "US/Arizona" - | "US/Central" - | "US/Eastern" - | "US/Hawaii" - | "US/Mountain" - | "US/Pacific" - | "UTC"; - }; - CustomerStripeIntegration: { - stripe_id: string; - has_payment_method: boolean; - }; - CustomerSummary: { - /** @description The display name of the customer */ - customer_name?: string; - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - customer_id?: string; - subscriptions: readonly components["schemas"]["SubscriptionCustomerSummary"][]; - }; - CustomerUpdate: { - default_currency_code: string; - billing_address?: components["schemas"]["Address"] | null; - shipping_address?: components["schemas"]["Address"] | null; - /** - * Format: double - * @description Tax rate as percentage. For example, 10.5 for 10.5% - */ - tax_rate?: number; - /** @enum {string} */ - timezone: - | "Africa/Abidjan" - | "Africa/Accra" - | "Africa/Addis_Ababa" - | "Africa/Algiers" - | "Africa/Asmara" - | "Africa/Bamako" - | "Africa/Bangui" - | "Africa/Banjul" - | "Africa/Bissau" - | "Africa/Blantyre" - | "Africa/Brazzaville" - | "Africa/Bujumbura" - | "Africa/Cairo" - | "Africa/Casablanca" - | "Africa/Ceuta" - | "Africa/Conakry" - | "Africa/Dakar" - | "Africa/Dar_es_Salaam" - | "Africa/Djibouti" - | "Africa/Douala" - | "Africa/El_Aaiun" - | "Africa/Freetown" - | "Africa/Gaborone" - | "Africa/Harare" - | "Africa/Johannesburg" - | "Africa/Juba" - | "Africa/Kampala" - | "Africa/Khartoum" - | "Africa/Kigali" - | "Africa/Kinshasa" - | "Africa/Lagos" - | "Africa/Libreville" - | "Africa/Lome" - | "Africa/Luanda" - | "Africa/Lubumbashi" - | "Africa/Lusaka" - | "Africa/Malabo" - | "Africa/Maputo" - | "Africa/Maseru" - | "Africa/Mbabane" - | "Africa/Mogadishu" - | "Africa/Monrovia" - | "Africa/Nairobi" - | "Africa/Ndjamena" - | "Africa/Niamey" - | "Africa/Nouakchott" - | "Africa/Ouagadougou" - | "Africa/Porto-Novo" - | "Africa/Sao_Tome" - | "Africa/Tripoli" - | "Africa/Tunis" - | "Africa/Windhoek" - | "America/Adak" - | "America/Anchorage" - | "America/Anguilla" - | "America/Antigua" - | "America/Araguaina" - | "America/Argentina/Buenos_Aires" - | "America/Argentina/Catamarca" - | "America/Argentina/Cordoba" - | "America/Argentina/Jujuy" - | "America/Argentina/La_Rioja" - | "America/Argentina/Mendoza" - | "America/Argentina/Rio_Gallegos" - | "America/Argentina/Salta" - | "America/Argentina/San_Juan" - | "America/Argentina/San_Luis" - | "America/Argentina/Tucuman" - | "America/Argentina/Ushuaia" - | "America/Aruba" - | "America/Asuncion" - | "America/Atikokan" - | "America/Bahia" - | "America/Bahia_Banderas" - | "America/Barbados" - | "America/Belem" - | "America/Belize" - | "America/Blanc-Sablon" - | "America/Boa_Vista" - | "America/Bogota" - | "America/Boise" - | "America/Cambridge_Bay" - | "America/Campo_Grande" - | "America/Cancun" - | "America/Caracas" - | "America/Cayenne" - | "America/Cayman" - | "America/Chicago" - | "America/Chihuahua" - | "America/Ciudad_Juarez" - | "America/Costa_Rica" - | "America/Creston" - | "America/Cuiaba" - | "America/Curacao" - | "America/Danmarkshavn" - | "America/Dawson" - | "America/Dawson_Creek" - | "America/Denver" - | "America/Detroit" - | "America/Dominica" - | "America/Edmonton" - | "America/Eirunepe" - | "America/El_Salvador" - | "America/Fort_Nelson" - | "America/Fortaleza" - | "America/Glace_Bay" - | "America/Goose_Bay" - | "America/Grand_Turk" - | "America/Grenada" - | "America/Guadeloupe" - | "America/Guatemala" - | "America/Guayaquil" - | "America/Guyana" - | "America/Halifax" - | "America/Havana" - | "America/Hermosillo" - | "America/Indiana/Indianapolis" - | "America/Indiana/Knox" - | "America/Indiana/Marengo" - | "America/Indiana/Petersburg" - | "America/Indiana/Tell_City" - | "America/Indiana/Vevay" - | "America/Indiana/Vincennes" - | "America/Indiana/Winamac" - | "America/Inuvik" - | "America/Iqaluit" - | "America/Jamaica" - | "America/Juneau" - | "America/Kentucky/Louisville" - | "America/Kentucky/Monticello" - | "America/Kralendijk" - | "America/La_Paz" - | "America/Lima" - | "America/Los_Angeles" - | "America/Lower_Princes" - | "America/Maceio" - | "America/Managua" - | "America/Manaus" - | "America/Marigot" - | "America/Martinique" - | "America/Matamoros" - | "America/Mazatlan" - | "America/Menominee" - | "America/Merida" - | "America/Metlakatla" - | "America/Mexico_City" - | "America/Miquelon" - | "America/Moncton" - | "America/Monterrey" - | "America/Montevideo" - | "America/Montserrat" - | "America/Nassau" - | "America/New_York" - | "America/Nome" - | "America/Noronha" - | "America/North_Dakota/Beulah" - | "America/North_Dakota/Center" - | "America/North_Dakota/New_Salem" - | "America/Nuuk" - | "America/Ojinaga" - | "America/Panama" - | "America/Paramaribo" - | "America/Phoenix" - | "America/Port-au-Prince" - | "America/Port_of_Spain" - | "America/Porto_Velho" - | "America/Puerto_Rico" - | "America/Punta_Arenas" - | "America/Rankin_Inlet" - | "America/Recife" - | "America/Regina" - | "America/Resolute" - | "America/Rio_Branco" - | "America/Santarem" - | "America/Santiago" - | "America/Santo_Domingo" - | "America/Sao_Paulo" - | "America/Scoresbysund" - | "America/Sitka" - | "America/St_Barthelemy" - | "America/St_Johns" - | "America/St_Kitts" - | "America/St_Lucia" - | "America/St_Thomas" - | "America/St_Vincent" - | "America/Swift_Current" - | "America/Tegucigalpa" - | "America/Thule" - | "America/Tijuana" - | "America/Toronto" - | "America/Tortola" - | "America/Vancouver" - | "America/Whitehorse" - | "America/Winnipeg" - | "America/Yakutat" - | "America/Yellowknife" - | "Antarctica/Casey" - | "Antarctica/Davis" - | "Antarctica/DumontDUrville" - | "Antarctica/Macquarie" - | "Antarctica/Mawson" - | "Antarctica/McMurdo" - | "Antarctica/Palmer" - | "Antarctica/Rothera" - | "Antarctica/Syowa" - | "Antarctica/Troll" - | "Antarctica/Vostok" - | "Arctic/Longyearbyen" - | "Asia/Aden" - | "Asia/Almaty" - | "Asia/Amman" - | "Asia/Anadyr" - | "Asia/Aqtau" - | "Asia/Aqtobe" - | "Asia/Ashgabat" - | "Asia/Atyrau" - | "Asia/Baghdad" - | "Asia/Bahrain" - | "Asia/Baku" - | "Asia/Bangkok" - | "Asia/Barnaul" - | "Asia/Beirut" - | "Asia/Bishkek" - | "Asia/Brunei" - | "Asia/Chita" - | "Asia/Choibalsan" - | "Asia/Colombo" - | "Asia/Damascus" - | "Asia/Dhaka" - | "Asia/Dili" - | "Asia/Dubai" - | "Asia/Dushanbe" - | "Asia/Famagusta" - | "Asia/Gaza" - | "Asia/Hebron" - | "Asia/Ho_Chi_Minh" - | "Asia/Hong_Kong" - | "Asia/Hovd" - | "Asia/Irkutsk" - | "Asia/Jakarta" - | "Asia/Jayapura" - | "Asia/Jerusalem" - | "Asia/Kabul" - | "Asia/Kamchatka" - | "Asia/Karachi" - | "Asia/Kathmandu" - | "Asia/Khandyga" - | "Asia/Kolkata" - | "Asia/Krasnoyarsk" - | "Asia/Kuala_Lumpur" - | "Asia/Kuching" - | "Asia/Kuwait" - | "Asia/Macau" - | "Asia/Magadan" - | "Asia/Makassar" - | "Asia/Manila" - | "Asia/Muscat" - | "Asia/Nicosia" - | "Asia/Novokuznetsk" - | "Asia/Novosibirsk" - | "Asia/Omsk" - | "Asia/Oral" - | "Asia/Phnom_Penh" - | "Asia/Pontianak" - | "Asia/Pyongyang" - | "Asia/Qatar" - | "Asia/Qostanay" - | "Asia/Qyzylorda" - | "Asia/Riyadh" - | "Asia/Sakhalin" - | "Asia/Samarkand" - | "Asia/Seoul" - | "Asia/Shanghai" - | "Asia/Singapore" - | "Asia/Srednekolymsk" - | "Asia/Taipei" - | "Asia/Tashkent" - | "Asia/Tbilisi" - | "Asia/Tehran" - | "Asia/Thimphu" - | "Asia/Tokyo" - | "Asia/Tomsk" - | "Asia/Ulaanbaatar" - | "Asia/Urumqi" - | "Asia/Ust-Nera" - | "Asia/Vientiane" - | "Asia/Vladivostok" - | "Asia/Yakutsk" - | "Asia/Yangon" - | "Asia/Yekaterinburg" - | "Asia/Yerevan" - | "Atlantic/Azores" - | "Atlantic/Bermuda" - | "Atlantic/Canary" - | "Atlantic/Cape_Verde" - | "Atlantic/Faroe" - | "Atlantic/Madeira" - | "Atlantic/Reykjavik" - | "Atlantic/South_Georgia" - | "Atlantic/St_Helena" - | "Atlantic/Stanley" - | "Australia/Adelaide" - | "Australia/Brisbane" - | "Australia/Broken_Hill" - | "Australia/Darwin" - | "Australia/Eucla" - | "Australia/Hobart" - | "Australia/Lindeman" - | "Australia/Lord_Howe" - | "Australia/Melbourne" - | "Australia/Perth" - | "Australia/Sydney" - | "Canada/Atlantic" - | "Canada/Central" - | "Canada/Eastern" - | "Canada/Mountain" - | "Canada/Newfoundland" - | "Canada/Pacific" - | "Europe/Amsterdam" - | "Europe/Andorra" - | "Europe/Astrakhan" - | "Europe/Athens" - | "Europe/Belgrade" - | "Europe/Berlin" - | "Europe/Bratislava" - | "Europe/Brussels" - | "Europe/Bucharest" - | "Europe/Budapest" - | "Europe/Busingen" - | "Europe/Chisinau" - | "Europe/Copenhagen" - | "Europe/Dublin" - | "Europe/Gibraltar" - | "Europe/Guernsey" - | "Europe/Helsinki" - | "Europe/Isle_of_Man" - | "Europe/Istanbul" - | "Europe/Jersey" - | "Europe/Kaliningrad" - | "Europe/Kirov" - | "Europe/Kyiv" - | "Europe/Lisbon" - | "Europe/Ljubljana" - | "Europe/London" - | "Europe/Luxembourg" - | "Europe/Madrid" - | "Europe/Malta" - | "Europe/Mariehamn" - | "Europe/Minsk" - | "Europe/Monaco" - | "Europe/Moscow" - | "Europe/Oslo" - | "Europe/Paris" - | "Europe/Podgorica" - | "Europe/Prague" - | "Europe/Riga" - | "Europe/Rome" - | "Europe/Samara" - | "Europe/San_Marino" - | "Europe/Sarajevo" - | "Europe/Saratov" - | "Europe/Simferopol" - | "Europe/Skopje" - | "Europe/Sofia" - | "Europe/Stockholm" - | "Europe/Tallinn" - | "Europe/Tirane" - | "Europe/Ulyanovsk" - | "Europe/Vaduz" - | "Europe/Vatican" - | "Europe/Vienna" - | "Europe/Vilnius" - | "Europe/Volgograd" - | "Europe/Warsaw" - | "Europe/Zagreb" - | "Europe/Zurich" - | "GMT" - | "Indian/Antananarivo" - | "Indian/Chagos" - | "Indian/Christmas" - | "Indian/Cocos" - | "Indian/Comoro" - | "Indian/Kerguelen" - | "Indian/Mahe" - | "Indian/Maldives" - | "Indian/Mauritius" - | "Indian/Mayotte" - | "Indian/Reunion" - | "Pacific/Apia" - | "Pacific/Auckland" - | "Pacific/Bougainville" - | "Pacific/Chatham" - | "Pacific/Chuuk" - | "Pacific/Easter" - | "Pacific/Efate" - | "Pacific/Fakaofo" - | "Pacific/Fiji" - | "Pacific/Funafuti" - | "Pacific/Galapagos" - | "Pacific/Gambier" - | "Pacific/Guadalcanal" - | "Pacific/Guam" - | "Pacific/Honolulu" - | "Pacific/Kanton" - | "Pacific/Kiritimati" - | "Pacific/Kosrae" - | "Pacific/Kwajalein" - | "Pacific/Majuro" - | "Pacific/Marquesas" - | "Pacific/Midway" - | "Pacific/Nauru" - | "Pacific/Niue" - | "Pacific/Norfolk" - | "Pacific/Noumea" - | "Pacific/Pago_Pago" - | "Pacific/Palau" - | "Pacific/Pitcairn" - | "Pacific/Pohnpei" - | "Pacific/Port_Moresby" - | "Pacific/Rarotonga" - | "Pacific/Saipan" - | "Pacific/Tahiti" - | "Pacific/Tarawa" - | "Pacific/Tongatapu" - | "Pacific/Wake" - | "Pacific/Wallis" - | "US/Alaska" - | "US/Arizona" - | "US/Central" - | "US/Eastern" - | "US/Hawaii" - | "US/Mountain" - | "US/Pacific" - | "UTC"; - customer_name?: string; +export interface paths { + "/app/actions/": { + /** @description API endpoint that allows events to be viewed. */ + get: operations["app_actions_list"]; + }; + "/app/addon_versions/": { + post: operations["app_addon_versions_create"]; + }; + "/app/addon_versions/{version_id}/": { + patch: operations["app_addon_versions_partial_update"]; + }; + "/app/addon_versions/{version_id}/delete/": { + post: operations["app_addon_versions_delete_create"]; + }; + "/app/addons/": { + get: operations["app_addons_list"]; + post: operations["app_addons_create"]; + }; + "/app/addons/{addon_id}/": { + get: operations["app_addons_retrieve"]; + patch: operations["app_addons_partial_update"]; + }; + "/app/addons/{addon_id}/delete/": { + post: operations["app_addons_delete_create"]; + }; + "/app/addons/{addon_id}/features/add/": { + post: operations["app_addons_features_add_create"]; + }; + "/app/api_tokens/": { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ + get: operations["app_api_tokens_list"]; + /** @description API endpoint that allows API Tokens to be viewed or edited. */ + post: operations["app_api_tokens_create"]; + }; + "/app/api_tokens/{prefix}/": { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ + delete: operations["app_api_tokens_destroy"]; + }; + "/app/api_tokens/{prefix}/roll/": { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ + post: operations["app_api_tokens_roll_create"]; + }; + "/app/backtests/": { + get: operations["app_backtests_list"]; + post: operations["app_backtests_create"]; + }; + "/app/backtests/{backtest_id}/": { + get: operations["app_backtests_retrieve"]; + }; + "/app/cost_analysis/": { + /** @description Returns the revenue for an organization in a given time period. */ + get: operations["app_cost_analysis_retrieve"]; + }; + "/app/credits/": { + get: operations["app_credits_list"]; + post: operations["app_credits_create"]; + }; + "/app/credits/{credit_id}/": { + get: operations["app_credits_retrieve"]; + }; + "/app/credits/{credit_id}/update/": { + post: operations["app_credits_update_create"]; + }; + "/app/credits/{credit_id}/void/": { + post: operations["app_credits_void_create"]; + }; + "/app/customers/": { + get: operations["app_customers_list"]; + post: operations["app_customers_create"]; + }; + "/app/customers/{customer_id}/": { + get: operations["app_customers_retrieve"]; + patch: operations["app_customers_partial_update"]; + }; + "/app/customers/{customer_id}/delete/": { + post: operations["app_customers_delete_create"]; + }; + "/app/customers/{customer_id}/draft_invoice/": { + get: operations["app_customers_draft_invoice_retrieve"]; + }; + "/app/customers/summary/": { + /** @description Get the current settings for the organization. */ + get: operations["app_customers_summary_retrieve"]; + }; + "/app/customers/totals/": { + /** @description Get the current settings for the organization. */ + get: operations["app_customers_totals_retrieve"]; + }; + "/app/demo_login/": { + post: operations["app_demo_login_create"]; + }; + "/app/demo_register/": { + post: operations["app_demo_register_create"]; + }; + "/app/events/": { + /** @description API endpoint that allows events to be viewed. */ + get: operations["app_events_list"]; + }; + "/app/external_plan_links/": { + post: operations["app_external_plan_links_create"]; + }; + "/app/external_plan_links/{external_plan_id}/": { + delete: operations["app_external_plan_links_destroy"]; + }; + "/app/features/": { + get: operations["app_features_list"]; + post: operations["app_features_create"]; + }; + "/app/import_customers/": { + post: operations["app_import_customers_create"]; + }; + "/app/import_payment_objects/": { + post: operations["app_import_payment_objects_create"]; + }; + "/app/invoices/": { + get: operations["app_invoices_list"]; + post: operations["app_invoices_create"]; + }; + "/app/invoices/{invoice_id}/": { + get: operations["app_invoices_retrieve"]; + patch: operations["app_invoices_partial_update"]; + }; + "/app/invoices/{invoice_id}/pdf_url/": { + get: operations["app_invoices_pdf_url_retrieve"]; + }; + "/app/invoices/{invoice_id}/send/": { + post: operations["app_invoices_send_create"]; + }; + "/app/login/": { + post: operations["app_login_create"]; + }; + "/app/logout/": { + post: operations["app_logout_create"]; + }; + "/app/metrics/": { + get: operations["app_metrics_list"]; + post: operations["app_metrics_create"]; + }; + "/app/metrics/{metric_id}/": { + get: operations["app_metrics_retrieve"]; + patch: operations["app_metrics_partial_update"]; + }; + "/app/netsuite_customers/": { + get: operations["app_netsuite_customers_retrieve"]; + }; + "/app/netsuite_invoices/": { + get: operations["app_netsuite_invoices_retrieve"]; + }; + "/app/organization/invite/": { + post: operations["app_organization_invite_create"]; + }; + "/app/organization/invite_link/": { + post: operations["app_organization_invite_link_create"]; + }; + "/app/organization_settings/": { + get: operations["app_organization_settings_list"]; + }; + "/app/organization_settings/{setting_id}/": { + get: operations["app_organization_settings_retrieve"]; + patch: operations["app_organization_settings_partial_update"]; + }; + "/app/organizations/": { + get: operations["app_organizations_list"]; + post: operations["app_organizations_create"]; + }; + "/app/organizations/{organization_id}/": { + patch: operations["app_organizations_partial_update"]; + }; + "/app/payment_providers/": { + get: operations["app_payment_providers_list"]; + post: operations["app_payment_providers_create"]; + }; + "/app/period_events/": { + /** @description Returns the revenue for an organization in a given time period. */ + get: operations["app_period_events_retrieve"]; + }; + "/app/period_metric_revenue/": { + /** @description Returns the revenue for an organization in a given time period. */ + get: operations["app_period_metric_revenue_retrieve"]; + }; + "/app/period_metric_usage/": { + /** @description Return current usage for a customer during a given billing period. */ + get: operations["app_period_metric_usage_retrieve"]; + }; + "/app/period_subscriptions/": { + get: operations["app_period_subscriptions_retrieve"]; + }; + "/app/plan_versions/": { + get: operations["app_plan_versions_list"]; + post: operations["app_plan_versions_create"]; + }; + "/app/plan_versions/{version_id}/": { + get: operations["app_plan_versions_retrieve"]; + patch: operations["app_plan_versions_partial_update"]; + }; + "/app/plan_versions/{version_id}/delete/": { + post: operations["app_plan_versions_delete_create"]; + }; + "/app/plan_versions/{version_id}/features/add/": { + post: operations["app_plan_versions_features_add_create"]; + }; + "/app/plan_versions/{version_id}/make_public/": { + post: operations["app_plan_versions_make_public_create"]; + }; + "/app/plan_versions/{version_id}/replacement/make/": { + post: operations["app_plan_versions_replacement_make_create"]; + }; + "/app/plan_versions/{version_id}/replacement/set/": { + post: operations["app_plan_versions_replacement_set_create"]; + }; + "/app/plan_versions/{version_id}/subscriptions/": { + get: operations["app_plan_versions_subscriptions_list"]; + }; + "/app/plan_versions/{version_id}/target_customers/add/": { + post: operations["app_plan_versions_target_customers_add_create"]; + }; + "/app/plan_versions/{version_id}/target_customers/remove/": { + post: operations["app_plan_versions_target_customers_remove_create"]; + }; + "/app/plans/": { + /** @description ViewSet for viewing and editing Plans. */ + get: operations["app_plans_list"]; + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_create"]; + }; + "/app/plans/{plan_id}/": { + /** @description ViewSet for viewing and editing Plans. */ + get: operations["app_plans_retrieve"]; + /** @description ViewSet for viewing and editing Plans. */ + patch: operations["app_plans_partial_update"]; + }; + "/app/plans/{plan_id}/delete/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_delete_create"]; + }; + "/app/plans/{plan_id}/features/add/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_features_add_create"]; + }; + "/app/plans/{plan_id}/tags/add/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_tags_add_create"]; + }; + "/app/plans/{plan_id}/tags/remove/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_tags_remove_create"]; + }; + "/app/plans/{plan_id}/tags/set/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_tags_set_create"]; + }; + "/app/plans/{plan_id}/versions/{version_number}/active_dates/update/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_versions_active_dates_update_create"]; + }; + "/app/plans/{plan_id}/versions/{version_number}/features/add/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_versions_features_add_create"]; + }; + "/app/plans/{plan_id}/versions/{version_number}/replacement/set/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_versions_replacement_set_create"]; + }; + "/app/plans/{plan_id}/versions/{version_number}/transition/set/": { + /** @description ViewSet for viewing and editing Plans. */ + post: operations["app_plans_versions_transition_set_create"]; + }; + "/app/plans/{plan_id}/versions/next/": { + /** @description ViewSet for viewing and editing Plans. */ + get: operations["app_plans_versions_next_retrieve"]; + }; + "/app/plans_by_customer/": { + get: operations["app_plans_by_customer_retrieve"]; + }; + "/app/pricing_units/": { + get: operations["app_pricing_units_list"]; + post: operations["app_pricing_units_create"]; + }; + "/app/register/": { + post: operations["app_register_create"]; + }; + "/app/session/": { + get: operations["app_session_retrieve"]; + }; + "/app/subscriptions/": { + get: operations["app_subscriptions_list"]; + post: operations["app_subscriptions_create"]; + }; + "/app/subscriptions/{subscription_id}/": { + get: operations["app_subscriptions_retrieve"]; + }; + "/app/subscriptions/{subscription_id}/addons/{addon_id}/cancel/": { + post: operations["app_subscriptions_addons_cancel_create"]; + }; + "/app/subscriptions/{subscription_id}/addons/attach/": { + post: operations["app_subscriptions_addons_attach_create"]; + }; + "/app/subscriptions/{subscription_id}/cancel/": { + post: operations["app_subscriptions_cancel_create_2"]; + }; + "/app/subscriptions/{subscription_id}/components/{metric_id}/change_prepaid_units/": { + post: operations["app_subscriptions_components_change_prepaid_units_create"]; + }; + "/app/subscriptions/{subscription_id}/switch_plan/": { + post: operations["app_subscriptions_switch_plan_create"]; + }; + "/app/subscriptions/{subscription_id}/update/": { + post: operations["app_subscriptions_update_create_2"]; + }; + "/app/subscriptions/add/": { + /** @deprecated */ + post: operations["app_subscriptions_add_create"]; + }; + "/app/subscriptions/cancel/": { + /** @deprecated */ + post: operations["app_subscriptions_cancel_create"]; + }; + "/app/subscriptions/update/": { + post: operations["app_subscriptions_update_create"]; + }; + "/app/switch_organization/": { + /** @description Get the current settings for the organization. */ + post: operations["app_switch_organization_create"]; + }; + "/app/timezones/": { + /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ + get: operations["app_timezones_retrieve"]; + }; + "/app/transfer_subscriptions/": { + post: operations["app_transfer_subscriptions_create"]; + }; + "/app/usage_alerts/": { + /** @description ViewSet for viewing and editing UsageAlerts. */ + get: operations["app_usage_alerts_list"]; + /** @description ViewSet for viewing and editing UsageAlerts. */ + post: operations["app_usage_alerts_create"]; + }; + "/app/usage_alerts/{usage_alert_id}/": { + /** @description ViewSet for viewing and editing UsageAlerts. */ + get: operations["app_usage_alerts_retrieve"]; + /** @description ViewSet for viewing and editing UsageAlerts. */ + delete: operations["app_usage_alerts_destroy"]; + }; + "/app/user/password/reset/": { + /** @description Verifies the token and resets the password. */ + post: operations["app_user_password_reset_create"]; + }; + "/app/user/password/reset/init/": { + post: operations["app_user_password_reset_init_create"]; + }; + "/app/users/": { + get: operations["app_users_list"]; + post: operations["app_users_create"]; + }; + "/app/webhooks/": { + /** @description API endpoint that allows alerts to be viewed or edited. */ + get: operations["app_webhooks_list"]; + /** @description API endpoint that allows alerts to be viewed or edited. */ + post: operations["app_webhooks_create"]; + }; + "/app/webhooks/{webhook_endpoint_id}/": { + /** @description API endpoint that allows alerts to be viewed or edited. */ + get: operations["app_webhooks_retrieve"]; + /** @description API endpoint that allows alerts to be viewed or edited. */ + delete: operations["app_webhooks_destroy"]; + }; + "/stripe/webhook/": { + post: operations["stripe_webhook_create"]; + }; +} + +export interface components { + schemas: { + APIToken: { + /** @description A free-form name for the API key. Need not be unique. 50 characters max. */ + name?: string; + prefix: string; + /** + * Expires + * Format: date-time + * @description Once API key expires, clients cannot use it anymore. + */ + expiry_date?: string; + /** Format: date-time */ + created: string; }; - CustomerWithRevenue: { - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - customer_id?: string; - /** Format: double */ - total_amount_due: number; + APITokenCreateResponse: { + api_key: components["schemas"]["APIToken"]; + key: string; }; - DayMetricUsage: { - /** Format: date */ - date: string; - customer_usages: { - [key: string]: number | undefined; - }; + APITokenRequest: { + /** @description A free-form name for the API key. Need not be unique. 50 characters max. */ + name?: string; + /** + * Expires + * Format: date-time + * @description Once API key expires, clients cannot use it anymore. + */ + expiry_date?: string; }; - DeleteAddOn: { + APITokenRollResponse: { + api_key: components["schemas"]["APIToken"]; + key: string; + }; + AccessMethodsSubscriptionRecord: { + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; + plan: components["schemas"]["LightweightPlanVersion"]; + }; + /** @description DRF serializer for :class:`~activity.models.Action`. */ + Action: { + id: number; + actor: string; + verb: string; + action_object: string; + target: string; + public?: boolean; + description?: string; + /** Format: date-time */ + timestamp?: string; + }; + AddFeatureRequest: { + /** + * Format: uuid + * @description The feature_id of the feature you want to add to the plan. + */ + feature_id: string; + }; + AddFeatureResponse: { success: boolean; message: string; }; - DeleteAddOnVersion: { + AddFeatureToAddOnRequest: { + /** @description The version_ids of the AddOn versions you want to add the feature to. If you want to apply to all versions, use the all_versions parameter. */ + version_ids?: string[]; + /** + * Format: uuid + * @description The feature_id of the feature you want to add to the plan. + */ + feature_id: string; + }; + AddFeatureToAddOnResponse: { success: boolean; message: string; }; - DeletePlan: { + AddFeatureToPlanRequest: { + /** @description The version_ids of the plan versions you want to add the feature to. If you want to apply to all versions, use the all_versions parameter. */ + version_ids?: string[]; + /** + * @description Whether or not to apply this feature to all versions of the feature. If you want to apply to specific versions, use the version_ids parameter. + * @default false + */ + all_versions?: boolean; + /** + * Format: uuid + * @description The feature_id of the feature you want to add to the plan. + */ + feature_id: string; + }; + AddFeatureToPlanResponse: { success: boolean; message: string; }; - DeletePlanVersion: { + AddFeatureToPlanVersionNumberResponse: { success: boolean; message: string; }; - DemoLoginFailure: { - detail: string; + AddOnCreateRequest: { + /** @description The name of the add-on plan. */ + addon_name: string; + /** @description The description of the add-on plan. */ + addon_description: string; + /** @description The initial version of the add-on plan. */ + initial_version: components["schemas"]["InitialAddOnVersionCreateRequest"]; }; - DemoLoginRequestRequest: { - username: string; - password: string; + AddOnDetail: { + /** @description The name of the add-on plan. */ + addon_name: string; + /** @description This addon's versions. */ + versions: components["schemas"]["AddOnVersion"][]; + /** @description The description of the add-on plan. */ + addon_description: string; + /** @description The ID of the add-on plan. */ + addon_id: string; }; - DemoLoginSuccess: { - detail: string; - token: string; - user: components["schemas"]["User"]; + AddOnSubscriptionRecord: { + addon_subscription_id: string; + customer: components["schemas"]["LightweightCustomer"]; + addon: components["schemas"]["LightweightAddOn"]; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + parent: components["schemas"]["LightweightSubscriptionRecord"]; + fully_billed: boolean; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew: boolean; + metadata: { + [key: string]: Record | undefined; + }; }; - DemoRegistrationDetailRequest: { - email: string; - password: string; - username: string; + AddOnSubscriptionRecordCreateRequest: { + /** + * Format: uuid + * @description The add-on to be applied to the subscription. + */ + addon_id?: string; + /** + * @description The quantity of the add-on to be applied to the subscription. Flat fees of add-ons will be multiplied by this quantity. Usage-based components of add-ons will be unaffected by the quantity. + * @default 1 + */ + quantity?: number; + /** @description A JSON object containing additional information about the add-on subscription. This will be returned in the response when you retrieve the add-on subscription. */ + metadata?: { + [key: string]: Record | undefined; + }; }; - DemoRegistrationFailure: { - detail: string; + AddOnUpdate: { + addon_name?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; }; - DemoRegistrationRequest: { - register: components["schemas"]["DemoRegistrationDetailRequest"]; + AddOnVersion: { + recurring_charges: components["schemas"]["RecurringCharge"][]; + components: components["schemas"]["PlanComponent"][]; + features: components["schemas"]["Feature"][]; + /** @enum {string} */ + status: + | "active" + | "retiring" + | "grandfathered" + | "deleted" + | "inactive" + | "not_started"; + /** @description Currency of the plan. Can only be null if the flat fee is 0 and all components are of type free. */ + currency: components["schemas"]["PricingUnit"]; + /** @description The number of active instances of this version of the add-on plan. */ + active_instances: number; + /** @enum {unknown} */ + invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; + /** @enum {unknown} */ + billing_frequency: "one_time" | "recurring"; + /** @enum {string} */ + addon_type: "usage_based" | "flat"; }; - DemoRegistrationSuccess: { - detail: string; - token: string; - user: components["schemas"]["User"]; + AddOnVersionCreateRequest: { + /** Format: uuid */ + addon_id: string; + recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; + components?: components["schemas"]["PlanComponentCreateRequest"][]; + features?: string[]; + currency_code: string; + /** @enum {unknown} */ + invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; + /** @enum {unknown} */ + billing_frequency: "one_time" | "recurring"; }; - DraftInvoice: { - invoice_id: string; - line_items: readonly components["schemas"]["GroupedLineItem"][]; + AddOnVersionDetail: { + recurring_charges: components["schemas"]["RecurringCharge"][]; + components: components["schemas"]["PlanComponent"][]; + features: components["schemas"]["Feature"][]; + /** @enum {string} */ + status: + | "active" + | "retiring" + | "grandfathered" + | "deleted" + | "inactive" + | "not_started"; + /** @description Currency of the plan. Can only be null if the flat fee is 0 and all components are of type free. */ + currency: components["schemas"]["PricingUnit"]; + /** @description The number of active instances of this version of the add-on plan. */ + active_instances: number; + /** @enum {unknown} */ + invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; + /** @enum {unknown} */ + billing_frequency: "one_time" | "recurring"; + /** @enum {string} */ + addon_type: "usage_based" | "flat"; + }; + AddOnVersionUpdate: { + addon_version_name?: string; /** Format: date-time */ - due_date: string; - /** Format: double */ - cost_due: number; - /** Format: date */ - start_date: string; + active_from?: string; /** Format: date-time */ - issue_date: string; - currency: components["schemas"]["PricingUnit"]; - /** Format: date */ - end_date: string; + active_to?: string; }; - DraftInvoiceResponse: { - invoice?: components["schemas"]["DraftInvoice"][]; + AddPlanTags: { + tags?: components["schemas"]["Tag"][]; + success: boolean; + message: string; }; - EmailRequest: { - /** Format: email */ - email: string; + AddPlanTagsRequest: { + tags?: components["schemas"]["TagRequest"][]; }; - EventDetail: { - /** @description String name of the event, corresponds to definition in metrics */ - event_name: string; - /** @description Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under */ - properties?: { - [key: string]: Record | undefined; - }; + AddTargetCustomerResponse: { + success: boolean; + message: string; + }; + Address: { + /** @description City, district, suburb, town, or village */ + city: string; /** - * Format: date-time - * @description The time that the event occured, represented as a datetime in RFC3339 in the UTC timezome. + * @description Two-letter country code (ISO 3166-1 alpha-2) + * @enum {string} */ - time_created: string; - /** @description A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. */ - idempotency_id: string; - /** @description The id of the customer that this event is associated with, usually the customer id in your backend */ - customer_id: string; + country: + | "AW" + | "AF" + | "AO" + | "AI" + | "AX" + | "AL" + | "AD" + | "AE" + | "AR" + | "AM" + | "AS" + | "AQ" + | "TF" + | "AG" + | "AU" + | "AT" + | "AZ" + | "BI" + | "BE" + | "BJ" + | "BQ" + | "BF" + | "BD" + | "BG" + | "BH" + | "BS" + | "BA" + | "BL" + | "BY" + | "BZ" + | "BM" + | "BO" + | "BR" + | "BB" + | "BN" + | "BT" + | "BV" + | "BW" + | "CF" + | "CA" + | "CC" + | "CH" + | "CL" + | "CN" + | "CI" + | "CM" + | "CD" + | "CG" + | "CK" + | "CO" + | "KM" + | "CV" + | "CR" + | "CU" + | "CW" + | "CX" + | "KY" + | "CY" + | "CZ" + | "DE" + | "DJ" + | "DM" + | "DK" + | "DO" + | "DZ" + | "EC" + | "EG" + | "ER" + | "EH" + | "ES" + | "EE" + | "ET" + | "FI" + | "FJ" + | "FK" + | "FR" + | "FO" + | "FM" + | "GA" + | "GB" + | "GE" + | "GG" + | "GH" + | "GI" + | "GN" + | "GP" + | "GM" + | "GW" + | "GQ" + | "GR" + | "GD" + | "GL" + | "GT" + | "GF" + | "GU" + | "GY" + | "HK" + | "HM" + | "HN" + | "HR" + | "HT" + | "HU" + | "ID" + | "IM" + | "IN" + | "IO" + | "IE" + | "IR" + | "IQ" + | "IS" + | "IL" + | "IT" + | "JM" + | "JE" + | "JO" + | "JP" + | "KZ" + | "KE" + | "KG" + | "KH" + | "KI" + | "KN" + | "KR" + | "KW" + | "LA" + | "LB" + | "LR" + | "LY" + | "LC" + | "LI" + | "LK" + | "LS" + | "LT" + | "LU" + | "LV" + | "MO" + | "MF" + | "MA" + | "MC" + | "MD" + | "MG" + | "MV" + | "MX" + | "MH" + | "MK" + | "ML" + | "MT" + | "MM" + | "ME" + | "MN" + | "MP" + | "MZ" + | "MR" + | "MS" + | "MQ" + | "MU" + | "MW" + | "MY" + | "YT" + | "NA" + | "NC" + | "NE" + | "NF" + | "NG" + | "NI" + | "NU" + | "NL" + | "NO" + | "NP" + | "NR" + | "NZ" + | "OM" + | "PK" + | "PA" + | "PN" + | "PE" + | "PH" + | "PW" + | "PG" + | "PL" + | "PR" + | "KP" + | "PT" + | "PY" + | "PS" + | "PF" + | "QA" + | "RE" + | "RO" + | "RU" + | "RW" + | "SA" + | "SD" + | "SN" + | "SG" + | "GS" + | "SH" + | "SJ" + | "SB" + | "SL" + | "SV" + | "SM" + | "SO" + | "PM" + | "RS" + | "SS" + | "ST" + | "SR" + | "SK" + | "SI" + | "SE" + | "SZ" + | "SX" + | "SC" + | "SY" + | "TC" + | "TD" + | "TG" + | "TH" + | "TJ" + | "TK" + | "TM" + | "TL" + | "TO" + | "TT" + | "TN" + | "TR" + | "TV" + | "TW" + | "TZ" + | "UG" + | "UA" + | "UM" + | "UY" + | "US" + | "UZ" + | "VA" + | "VC" + | "VE" + | "VG" + | "VI" + | "VN" + | "VU" + | "WF" + | "WS" + | "YE" + | "ZA" + | "ZM" + | "ZW"; + /** @description Address line 1 (e.g., street, PO Box, or company name) */ + line1: string; + /** @description Address line 2 (e.g., apartment, suite, unit, or building) */ + line2?: string; + /** @description ZIP or postal code */ + postal_code: string; + /** @description State, county, province, or region */ + state?: string; }; - EventRequest: { - /** @description String name of the event, corresponds to definition in metrics */ - event_name: string; - /** @description Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under */ - properties?: { - [key: string]: Record | undefined; - }; + AddressRequest: { + /** @description City, district, suburb, town, or village */ + city: string; /** - * Format: date-time - * @description The time that the event occured, represented as a datetime in RFC3339 in the UTC timezome. - */ - time_created: string; - /** @description A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. */ - idempotency_id: string; - /** @description The id of the customer that this event is associated with, usually the customer id in your backend */ - customer_id: string; - }; - ExternalPlanLink: { - /** @enum {string} */ - source: "stripe" | "braintree"; - external_plan_id: string; - }; - ExternalPlanLinkRequest: { - /** Format: uuid */ - plan_id: string; - /** @enum {string} */ - source: "stripe" | "braintree"; - external_plan_id: string; - }; - Feature: { - feature_id: string; - feature_name: string; - feature_description: string; - }; - FeatureAccessPerSubscription: { - subscription: components["schemas"]["AccessMethodsSubscriptionRecord"]; - access: boolean; - }; - FeatureAccessResponse: { - customer: components["schemas"]["LightweightCustomer"]; - /** @description Whether or not the customer has access to this feature. The default behavior for this is whether any of the customer's plans have access to this feature. If you have specified subscription filters, then this will be whether any of the customer's plans that match the subscription filters have access to this feature. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend. */ - access: boolean; - feature: components["schemas"]["Feature"]; - access_per_subscription: components["schemas"]["FeatureAccessPerSubscription"][]; - }; - FeatureCreateRequest: { - feature_name: string; - feature_description?: string; - }; - FeatureDetail: { - feature_id: string; - feature_name: string; - feature_description: string; - }; - GetEventAccess: { - /** @description The plan_id of the plan we are checking that has access to this feature. */ - plan_id: string; - /** @description The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. */ - subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; - /** @description The usage of each component of the plan the customer is on. Only components that match the request will be included: If metric_id is provided, this will be a list of length 1. If event_name is provided, this will be a list of length 1 or more depending on how many components of the customer's plan use this event. */ - usage_per_component: components["schemas"]["ComponentUsage"][]; - }; - GetFeatureAccess: { - /** @description Name of the feature to check access for. */ - feature_name: string; - /** @description The plan_id of the plan we are checking that has access to this feature. */ - plan_id: string; - /** @description The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. */ - subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; - /** @description Whether or not the plan has access to this feature. If your customer can have multiple plans or subscriptions, then you must check the 'access' across all returned plans to determine if the customer can access this feature. */ - access: boolean; - }; - GroupedLineItem: { - plan_name: string; - subscription_filters: components["schemas"]["SubscriptionCategoricalFilterDetail"][]; - /** Format: double */ - subtotal: number; - /** Format: date-time */ - start_date: string; - /** Format: date-time */ - end_date: string; - sub_items: components["schemas"]["LightweightInvoiceLineItem"][]; - }; - ImportCustomerFailure: { - /** @enum {string} */ - status: "error"; - detail: string; - }; - ImportCustomerSuccess: { - /** @enum {string} */ - status: "success"; - detail: string; - }; - ImportCustomersRequestRequest: { - /** @enum {string} */ - source: "stripe" | "braintree"; - }; - ImportPaymentObjectFailure: { - /** @enum {string} */ - status: "error"; - detail: string; - }; - ImportPaymentObjectSuccess: { - /** @enum {string} */ - status: "success"; - detail: string; - }; - ImportPaymentObjectsRequestRequest: { - /** @enum {string} */ - source: "stripe" | "braintree"; - }; - InitResetPasswordSuccess: { - email: string; - }; - InitialAddOnVersionCreateRequest: { - /** @enum {unknown} */ - billing_frequency: "one_time" | "recurring"; - currency_code: string; - features?: string[]; - /** @enum {unknown} */ - invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; - recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; - components?: components["schemas"]["PlanComponentCreateRequest"][]; - }; - InitialExternalPlanLink: { - /** @enum {string} */ - source: "stripe" | "braintree"; - external_plan_id: string; - }; - InitialExternalPlanLinkRequest: { - /** @enum {string} */ - source: "stripe" | "braintree"; - external_plan_id: string; - }; - InitialPlanVersionCreateRequest: { - localized_name?: string; - version: number; - target_customer_ids?: string[]; - currency_code: string; - features?: string[]; - recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; - day_anchor?: number; - month_anchor?: number; - components?: components["schemas"]["PlanComponentCreateRequest"][]; - price_adjustment?: components["schemas"]["PriceAdjustmentRequest"]; - }; - InviteLinkResponse: { - /** Format: email */ - email: string; - /** Format: uri */ - link: string; - }; - InviteRequestRequest: { - /** Format: email */ - email: string; - }; - InviteResponse: { - /** Format: email */ - email: string; - }; - Invoice: { - invoice_id: string; - invoice_number: string; - /** Format: double */ - cost_due: number; - currency: components["schemas"]["PricingUnit"]; - /** Format: date-time */ - issue_date: string; - /** @enum {unknown} */ - payment_status: "draft" | "voided" | "paid" | "unpaid"; - external_payment_obj_id: string; - /** @enum {string|null} */ - external_payment_obj_type: "stripe" | "braintree" | "" | null; - line_items: components["schemas"]["InvoiceLineItem"][]; - customer: components["schemas"]["LightweightCustomerSerializerForInvoice"]; - /** Format: date-time */ - due_date: string; - /** Format: date */ - start_date: string; - /** Format: date */ - end_date: string; - seller: components["schemas"]["Seller"]; - /** Format: uri */ - invoice_pdf: string; - }; - InvoiceCreatedRequest: { - payload: components["schemas"]["InvoiceRequest"]; - }; - InvoiceDetail: { - invoice_id: string; - invoice_number: string; - /** Format: double */ - cost_due: number; - currency: components["schemas"]["PricingUnit"]; - /** Format: date-time */ - issue_date: string; - /** @enum {unknown} */ - payment_status: "draft" | "voided" | "paid" | "unpaid"; - external_payment_obj_id: string; - /** @enum {string|null} */ - external_payment_obj_type: "stripe" | "braintree" | "" | null; - line_items: components["schemas"]["InvoiceLineItem"][]; - customer: components["schemas"]["LightweightCustomerSerializerForInvoice"]; - /** Format: date-time */ - due_date: string; - /** Format: date */ - start_date: string; - /** Format: date */ - end_date: string; - seller: components["schemas"]["Seller"]; - /** Format: uri */ - invoice_pdf: string; + * @description Two-letter country code (ISO 3166-1 alpha-2) + * @enum {string} + */ + country: + | "AW" + | "AF" + | "AO" + | "AI" + | "AX" + | "AL" + | "AD" + | "AE" + | "AR" + | "AM" + | "AS" + | "AQ" + | "TF" + | "AG" + | "AU" + | "AT" + | "AZ" + | "BI" + | "BE" + | "BJ" + | "BQ" + | "BF" + | "BD" + | "BG" + | "BH" + | "BS" + | "BA" + | "BL" + | "BY" + | "BZ" + | "BM" + | "BO" + | "BR" + | "BB" + | "BN" + | "BT" + | "BV" + | "BW" + | "CF" + | "CA" + | "CC" + | "CH" + | "CL" + | "CN" + | "CI" + | "CM" + | "CD" + | "CG" + | "CK" + | "CO" + | "KM" + | "CV" + | "CR" + | "CU" + | "CW" + | "CX" + | "KY" + | "CY" + | "CZ" + | "DE" + | "DJ" + | "DM" + | "DK" + | "DO" + | "DZ" + | "EC" + | "EG" + | "ER" + | "EH" + | "ES" + | "EE" + | "ET" + | "FI" + | "FJ" + | "FK" + | "FR" + | "FO" + | "FM" + | "GA" + | "GB" + | "GE" + | "GG" + | "GH" + | "GI" + | "GN" + | "GP" + | "GM" + | "GW" + | "GQ" + | "GR" + | "GD" + | "GL" + | "GT" + | "GF" + | "GU" + | "GY" + | "HK" + | "HM" + | "HN" + | "HR" + | "HT" + | "HU" + | "ID" + | "IM" + | "IN" + | "IO" + | "IE" + | "IR" + | "IQ" + | "IS" + | "IL" + | "IT" + | "JM" + | "JE" + | "JO" + | "JP" + | "KZ" + | "KE" + | "KG" + | "KH" + | "KI" + | "KN" + | "KR" + | "KW" + | "LA" + | "LB" + | "LR" + | "LY" + | "LC" + | "LI" + | "LK" + | "LS" + | "LT" + | "LU" + | "LV" + | "MO" + | "MF" + | "MA" + | "MC" + | "MD" + | "MG" + | "MV" + | "MX" + | "MH" + | "MK" + | "ML" + | "MT" + | "MM" + | "ME" + | "MN" + | "MP" + | "MZ" + | "MR" + | "MS" + | "MQ" + | "MU" + | "MW" + | "MY" + | "YT" + | "NA" + | "NC" + | "NE" + | "NF" + | "NG" + | "NI" + | "NU" + | "NL" + | "NO" + | "NP" + | "NR" + | "NZ" + | "OM" + | "PK" + | "PA" + | "PN" + | "PE" + | "PH" + | "PW" + | "PG" + | "PL" + | "PR" + | "KP" + | "PT" + | "PY" + | "PS" + | "PF" + | "QA" + | "RE" + | "RO" + | "RU" + | "RW" + | "SA" + | "SD" + | "SN" + | "SG" + | "GS" + | "SH" + | "SJ" + | "SB" + | "SL" + | "SV" + | "SM" + | "SO" + | "PM" + | "RS" + | "SS" + | "ST" + | "SR" + | "SK" + | "SI" + | "SE" + | "SZ" + | "SX" + | "SC" + | "SY" + | "TC" + | "TD" + | "TG" + | "TH" + | "TJ" + | "TK" + | "TM" + | "TL" + | "TO" + | "TT" + | "TN" + | "TR" + | "TV" + | "TW" + | "TZ" + | "UG" + | "UA" + | "UM" + | "UY" + | "US" + | "UZ" + | "VA" + | "VC" + | "VE" + | "VG" + | "VI" + | "VN" + | "VU" + | "WF" + | "WS" + | "YE" + | "ZA" + | "ZM" + | "ZW"; + /** @description Address line 1 (e.g., street, PO Box, or company name) */ + line1: string; + /** @description Address line 2 (e.g., apartment, suite, unit, or building) */ + line2?: string; + /** @description ZIP or postal code */ + postal_code: string; + /** @description State, county, province, or region */ + state?: string; }; - InvoiceLineItem: { - name: string; - /** Format: date-time */ - start_date: string; - /** Format: date-time */ - end_date: string; - /** Format: double */ - quantity: number; + AllSubstitutionResults: { + substitution_results?: components["schemas"]["SingleSubstitution"][]; /** Format: double */ - subtotal: number; - /** @enum {string|null} */ - billing_type: - | "in_arrears" - | "intermediate" - | "in_advance" - | "one_time" - | "" - | null; - metadata: { - [key: string]: Record | undefined; - } | null; - plan: components["schemas"]["LightweightPlanVersion"] | null; - subscription_filters: readonly components["schemas"]["SubscriptionCategoricalFilter"][]; - }; - InvoiceLineItemRequest: { - name: string; - /** Format: date-time */ - start_date: string; - /** Format: date-time */ - end_date: string; + original_plans_revenue?: number; /** Format: double */ - quantity: number; + new_plans_revenue?: number; /** Format: double */ - subtotal: number; - /** @enum {string|null} */ - billing_type: - | "in_arrears" - | "intermediate" - | "in_advance" - | "one_time" - | "" - | null; - metadata: { - [key: string]: Record | undefined; - } | null; - }; - InvoicePaidRequest: { - payload: components["schemas"]["InvoiceRequest"]; - }; - InvoicePastDueRequest: { - payload: components["schemas"]["InvoiceRequest"]; - }; - InvoiceRequest: { - invoice_id: string; - currency: components["schemas"]["PricingUnitRequest"]; - /** @enum {string|null} */ - external_payment_obj_type: "stripe" | "braintree" | "" | null; - line_items: components["schemas"]["InvoiceLineItemRequest"][]; - seller: components["schemas"]["SellerRequest"]; - }; - InvoiceUpdate: { - /** @enum {string} */ - payment_status: "paid" | "unpaid"; - }; - LightweightAddOn: { - /** @description The name of the add-on plan. */ - addon_name: string; - /** @description The ID of the add-on plan. */ - addon_id: string; - /** @enum {string} */ - addon_type: "flat" | "usage_based"; - /** @enum {unknown} */ - billing_frequency: "one_time" | "recurring"; - }; - LightweightAddOnRequest: { - /** @description The name of the add-on plan. */ - addon_name: string; - /** @description The ID of the add-on plan. */ - addon_id: string; - }; - LightweightAddOnSubscriptionRecord: { - addon_subscription_id: string; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - start_date: string; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - end_date: string; - addon: components["schemas"]["LightweightAddOn"]; - fully_billed: boolean; - }; - LightweightAddOnSubscriptionRecordRequest: { - addon_subscription_id: string; - addon: components["schemas"]["LightweightAddOnRequest"]; - }; - LightweightCustomer: { - /** @description The display name of the customer */ - customer_name: string; - /** - * Format: email - * @description The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider - */ - email: string; - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - customer_id: string; - }; - LightweightCustomerSerializerForInvoice: { - /** @description The display name of the customer */ - customer_name: string; - /** - * Format: email - * @description The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider - */ - email: string; - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - customer_id: string; - address?: components["schemas"]["Address"] | null; + pct_revenue_change?: number; }; - LightweightInvoice: { - invoice_id: string; - /** @enum {string|null} */ - external_payment_obj_type: "stripe" | "braintree" | "" | null; - /** Format: uri */ - invoice_pdf: string; - /** Format: double */ - cost_due: number; - /** Format: date-time */ - due_date: string; + BacktestCreate: { /** Format: date */ start_date: string; - seller: components["schemas"]["Seller"]; - /** @enum {unknown} */ - payment_status: "draft" | "voided" | "paid" | "unpaid"; - /** Format: date-time */ - issue_date: string; - currency: components["schemas"]["PricingUnit"]; - external_payment_obj_id: string; - invoice_number: string; /** Format: date */ end_date: string; + kpis: "total_revenue"[]; + backtest_name: string; }; - LightweightInvoiceLineItem: { - /** Format: double */ - quantity: number; - subscription_filters: readonly components["schemas"]["SubscriptionCategoricalFilter"][]; - /** Format: date-time */ + BacktestCreateRequest: { + /** Format: date */ start_date: string; - plan: components["schemas"]["LightweightPlanVersion"] | null; - name: string; - /** Format: double */ - subtotal: number; - /** @enum {string|null} */ - billing_type: - | "in_arrears" - | "intermediate" - | "in_advance" - | "one_time" - | "" - | null; - /** Format: date-time */ + /** Format: date */ end_date: string; + substitutions: components["schemas"]["BacktestSubstitutionMultiRequest"][]; + kpis: "total_revenue"[]; + backtest_name: string; }; - LightweightMetric: { - metric_id: string; - /** @description Name of the event that this metric is tracking. */ - event_name: string; - metric_name: string; - }; - LightweightOrganization: { - organization_id: string; - organization_name: string; + BacktestDetail: { + backtest_id: string; /** @enum {string} */ - organization_type: - | "Production" - | "Development" - | "Demo" - | "Internal Demo"; - current: boolean; - }; - LightweightPlan: { - /** @description Name of the plan */ - plan_name: string; - plan_id: string; - }; - LightweightPlanVersion: { - plan_name: string; - plan_id: string; - version_id: string; - version: number | "custom_version"; - }; - LightweightPlanVersionRequest: { - plan_id: string; - }; - LightweightSubscriptionRecord: { - plan_detail: components["schemas"]["LightweightPlanVersion"]; - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew: boolean; - subscription_filters: readonly components["schemas"]["SubscriptionCategoricalFilter"][]; - subscription_id: string; - /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ - is_new: boolean; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - start_date: string; - billing_plan: components["schemas"]["LightweightPlanVersion"]; - fully_billed: boolean; - addons: components["schemas"]["LightweightAddOnSubscriptionRecord"][]; - customer: components["schemas"]["LightweightCustomer"]; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - end_date: string; - }; - LightweightSubscriptionRecordRequest: { - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew: boolean; - subscription_id: string; - /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ - is_new: boolean; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - start_date: string; - billing_plan: components["schemas"]["LightweightPlanVersionRequest"]; - addons: components["schemas"]["LightweightAddOnSubscriptionRecordRequest"][]; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - end_date: string; - }; - LightweightUser: { - /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - username: string; - /** Format: email */ - email: string; + status?: "running" | "completed" | "failed"; + backtest_name: string; + backtest_results: components["schemas"]["AllSubstitutionResults"]; + backtest_substitutions: components["schemas"]["BacktestSubstitution"][]; + /** Format: date */ + start_date: string; + /** Format: date */ + end_date: string; + /** Format: date-time */ + time_created?: string; + kpis?: { + [key: string]: Record | undefined; + }; }; - LoginFailure: { - detail: string; + BacktestSubstitution: { + new_plan: components["schemas"]["PlanVersionDetail"]; + original_plan: components["schemas"]["PlanVersionDetail"]; }; - LoginRequestRequest: { - username: string; - password: string; + BacktestSubstitutionMulti: { + /** Format: uuid */ + new_plan: string; + original_plans: string[]; }; - LoginSuccess: { - detail: string; - token: string; - user: components["schemas"]["User"]; + BacktestSubstitutionMultiRequest: { + /** Format: uuid */ + new_plan: string; + original_plans: string[]; }; - LogoutFailure: { - detail: string; + BacktestSummary: { + backtest_name: string; + /** Format: date */ + start_date: string; + /** Format: date */ + end_date: string; + /** Format: date-time */ + time_created?: string; + kpis?: { + [key: string]: Record | undefined; + }; + /** @enum {string} */ + status?: "running" | "completed" | "failed"; + backtest_id: string; }; - LogoutSuccess: { - detail: string; + BatchEventRequest: { + batch: components["schemas"]["EventRequest"][]; }; - MakePublicRequestRequest: { - version: number; + CategoricalFilter: { + property_name: string; + /** @enum {string} */ + operator: "isin" | "isnotin"; + comparison_value: string[]; }; - MakePublicResponse: { - success: boolean; - message: string; + CategoricalFilterDetailRequest: { + property_name: string; + /** @enum {string} */ + operator: "isin" | "isnotin"; + comparison_value: string[]; }; - MakeReplaceWithRequest: { - /** @description The plan versions that will get replaced by the current version. */ - versions_to_replace: string[]; + CategoricalFilterRequest: { + property_name: string; + /** @enum {string} */ + operator: "isin" | "isnotin"; + comparison_value: string[]; }; - MakeReplaceWithResponse: { + ChangeActiveDateResponse: { success: boolean; message: string; }; - Metric: { - metric_id: string; - /** @description Name of the event that this metric is tracking. */ - event_name: string; - /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ - property_name: string; - aggregation_type: string; - /** - * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. - * @enum {string|null} - */ - granularity: - | "seconds" - | "minutes" - | "hours" - | "days" - | "months" - | "quarters" - | "years" - | "total" - | "" - | null; + ChangeActiveDatesRequest: { + /** @description The version_ids of the plan versions you want to add the feature to. If you want to apply to all versions, use the all_versions parameter. */ + version_ids?: string[]; /** - * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. - * @enum {string|null} + * @description Whether or not to apply this feature to all versions of the feature. If you want to apply to specific versions, use the version_ids parameter. + * @default false */ - event_type: "delta" | "total" | "" | null; + all_versions?: boolean; /** - * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. - * @enum {string} + * Format: date-time + * @description The date and time that the feature should be active from. If you want to make this inactive, you can pass null here. */ - metric_type: "counter" | "rate" | "custom" | "gauge"; - metric_name: string; - numeric_filters: components["schemas"]["NumericFilter"][]; - categorical_filters: components["schemas"]["CategoricalFilter"][]; - /** @description Whether or not this metric is a cost metric (used to track costs to your business). */ - is_cost_metric: boolean; - /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ - custom_sql: string; + active_from?: string; /** - * @description The proration of the metric. Only applies to metrics of type 'gauge'. - * @enum {string|null} + * Format: date-time + * @description The date and time that the feature should be active until. If you want to make this active indefinitely, you can pass null here. */ - proration: - | "seconds" - | "minutes" - | "hours" - | "days" - | "months" - | "quarters" - | "years" - | "total" - | "" - | null; + active_to?: string; }; - MetricAccessPerSubscription: { - subscription: components["schemas"]["AccessMethodsSubscriptionRecord"]; - /** - * Format: double - * @description The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. For examnple, for a gauge metric, the `metric_usage` is the current value of the gauge, while the billable usage is the accumulated tiem at each gauge level at the end of the subscription. - */ - metric_usage: number; + ChangePrepaidUnitsRequest: { /** * Format: double - * @description If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be 0 if you didn't specify a free limit for this metric or this subscription doesn't have access to this metric, and null if the free tier is unlimited. + * @description The new prepaid units for the customer. */ - metric_free_limit: number; + units: number; /** - * Format: double - * @description The total limit of the metric. Will be 0 if this subscription doesn't have access to this metric, and null if there is no limit to this metric. + * @description Whether or not to immediately invoice the customer for the change in prepaid units. + * @default true */ - metric_total_limit: number; + invoice_now?: boolean; }; - MetricAccessResponse: { - customer: components["schemas"]["LightweightCustomer"]; - /** @description Whether or not the customer has access to this metric. The default behavior for this is whether all of the customer's plans (that have access to the metric) are below the total limit of the metric. If you have specified subscription filters, then this will be whether all of the customer's plans that match the subscription filters are below the total limit of the metric. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend. */ - access: boolean; - metric: components["schemas"]["LightweightMetric"]; - access_per_subscription: components["schemas"]["MetricAccessPerSubscription"][]; + ChangeUserOrganizationRequestRequest: { + /** @description The organization ID to transfer to */ + transfer_to_organization_id: string; }; - MetricCreateRequest: { - /** @description Name of the event that this metric is tracking. */ - event_name?: string; - /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ - property_name?: string; - /** - * @description The type of aggregation that should be used for this metric. Please refer to our documentation for an explanation of the different types. - * @enum {string|null} - */ - usage_aggregation_type?: - | "count" - | "sum" - | "max" - | "unique" - | "latest" - | "average" - | "" - | null; - /** @enum {string|null} */ - billable_aggregation_type?: - | "count" - | "sum" - | "max" - | "unique" - | "latest" - | "average" - | "" - | null; - /** - * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. - * @enum {string|null} - */ - granularity?: - | "seconds" - | "minutes" - | "hours" - | "days" - | "months" - | "quarters" - | "years" - | "total" - | "" - | null; - /** - * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. - * @enum {string|null} - */ - event_type?: "delta" | "total" | "" | null; - /** - * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. - * @enum {string} - */ - metric_type: "counter" | "rate" | "custom" | "gauge"; - metric_name: string; + ComponentCharge: { /** - * @description The proration of the metric. Only applies to metrics of type 'gauge'. - * @enum {string|null} + * Format: double + * @description The number of units to charge for. If left null, then it will be required at subscription create time. */ - proration?: - | "seconds" - | "minutes" - | "hours" - | "days" - | "months" - | "quarters" - | "years" - | "total" - | "" - | null; - properties?: { - [key: string]: Record | undefined; - } | null; + units: number; + /** @enum {unknown} */ + charge_behavior: "prorate" | "full"; + }; + ComponentChargeCreateRequest: { /** - * @description Whether or not this metric is a cost metric (used to track costs to your business). - * @default false + * Format: double + * @description The number of units to charge for. If left null, then it will be required at subscription create time. */ - is_cost_metric?: boolean; - /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ - custom_sql?: string; - categorical_filters?: components["schemas"]["CategoricalFilterDetailRequest"][]; - numeric_filters?: components["schemas"]["NumericFilterDetailRequest"][]; - }; - MetricDetail: { - /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ - custom_sql: string; - /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ - property_name: string; - numeric_filters: components["schemas"]["NumericFilter"][]; - /** @description Name of the event that this metric is tracking. */ + units: number; + /** @enum {unknown} */ + charge_behavior: "prorate" | "full"; + }; + ComponentUsage: { + /** @description The name of the event you are checking access for. */ event_name: string; - categorical_filters: components["schemas"]["CategoricalFilter"][]; + /** @description The name of the metric. */ metric_name: string; + /** @description The metric_id of the metric. This metric_id can be found in the Lotus frontend if you haven't seen it before. */ + metric_id: string; /** - * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. - * @enum {string|null} + * Format: double + * @description The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. */ - granularity: - | "seconds" - | "minutes" - | "hours" - | "days" - | "months" - | "quarters" - | "years" - | "total" - | "" - | null; - metric_id: string; + metric_usage: number; /** - * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. - * @enum {string|null} + * Format: double + * @description If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be null if you did not specify a free tier for this metric. */ - event_type: "delta" | "total" | "" | null; + metric_free_limit: number; /** - * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. - * @enum {string} + * Format: double + * @description The total limit of the metric. Will be null if you did not specify a limit for this metric. */ - metric_type: "counter" | "rate" | "custom" | "gauge"; + metric_total_limit: number; + }; + ComponentsFixedChargeInitialValueRequest: { /** - * @description The proration of the metric. Only applies to metrics of type 'gauge'. - * @enum {string|null} + * Format: uuid + * @description The id of the metric that this initial value is for */ - proration: - | "seconds" - | "minutes" - | "hours" - | "days" - | "months" - | "quarters" - | "years" - | "total" - | "" - | null; - /** @description Whether or not this metric is a cost metric (used to track costs to your business). */ - is_cost_metric: boolean; + metric_id: string; /** - * @description The type of aggregation that should be used for this metric. Please refer to our documentation for an explanation of the different types. - * @enum {string} + * Format: double + * @description The number of units of the metric that this initial value is for */ - usage_aggregation_type?: - | "count" - | "sum" - | "max" - | "unique" - | "latest" - | "average"; - /** @enum {string|null} */ - billable_aggregation_type?: - | "count" - | "sum" - | "max" - | "unique" - | "latest" - | "average" - | "" - | "" - | null; + units: number; }; - MetricRequest: { - metric_id: string; - aggregation_type: string; - metric_name: string; - numeric_filters: components["schemas"]["NumericFilterRequest"][]; - categorical_filters: components["schemas"]["CategoricalFilterRequest"][]; + ConfirmConnected: { + organization_id: string; }; - MetricRevenue: { - metric_name: string; - /** Format: double */ - original_plan_revenue: number; - /** Format: double */ - new_plan_revenue: number; + ConfirmIdemsReceived: { + /** @enum {string} */ + status: "success"; + ids_not_found: string[]; }; - MetricUpdate: { - billable_metric_name?: string; + ConfirmIdemsReceivedFailure: { /** @enum {string} */ - status?: "active" | "archived"; + status: "failure"; + error: string; }; - NetsuiteInvoiceCSVView: { - /** Format: uri */ - url: string; + ConfirmIdemsReceivedRequestRequest: { + idempotency_ids: string[]; + /** @default 30 */ + number_days_lookback?: number; + customer_id?: string; }; - NumericFilter: { - property_name: string; - /** @enum {string} */ - operator: "gte" | "gt" | "eq" | "lt" | "lte"; + CostAnalysis: { + per_day: components["schemas"]["SingleDayCostAnalysis"][]; /** Format: double */ - comparison_value: number; - }; - NumericFilterDetailRequest: { - property_name: string; - /** @enum {string} */ - operator: "gte" | "gt" | "eq" | "lt" | "lte"; + total_cost: number; /** Format: double */ - comparison_value: number; + total_revenue: number; + /** Format: double */ + margin: number; }; - NumericFilterRequest: { - property_name: string; - /** @enum {string} */ - operator: "gte" | "gt" | "eq" | "lt" | "lte"; + CreditDrawdown: { + credit_id: string; /** Format: double */ - comparison_value: number; + amount: number; + description?: string; + /** Format: date-time */ + applied_at: string; }; - Organization: { - organization_id: string; - organization_name: string; - users: readonly components["schemas"]["OrganizationUser"][]; - default_currency: components["schemas"]["PricingUnitDetail"]; - available_currencies: readonly components["schemas"]["PricingUnitDetail"][]; - plan_tags: readonly components["schemas"]["Tag"][]; + Customer: { + customer_id: string; + /** Format: email */ + email: string; + /** @description The display name of the customer */ + customer_name: string; + invoices: readonly components["schemas"]["LightweightInvoice"][]; + /** Format: double */ + total_amount_due: number; + subscriptions: readonly components["schemas"]["SubscriptionRecord"][]; + /** @description A dictionary containing the customer's integrations. Keys are the integration type, and the value is a dictionary containing the integration's properties, which can vary by integration. */ + integrations: components["schemas"]["CustomerIntegrations"]; + default_currency: components["schemas"]["PricingUnit"]; + /** @enum {string|null} */ + payment_provider: "stripe" | "braintree" | "" | null; + payment_provider_id: string; + has_payment_method: boolean; + /** @deprecated */ + address?: components["schemas"]["Address"] | null; + billing_address: components["schemas"]["Address"] | null; + shipping_address: components["schemas"]["Address"] | null; /** * Format: double * @description Tax rate as percentage. For example, 10.5 for 10.5% */ - tax_rate?: number; - payment_grace_period: number; - linked_organizations: readonly components["schemas"]["LightweightOrganization"][]; - current_user: components["schemas"]["LightweightUser"]; - address: components["schemas"]["Address"] | null; - team_name: string; - subscription_filter_keys: readonly string[]; + tax_rate: number; /** @enum {string} */ timezone: | "Africa/Abidjan" @@ -3787,76 +1845,78 @@ export interface components { | "US/Mountain" | "US/Pacific" | "UTC"; - stripe_account_id: string; - braintree_merchant_id: string; - tax_providers: readonly ("taxjar" | "lotus")[]; - }; - OrganizationCreateRequest: { - organization_name: string; - default_currency_code?: string; - /** - * @default development - * @enum {string} - */ - organization_type?: "development" | "production"; + /** @description A list of tax providers that are enabled for this customer. The list is ordered, meaning we will succesively try to calculate taxes using each provider until we find one that works. */ + tax_providers: readonly ("taxjar" | "lotus" | "netsuite")[]; }; - OrganizationSetting: { - setting_id: string; - /** @enum {string} */ - setting_name: - | "generate_customer_after_creating_in_lotus" - | "gen_cust_in_braintree_after_lotus" - | "subscription_filter_keys" - | "payment_grace_period"; - setting_values: { - [key: string]: Record | undefined; - }; + CustomerBalanceAdjustment: { + credit_id: string; + customer: components["schemas"]["LightweightCustomer"]; + /** Format: double */ + amount: number; + /** Format: double */ + amount_remaining: number; + currency: components["schemas"]["PricingUnit"]; + description: string; + /** Format: date-time */ + effective_at: string; + /** Format: date-time */ + expires_at: string; /** @enum {string} */ - setting_group?: "stripe" | "braintree" | "billing"; + status: "active" | "inactive"; + /** Format: double */ + amount_paid: number; + amount_paid_currency: components["schemas"]["PricingUnit"] | null; + drawdowns: readonly components["schemas"]["CreditDrawdown"][]; }; - OrganizationSettingUpdate: { - setting_values?: { - [key: string]: Record | undefined; - }; + CustomerBalanceAdjustmentCreateRequest: { + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + customer_id: string; + /** Format: double */ + amount: number; + currency_code: string; + description?: string; + /** Format: date-time */ + effective_at?: string; + /** Format: date-time */ + expires_at?: string; + /** Format: double */ + amount_paid?: number; + amount_paid_currency_code?: string; }; - OrganizationUser: { - /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - username: string; - /** Format: email */ + CustomerBalanceAdjustmentUpdateRequest: { + description?: string; + /** Format: date-time */ + expires_at?: string; + }; + CustomerBraintreeIntegration: { + braintree_id: string; + has_payment_method: boolean; + }; + CustomerCreateRequest: { + /** @description The display name of the customer */ + customer_name?: string; + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + customer_id: string; + /** + * Format: email + * @description The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider + */ email: string; - role: string; /** - * @default Active + * @description The payment provider this customer is associated with. Currently, only Stripe is supported. * @enum {string} */ - status?: "Active" | "Invited"; - }; - PaginatedActionList: { - next?: string; - previous?: string; - results?: components["schemas"]["Action"][]; - }; - PaginatedEventDetailList: { - next?: string; - previous?: string; - results?: components["schemas"]["EventDetail"][]; - }; - PatchedAddOnUpdateRequest: { - addon_name?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; - }; - PatchedAddOnVersionUpdateRequest: { - addon_version_name?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; - }; - PatchedCustomerUpdateRequest: { + payment_provider?: "stripe" | "braintree"; + /** @description The customer's ID in the specified payment provider. Please note that payment_provider and payment_provider_id are mutually necessary. */ + payment_provider_id?: string; + /** @description Extra metadata for the customer */ + properties?: { + [key: string]: Record | undefined; + } | null; + /** @description The currency code this customer will be invoiced in. Codes are 3 letters, e.g. 'USD'. */ default_currency_code?: string; + /** @deprecated */ + address?: components["schemas"]["AddressRequest"] | null; billing_address?: components["schemas"]["AddressRequest"] | null; shipping_address?: components["schemas"]["AddressRequest"] | null; /** @@ -3864,8 +1924,32 @@ export interface components { * @description Tax rate as percentage. For example, 10.5 for 10.5% */ tax_rate?: number; + }; + CustomerCreatedRequest: { + payload: components["schemas"]["CustomerRequest"]; + }; + CustomerDeleteResponse: { + customer_id: string; + /** Format: date-time */ + deleted: string; + /** Format: email */ + email: string; + num_subscriptions_deleted: number; + num_addons_deleted: number; + }; + CustomerIntegrations: { + stripe?: components["schemas"]["CustomerStripeIntegration"] | null; + braintree?: components["schemas"]["CustomerBraintreeIntegration"] | null; + }; + CustomerRequest: { + customer_id: string; + /** Format: email */ + email: string; + default_currency: components["schemas"]["PricingUnitRequest"]; + /** @enum {string|null} */ + payment_provider: "stripe" | "braintree" | "" | null; /** @enum {string} */ - timezone?: + timezone: | "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" @@ -4300,35 +2384,29 @@ export interface components { | "US/Mountain" | "US/Pacific" | "UTC"; - customer_name?: string; - }; - PatchedInvoiceUpdateRequest: { - /** @enum {string} */ - payment_status?: "paid" | "unpaid"; }; - PatchedMetricUpdateRequest: { - billable_metric_name?: string; - /** @enum {string} */ - status?: "active" | "archived"; + CustomerStripeIntegration: { + stripe_id: string; + has_payment_method: boolean; }; - PatchedOrganizationSettingUpdateRequest: { - setting_values?: { - [key: string]: Record | undefined; - }; + CustomerSummary: { + /** @description The display name of the customer */ + customer_name?: string; + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + customer_id?: string; + subscriptions: readonly components["schemas"]["SubscriptionCustomerSummary"][]; }; - PatchedOrganizationUpdateRequest: { - default_currency_code?: string; - address?: components["schemas"]["AddressRequest"] | null; + CustomerUpdate: { + default_currency_code: string; + billing_address?: components["schemas"]["Address"] | null; + shipping_address?: components["schemas"]["Address"] | null; /** * Format: double * @description Tax rate as percentage. For example, 10.5 for 10.5% */ tax_rate?: number; - payment_grace_period?: number; - plan_tags?: components["schemas"]["TagRequest"][]; - subscription_filter_keys?: string[]; /** @enum {string} */ - timezone?: + timezone: | "Africa/Abidjan" | "Africa/Accra" | "Africa/Addis_Ababa" @@ -4763,3296 +2841,5422 @@ export interface components { | "US/Mountain" | "US/Pacific" | "UTC"; + customer_name?: string; + }; + CustomerWithRevenue: { + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + customer_id?: string; + /** Format: double */ + total_amount_due: number; + }; + DayMetricUsage: { + /** Format: date */ + date: string; + customer_usages: { + [key: string]: number | undefined; + }; + }; + DeleteAddOn: { + success: boolean; + message: string; + }; + DeleteAddOnVersion: { + success: boolean; + message: string; + }; + DeletePlan: { + success: boolean; + message: string; + }; + DeletePlanVersion: { + success: boolean; + message: string; + }; + DemoLoginFailure: { + detail: string; + }; + DemoLoginRequestRequest: { + username: string; + password: string; + }; + DemoLoginSuccess: { + detail: string; + token: string; + user: components["schemas"]["User"]; + }; + DemoRegistrationDetailRequest: { + email: string; + password: string; + username: string; + }; + DemoRegistrationFailure: { + detail: string; + }; + DemoRegistrationRequest: { + register: components["schemas"]["DemoRegistrationDetailRequest"]; + }; + DemoRegistrationSuccess: { + detail: string; + token: string; + user: components["schemas"]["User"]; + }; + EmailRequest: { + /** Format: email */ + email: string; + }; + EventDetail: { + /** @description String name of the event, corresponds to definition in metrics */ + event_name: string; + /** @description Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under */ + properties?: { + [key: string]: Record | undefined; + }; /** - * @description To udpate a payment provider's ID, specify the payment provider you want to update in this field, and the payment_provider_id in the corresponding field. - * @enum {string} + * Format: date-time + * @description The time that the event occured, represented as a datetime in RFC3339 in the UTC timezome. */ - payment_provider?: "stripe" | "braintree"; - payment_provider_id?: string; - nango_connected?: boolean; - tax_providers?: ("taxjar" | "lotus")[]; + time_created: string; + /** @description A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. */ + idempotency_id: string; + /** @description The id of the customer that this event is associated with, usually the customer id in your backend */ + customer_id: string; + }; + EventRequest: { + /** @description String name of the event, corresponds to definition in metrics */ + event_name: string; + /** @description Extra metadata on the event that can be filtered and queried on in the metrics. All key value pairs should have string keys and values can be either strings or numbers. Place subscription filters in this object to specify which subscription the event should be tracked under */ + properties?: { + [key: string]: Record | undefined; + }; + /** + * Format: date-time + * @description The time that the event occured, represented as a datetime in RFC3339 in the UTC timezome. + */ + time_created: string; + /** @description A unique identifier for the specific event being passed in. Passing in a unique id allows Lotus to make sure no double counting occurs. We recommend using a UUID4. */ + idempotency_id: string; + /** @description The id of the customer that this event is associated with, usually the customer id in your backend */ + customer_id: string; + }; + ExternalPlanLink: { + /** @enum {string} */ + source: "stripe" | "braintree"; + external_plan_id: string; + }; + ExternalPlanLinkRequest: { + /** Format: uuid */ + plan_id: string; + /** @enum {string} */ + source: "stripe" | "braintree"; + external_plan_id: string; + }; + Feature: { + feature_id: string; + feature_name: string; + feature_description: string; + }; + FeatureAccessPerSubscription: { + subscription: components["schemas"]["AccessMethodsSubscriptionRecord"]; + access: boolean; + }; + FeatureAccessResponse: { + customer: components["schemas"]["LightweightCustomer"]; + /** @description Whether or not the customer has access to this feature. The default behavior for this is whether any of the customer's plans have access to this feature. If you have specified subscription filters, then this will be whether any of the customer's plans that match the subscription filters have access to this feature. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend. */ + access: boolean; + feature: components["schemas"]["Feature"]; + access_per_subscription: components["schemas"]["FeatureAccessPerSubscription"][]; + }; + FeatureCreateRequest: { + feature_name: string; + feature_description?: string; + }; + FeatureDetail: { + feature_id: string; + feature_name: string; + feature_description: string; + }; + GetEventAccess: { + /** @description The plan_id of the plan we are checking that has access to this feature. */ + plan_id: string; + /** @description The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. */ + subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; + /** @description The usage of each component of the plan the customer is on. Only components that match the request will be included: If metric_id is provided, this will be a list of length 1. If event_name is provided, this will be a list of length 1 or more depending on how many components of the customer's plan use this event. */ + usage_per_component: components["schemas"]["ComponentUsage"][]; + }; + GetFeatureAccess: { + /** @description Name of the feature to check access for. */ + feature_name: string; + /** @description The plan_id of the plan we are checking that has access to this feature. */ + plan_id: string; + /** @description The subscription filters that are applied to this plan's relationship with the customer. If your billing model does not have the ability multiple plans or subscriptions per customer, this is likely not relevant for you. */ + subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; + /** @description Whether or not the plan has access to this feature. If your customer can have multiple plans or subscriptions, then you must check the 'access' across all returned plans to determine if the customer can access this feature. */ + access: boolean; + }; + ImportCustomerFailure: { + /** @enum {string} */ + status: "error"; + detail: string; }; - PatchedPlanUpdateRequest: { - /** @description Name of the plan */ - plan_name?: string; - /** @description Description of the plan */ - plan_description?: string; - taxjar_code?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; + ImportCustomerSuccess: { + /** @enum {string} */ + status: "success"; + detail: string; }; - PatchedPlanVersionUpdateRequest: { - localized_name?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; + ImportCustomersRequestRequest: { + /** @enum {string} */ + source: "stripe" | "braintree"; }; - PaymentProcesorPostDataRequest: { + ImportPaymentObjectFailure: { /** @enum {string} */ - payment_processor: "stripe" | "braintree"; - data: { - [key: string]: Record | undefined; - }; + status: "error"; + detail: string; }; - PaymentProcesorPostRequestRequest: { - pp_info: components["schemas"]["PaymentProcesorPostDataRequest"]; + ImportPaymentObjectSuccess: { + /** @enum {string} */ + status: "success"; + detail: string; }; - PaymentProcesorPostResponse: { + ImportPaymentObjectsRequestRequest: { /** @enum {string} */ - payment_processor: "stripe" | "braintree"; - success: boolean; - details: string; + source: "stripe" | "braintree"; }; - PeriodMetricRevenueResponse: { - /** Format: double */ - total_revenue_period_1: number; - /** Format: double */ - total_revenue_period_2: number; - /** Format: double */ - earned_revenue_period_1: number; - /** Format: double */ - earned_revenue_period_2: number; + InitResetPasswordSuccess: { + email: string; }; - PeriodMetricUsageResponse: { - metrics: { - [key: string]: - | components["schemas"]["PeriodSingleMetricUsage"] - | undefined; - }; + InitialAddOnVersionCreateRequest: { + currency_code: string; + /** @enum {unknown} */ + invoice_when: "invoice_on_attach" | "invoice_on_subscription_end"; + /** @enum {unknown} */ + billing_frequency: "one_time" | "recurring"; + features?: string[]; + components?: components["schemas"]["PlanComponentCreateRequest"][]; + recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; }; - PeriodSingleMetricUsage: { - data: components["schemas"]["DayMetricUsage"][]; + InitialExternalPlanLink: { + /** @enum {string} */ + source: "stripe" | "braintree"; + external_plan_id: string; }; - PeriodSubscriptionsResponse: { - period_1_total_subscriptions: number; - period_1_new_subscriptions: number; - period_2_total_subscriptions: number; - period_2_new_subscriptions: number; + InitialExternalPlanLinkRequest: { + /** @enum {string} */ + source: "stripe" | "braintree"; + external_plan_id: string; }; - Plan: { - plan_id: string; - /** @description Name of the plan */ - plan_name: string; + InitialPlanVersionCreateRequest: { + price_adjustment?: components["schemas"]["PriceAdjustmentRequest"]; + /** @default false */ + make_active?: boolean; /** - * @description Duration of the plan - * @enum {string|null} + * @default replace_on_renewal + * @enum {string} */ - plan_duration: "monthly" | "quarterly" | "yearly" | "" | null; - /** @description Description of the plan */ - plan_description: string; - /** @description The external links that this plan has. */ - external_links: components["schemas"]["InitialExternalPlanLink"][]; - /** @description The number of versions that this plan has. */ - num_versions: number; - /** @description The number of active subscriptions that this plan has across all versions. */ - active_subscriptions: number; - /** @description The tags that this plan has. */ - tags: readonly string[]; - /** @description This plan's versions. */ - versions: components["schemas"]["PlanVersion"][]; + make_active_type?: "replace_on_renewal" | "grandfather"; + version: number; + currency_code: string; + day_anchor?: number; + localized_name?: string; + features?: string[]; + components?: components["schemas"]["PlanComponentCreateRequest"][]; + recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; + target_customer_ids?: string[]; + month_anchor?: number; + }; + InviteLinkResponse: { + /** Format: email */ + email: string; + /** Format: uri */ + link: string; + }; + InviteRequestRequest: { + /** Format: email */ + email: string; + }; + InviteResponse: { + /** Format: email */ + email: string; + }; + Invoice: { + invoice_id: string; + invoice_number: string; /** + * Format: double * @deprecated - * @description [DEPRECATED] The parent plan that this plan has. */ - parent_plan: components["schemas"]["PlanNameAndID"] | null; + cost_due: number; + /** Format: double */ + amount: number; + currency: components["schemas"]["PricingUnit"]; + /** Format: date-time */ + issue_date: string; + /** @enum {unknown} */ + payment_status: "draft" | "voided" | "paid" | "unpaid"; + external_payment_obj_id: string; + /** @enum {string|null} */ + external_payment_obj_type: "stripe" | "braintree" | "" | null; + line_items: components["schemas"]["InvoiceLineItem"][]; + customer: components["schemas"]["LightweightCustomerSerializerForInvoice"]; + /** Format: date-time */ + due_date: string; + /** Format: date */ + start_date: string; + /** Format: date */ + end_date: string; + seller: components["schemas"]["Seller"]; + /** Format: uri */ + invoice_pdf: string; + }; + InvoiceCreatedRequest: { + payload: components["schemas"]["InvoiceRequest"]; + }; + InvoiceDetail: { + invoice_id: string; + invoice_number: string; /** + * Format: double * @deprecated - * @description [DEPRECATED] The target customer that this plan has. */ - target_customer: components["schemas"]["LightweightCustomer"] | null; + cost_due: number; + /** Format: double */ + amount: number; + currency: components["schemas"]["PricingUnit"]; + /** Format: date-time */ + issue_date: string; + /** @enum {unknown} */ + payment_status: "draft" | "voided" | "paid" | "unpaid"; + external_payment_obj_id: string; + /** @enum {string|null} */ + external_payment_obj_type: "stripe" | "braintree" | "" | null; + line_items: components["schemas"]["InvoiceLineItem"][]; + customer: components["schemas"]["LightweightCustomerSerializerForInvoice"]; + /** Format: date-time */ + due_date: string; + /** Format: date */ + start_date: string; + /** Format: date */ + end_date: string; + seller: components["schemas"]["Seller"]; + /** Format: uri */ + invoice_pdf: string; + }; + InvoiceLineItem: { + name: string; + /** Format: date-time */ + start_date: string; + /** Format: date-time */ + end_date: string; + /** Format: double */ + quantity: number; + /** @enum {string|null} */ + billing_type: + | "in_arrears" + | "intermediate" + | "in_advance" + | "one_time" + | "" + | null; + metadata: { + [key: string]: Record | undefined; + } | null; + plan: components["schemas"]["LightweightPlanVersion"] | null; + subscription_filters: readonly components["schemas"]["SubscriptionCategoricalFilter"][]; + /** + * Format: double + * @description Base price of the line item. This is the price before any adjustments are applied. + */ + base: number; + adjustments: readonly components["schemas"]["InvoiceLineItemAdjustment"][]; + /** + * Format: double + * @description Amount of the line item. This is the price after any adjustments are applied. + */ + amount: number; + /** + * Format: double + * @deprecated + */ + subtotal: number; + }; + InvoiceLineItemAdjustment: { + /** Format: decimal */ + amount: string; + account: string; + /** @enum {unknown} */ + adjustment_type: "sales_tax" | "plan_adjustment"; + }; + InvoiceLineItemRequest: { + name: string; + /** Format: date-time */ + start_date: string; + /** Format: date-time */ + end_date: string; + /** Format: double */ + quantity: number; + /** @enum {string|null} */ + billing_type: + | "in_arrears" + | "intermediate" + | "in_advance" + | "one_time" + | "" + | null; + metadata: { + [key: string]: Record | undefined; + } | null; + /** + * Format: double + * @description Base price of the line item. This is the price before any adjustments are applied. + */ + base: number; + /** + * Format: double + * @description Amount of the line item. This is the price after any adjustments are applied. + */ + amount: number; /** + * Format: double * @deprecated - * @description [DEPRECATED] Display version has been deprecated. Use 'versions' instead. We will still return this field for now with some heuristics for figuring out what the desired version is, but it will be removed in the near future. */ - display_version: components["schemas"]["PlanVersion"]; + subtotal: number; + }; + InvoicePaidRequest: { + payload: components["schemas"]["InvoiceRequest"]; + }; + InvoicePastDueRequest: { + payload: components["schemas"]["InvoiceRequest"]; + }; + InvoiceRequest: { + invoice_id: string; /** + * Format: double * @deprecated - * @description [DEPRECATED] The status of this plan. */ - status: string; - }; - PlanComponent: { - billable_metric: components["schemas"]["Metric"]; - tiers: components["schemas"]["PriceTier"][]; - pricing_unit: components["schemas"]["PricingUnit"]; - /** @enum {string|null} */ - invoicing_interval_unit: "day" | "week" | "month" | "year" | "" | null; - invoicing_interval_count: number; + cost_due: number; + currency: components["schemas"]["PricingUnitRequest"]; /** @enum {string|null} */ - reset_interval_unit: "day" | "week" | "month" | "year" | "" | null; - reset_interval_count: number; - prepaid_charge: components["schemas"]["ComponentCharge"] | null; + external_payment_obj_type: "stripe" | "braintree" | "" | null; + line_items: components["schemas"]["InvoiceLineItemRequest"][]; + seller: components["schemas"]["SellerRequest"]; }; - PlanComponentCreateRequest: { - /** Format: uuid */ - metric_id: string; - tiers?: components["schemas"]["PriceTierCreateRequest"][]; - /** @enum {string|null} */ - invoicing_interval_unit?: "day" | "week" | "month" | "year" | "" | null; - invoicing_interval_count?: number; - /** @enum {string|null} */ - reset_interval_unit?: "day" | "week" | "month" | "year" | "" | null; - reset_interval_count?: number; - prepaid_charge?: - | components["schemas"]["ComponentChargeCreateRequest"] - | null; + InvoiceUpdate: { + /** @enum {string} */ + payment_status: "paid" | "unpaid"; }; - PlanCreateRequest: { - /** @description Name of the plan */ - plan_name: string; - /** @description Description of the plan */ - plan_description?: string; + LightweightAddOn: { + /** @description The name of the add-on plan. */ + addon_name: string; + /** @description The ID of the add-on plan. */ + addon_id: string; + /** @enum {string} */ + addon_type: "flat" | "usage_based"; + /** @enum {unknown} */ + billing_frequency: "one_time" | "recurring"; + }; + LightweightAddOnRequest: { + /** @description The name of the add-on plan. */ + addon_name: string; + /** @description The ID of the add-on plan. */ + addon_id: string; + }; + LightweightAddOnSubscriptionRecord: { + addon_subscription_id: string; /** - * @description Duration of the plan - * @enum {string|null} + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ - plan_duration?: "monthly" | "quarterly" | "yearly" | "" | null; - initial_external_links?: components["schemas"]["InitialExternalPlanLinkRequest"][]; - initial_version: components["schemas"]["InitialPlanVersionCreateRequest"]; - tags?: components["schemas"]["TagRequest"][]; - }; - PlanDetail: { - /** @description Name of the plan */ - plan_name: string; - versions: readonly components["schemas"]["PlanVersionDetail"][]; + start_date: string; /** - * @description Duration of the plan - * @enum {string|null} + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ - plan_duration: "monthly" | "quarterly" | "yearly" | "" | null; - /** @description The tags that this plan has. */ - tags: readonly components["schemas"]["Tag"][]; - /** @description Description of the plan */ - plan_description: string; - taxjar_code?: string; - /** @description The number of versions that this plan has. */ - num_versions: number; - /** @description The number of active subscriptions that this plan has across all versions. */ - active_subscriptions: number; - plan_id: string; - /** @description The external links that this plan has. */ - external_links: components["schemas"]["InitialExternalPlanLink"][]; - }; - PlanNameAndID: { - /** @description Name of the plan */ - plan_name: string; - plan_id: string; + end_date: string; + addon: components["schemas"]["LightweightAddOn"]; + fully_billed: boolean; }; - PlanRepresentation: { - plan_name: string; - plan_id: string; - /** Format: double */ - plan_revenue: number; + LightweightAddOnSubscriptionRecordRequest: { + addon_subscription_id: string; + addon: components["schemas"]["LightweightAddOnRequest"]; }; - PlanUpdate: { - /** @description Name of the plan */ - plan_name?: string; - /** @description Description of the plan */ - plan_description?: string; - taxjar_code?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; + LightweightCustomer: { + /** @description The display name of the customer */ + customer_name: string; + /** + * Format: email + * @description The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider + */ + email: string; + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + customer_id: string; }; - PlanVersion: { - recurring_charges: readonly components["schemas"]["RecurringCharge"][]; - components: components["schemas"]["PlanComponent"][]; - features: components["schemas"]["Feature"][]; - price_adjustment: components["schemas"]["PriceAdjustment"] | null; - version: number | "custom_version"; - /** @enum {string} */ - status: - | "active" - | "retiring" - | "grandfathered" - | "deleted" - | "inactive" - | "not_started"; - plan_name: string; - currency: components["schemas"]["PricingUnit"]; - /** Format: date-time */ - active_from: string; - /** Format: date-time */ - active_to: string; - localized_name: string; - /** @deprecated */ - usage_billing_frequency: string; + LightweightCustomerSerializerForInvoice: { + /** @description The display name of the customer */ + customer_name: string; /** - * @deprecated - * @enum {string} + * Format: email + * @description The primary email address of the customer, must be the same as the email address used to create the customer in the payment provider */ - flat_fee_billing_type: "in_advance" | "in_arrears"; + email: string; + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + customer_id: string; + address?: components["schemas"]["Address"] | null; + }; + LightweightInvoice: { + external_payment_obj_id: string; + invoice_number: string; + invoice_id: string; + /** Format: date-time */ + issue_date: string; + /** @enum {unknown} */ + payment_status: "draft" | "voided" | "paid" | "unpaid"; + currency: components["schemas"]["PricingUnit"]; + seller: components["schemas"]["Seller"]; + /** Format: double */ + amount: number; /** * Format: double * @deprecated */ - flat_rate: number; - /** @deprecated */ - description: string; + cost_due: number; + /** Format: date */ + start_date: string; + /** Format: uri */ + invoice_pdf: string; + /** @enum {string|null} */ + external_payment_obj_type: "stripe" | "braintree" | "" | null; + /** Format: date */ + end_date: string; + /** Format: date-time */ + due_date: string; }; - PlanVersionCreateRequest: { - /** Format: uuid */ - plan_id: string; - recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; - components?: components["schemas"]["PlanComponentCreateRequest"][]; - features?: string[]; - price_adjustment?: components["schemas"]["PriceAdjustmentRequest"]; - day_anchor?: number; - month_anchor?: number; - currency_code: string; - version: number; - target_customer_ids?: string[]; - localized_name?: string; + LightweightMetric: { + metric_id: string; + /** @description Name of the event that this metric is tracking. */ + event_name: string; + metric_name: string; }; - PlanVersionDetail: { - replace_with: components["schemas"]["LightweightPlanVersion"]; - plan_name: string; - /** Format: date-time */ - active_from: string; - recurring_charges: readonly components["schemas"]["RecurringCharge"][]; - localized_name: string; - /** Format: date-time */ - active_to: string; - features: components["schemas"]["Feature"][]; - plan_id: string; - version_id: string; - currency: components["schemas"]["PricingUnit"]; - components: components["schemas"]["PlanComponent"][]; - version: number | "custom_version"; - alerts: readonly components["schemas"]["UsageAlert"][]; - active_subscriptions: number; - transition_to: components["schemas"]["LightweightPlan"]; + LightweightOrganization: { + organization_id: string; + organization_name: string; /** @enum {string} */ - status: - | "active" - | "retiring" - | "grandfathered" - | "deleted" - | "inactive" - | "not_started"; - price_adjustment: components["schemas"]["PriceAdjustment"] | null; + organization_type: + | "Production" + | "Development" + | "Demo" + | "Internal Demo"; + current: boolean; + }; + LightweightPlan: { + /** @description Name of the plan */ + plan_name: string; + plan_id: string; }; - PlanVersionHistoricalSubscription: { - customer_id: string; - customer_name: string; + LightweightPlanVersion: { + plan_name: string; + plan_id: string; + version_id: string; + version: number | "custom_version"; + }; + LightweightPlanVersionRequest: { + plan_id: string; + }; + LightweightSubscriptionRecord: { + billing_plan: components["schemas"]["LightweightPlanVersion"]; + fully_billed: boolean; + /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ + is_new: boolean; + addons: components["schemas"]["LightweightAddOnSubscriptionRecord"][]; + customer: components["schemas"]["LightweightCustomer"]; + subscription_id: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew: boolean; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ start_date: string; + subscription_filters: readonly components["schemas"]["SubscriptionCategoricalFilter"][]; + plan_detail: components["schemas"]["LightweightPlanVersion"]; /** * Format: date-time * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. */ end_date: string; + metadata: { + [key: string]: Record | undefined; + }; + }; + LightweightSubscriptionRecordRequest: { + billing_plan: components["schemas"]["LightweightPlanVersionRequest"]; + /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ + is_new: boolean; + addons: components["schemas"]["LightweightAddOnSubscriptionRecordRequest"][]; + subscription_id: string; /** @description Whether the subscription automatically renews. Defaults to true. */ auto_renew: boolean; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + metadata: { + [key: string]: Record | undefined; + }; }; - PlanVersionNumberSetReplaceWithResponse: { - success: boolean; - message: string; + LightweightUser: { + /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ + username: string; + /** Format: email */ + email: string; }; - PlanVersionNumberSetTransitionToResponse: { + LoginFailure: { + detail: string; + }; + LoginRequestRequest: { + username: string; + password: string; + }; + LoginSuccess: { + detail: string; + token: string; + user: components["schemas"]["User"]; + }; + LogoutFailure: { + detail: string; + }; + LogoutSuccess: { + detail: string; + }; + MakePublicRequestRequest: { + version: number; + }; + MakePublicResponse: { success: boolean; message: string; }; - PlanVersionUpdate: { - localized_name?: string; - /** Format: date-time */ - active_from?: string; - /** Format: date-time */ - active_to?: string; - }; - PlansByNumCustomers: { - results: components["schemas"]["SinglePlanNumCustomers"][]; - /** @enum {string} */ - status: "success"; + MakeReplaceWithRequest: { + /** @description The plan versions that will get replaced by the current version. */ + versions_to_replace: string[]; }; - PlansSetReplaceWithForVersionNumberRequest: { - /** @description The version number of the plan that will replace the current version. */ - replacement_version_number: number; + MakeReplaceWithResponse: { + success: boolean; + message: string; }; - PlansSetTransitionToForVersionNumberRequest: { - /** @description The plan that the current version will transition to. */ - transition_to_plan_id: number; + Metric: { + metric_id: string; + /** @description Name of the event that this metric is tracking. */ + event_name: string; + /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ + property_name: string; + aggregation_type: string; + /** + * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. + * @enum {string|null} + */ + granularity: + | "seconds" + | "minutes" + | "hours" + | "days" + | "months" + | "quarters" + | "years" + | "total" + | "" + | null; + /** + * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. + * @enum {string|null} + */ + event_type: "delta" | "total" | "" | null; + /** + * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. + * @enum {string} + */ + metric_type: "counter" | "rate" | "custom" | "gauge"; + metric_name: string; + numeric_filters: components["schemas"]["NumericFilter"][]; + categorical_filters: components["schemas"]["CategoricalFilter"][]; + /** @description Whether or not this metric is a cost metric (used to track costs to your business). */ + is_cost_metric: boolean; + /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ + custom_sql: string; + /** + * @description The proration of the metric. Only applies to metrics of type 'gauge'. + * @enum {string|null} + */ + proration: + | "seconds" + | "minutes" + | "hours" + | "days" + | "months" + | "quarters" + | "years" + | "total" + | "" + | null; }; - PriceAdjustment: { - price_adjustment_name: string; - price_adjustment_description: string; - /** @enum {string} */ - price_adjustment_type: "percentage" | "fixed" | "price_override"; - /** Format: double */ - price_adjustment_amount: number; + MetricAccessPerSubscription: { + subscription: components["schemas"]["AccessMethodsSubscriptionRecord"]; + /** + * Format: double + * @description The current usage of the metric. Keep in mind the current usage of the metric can be different from the billable usage of the metric. For examnple, for a gauge metric, the `metric_usage` is the current value of the gauge, while the billable usage is the accumulated tiem at each gauge level at the end of the subscription. + */ + metric_usage: number; + /** + * Format: double + * @description If you specified a free tier of usage for this metric, this is the amount of usage that is free. Will be 0 if you didn't specify a free limit for this metric or this subscription doesn't have access to this metric, and null if the free tier is unlimited. + */ + metric_free_limit: number; + /** + * Format: double + * @description The total limit of the metric. Will be 0 if this subscription doesn't have access to this metric, and null if there is no limit to this metric. + */ + metric_total_limit: number; }; - PriceAdjustmentRequest: { - /** @default */ - price_adjustment_name?: string; - price_adjustment_description?: string; - /** @enum {string} */ - price_adjustment_type: "percentage" | "fixed" | "price_override"; - /** Format: double */ - price_adjustment_amount: number; + MetricAccessResponse: { + customer: components["schemas"]["LightweightCustomer"]; + /** @description Whether or not the customer has access to this metric. The default behavior for this is whether all of the customer's plans (that have access to the metric) are below the total limit of the metric. If you have specified subscription filters, then this will be whether all of the customer's plans that match the subscription filters are below the total limit of the metric. You can customize the behavior of this flag by setting a policy in your Organization settings in the frontend. */ + access: boolean; + metric: components["schemas"]["LightweightMetric"]; + access_per_subscription: components["schemas"]["MetricAccessPerSubscription"][]; }; - PriceTier: { - /** @enum {unknown} */ - type: "flat" | "per_unit" | "free"; - /** Format: double */ - range_start: number; - /** Format: double */ - range_end: number; - /** Format: double */ - cost_per_batch: number; - /** Format: double */ - metric_units_per_batch: number; - /** @enum {unknown|null} */ - batch_rounding_type: - | "round_up" - | "round_down" - | "round_nearest" - | "no_rounding" + MetricCreateRequest: { + /** @description Name of the event that this metric is tracking. */ + event_name?: string; + /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ + property_name?: string; + /** + * @description The type of aggregation that should be used for this metric. Please refer to our documentation for an explanation of the different types. + * @enum {string|null} + */ + usage_aggregation_type?: + | "count" + | "sum" + | "max" + | "unique" + | "latest" + | "average" + | "" + | null; + /** @enum {string|null} */ + billable_aggregation_type?: + | "count" + | "sum" + | "max" + | "unique" + | "latest" + | "average" + | "" + | null; + /** + * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. + * @enum {string|null} + */ + granularity?: + | "seconds" + | "minutes" + | "hours" + | "days" + | "months" + | "quarters" + | "years" + | "total" + | "" + | null; + /** + * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. + * @enum {string|null} + */ + event_type?: "delta" | "total" | "" | null; + /** + * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. + * @enum {string} + */ + metric_type: "counter" | "rate" | "custom" | "gauge"; + metric_name: string; + /** + * @description The proration of the metric. Only applies to metrics of type 'gauge'. + * @enum {string|null} + */ + proration?: + | "seconds" + | "minutes" + | "hours" + | "days" + | "months" + | "quarters" + | "years" + | "total" | "" | null; + properties?: { + [key: string]: Record | undefined; + } | null; + /** + * @description Whether or not this metric is a cost metric (used to track costs to your business). + * @default false + */ + is_cost_metric?: boolean; + /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ + custom_sql?: string; + categorical_filters?: components["schemas"]["CategoricalFilterDetailRequest"][]; + numeric_filters?: components["schemas"]["NumericFilterDetailRequest"][]; }; - PriceTierCreateRequest: { - /** @enum {string} */ - type: "flat" | "per_unit" | "free"; - /** Format: double */ - range_start: number; - /** Format: double */ - range_end?: number; - /** Format: double */ - cost_per_batch?: number; - /** Format: double */ - metric_units_per_batch?: number; + MetricDetail: { + /** @description Name of the event that this metric is tracking. */ + event_name: string; /** - * @default no_rounding + * @description The type of metric that this is. Please refer to our documentation for an explanation of the different types. + * @enum {string} + */ + metric_type: "counter" | "rate" | "custom" | "gauge"; + categorical_filters: components["schemas"]["CategoricalFilter"][]; + /** + * @description The granularity of the metric. Only applies to metrics of type 'gauge' or 'rate'. * @enum {string|null} */ - batch_rounding_type?: - | "round_up" - | "round_down" - | "round_nearest" - | "no_rounding" + granularity: + | "seconds" + | "minutes" + | "hours" + | "days" + | "months" + | "quarters" + | "years" + | "total" | "" | null; - }; - PricingUnit: { - code: string; - name: string; - symbol: string; - }; - PricingUnitDetail: { - code: string; - name: string; - symbol: string; - }; - PricingUnitDetailRequest: { - code: string; - name: string; - symbol: string; - }; - PricingUnitRequest: { - code: string; - name: string; - symbol: string; - }; - RecurringCharge: { - name: string; - /** @enum {string} */ - charge_timing: "in_advance" | "in_arrears"; - /** @enum {string} */ - charge_behavior: "prorate" | "full"; - /** Format: double */ - amount: number; - pricing_unit: components["schemas"]["PricingUnit"]; - /** @enum {string|null} */ - invoicing_interval_unit: "day" | "week" | "month" | "year" | "" | null; - invoicing_interval_count: number; - /** @enum {string|null} */ - reset_interval_unit: "day" | "week" | "month" | "year" | "" | null; - reset_interval_count: number; - }; - RecurringChargeCreateRequest: { - name: string; - /** @enum {string} */ - charge_timing: "in_advance" | "in_arrears"; /** - * @default prorate - * @enum {string} + * @description Used only for metrics of type 'gauge'. Please refer to our documentation for an explanation of the different types. + * @enum {string|null} */ - charge_behavior?: "prorate" | "full"; - /** Format: double */ - amount: number; - pricing_unit_code?: string; - /** @enum {string|null} */ - invoicing_interval_unit?: "day" | "week" | "month" | "year" | "" | null; - invoicing_interval_count?: number; - /** @enum {string|null} */ - reset_interval_unit?: "day" | "week" | "month" | "year" | "" | null; - reset_interval_count?: number; - }; - RegistrationDetailRequest: { - organization_name: string; - industry: string; - email: string; - password: string; - username: string; - }; - RegistrationFailure: { - detail: string; - }; - RegistrationRequest: { - register: components["schemas"]["RegistrationDetailRequest"]; - }; - RegistrationSuccess: { - detail: string; - token: string; - user: components["schemas"]["User"]; - }; - RemovePlanTags: { - tags?: components["schemas"]["Tag"][]; - success: boolean; - message: string; - }; - RemovePlanTagsRequest: { - tags?: components["schemas"]["TagRequest"][]; - }; - RemoveTargetCustomerResponse: { - success: boolean; - message: string; - }; - ResetPasswordRequestRequest: { - userId: string; - password: string; - token: string; - }; - ResetPasswordSuccess: { - detail: string; - token: string; - }; - RevenueDate: { - /** Format: date */ - date: string; - /** Format: double */ - original_plan_revenue: number; - /** Format: double */ - new_plan_revenue: number; - }; - Seller: { - name: string; - address?: components["schemas"]["Address"] | null; - phone?: string; - /** Format: email */ - email?: string; - }; - SellerRequest: { - name: string; - phone?: string; - /** Format: email */ - email?: string; - }; - SessionSuccess: { - isAuthenticated: boolean; - }; - SetPlanTagsRequest: { - tags?: components["schemas"]["TagRequest"][]; - }; - SetPlanTagsResponse: { - tags?: components["schemas"]["Tag"][]; - success: boolean; - message: string; - }; - SetReplaceWithRequest: { + event_type: "delta" | "total" | "" | null; + /** @description Whether or not this metric is a cost metric (used to track costs to your business). */ + is_cost_metric: boolean; + metric_name: string; + metric_id: string; + /** @description A custom SQL query that can be used to define the metric. Please refer to our documentation for more information. */ + custom_sql: string; + /** @description The name of the property of the event that should be used for this metric. Doesn't apply if the metric is of type 'counter' with an aggregation of count. */ + property_name: string; /** - * Format: uuid - * @description The plan version to replace the current version with. + * @description The proration of the metric. Only applies to metrics of type 'gauge'. + * @enum {string|null} */ - replace_with: string; - }; - SetReplaceWithResponse: { - success: boolean; - message: string; + proration: + | "seconds" + | "minutes" + | "hours" + | "days" + | "months" + | "quarters" + | "years" + | "total" + | "" + | null; + numeric_filters: components["schemas"]["NumericFilter"][]; + /** + * @description The type of aggregation that should be used for this metric. Please refer to our documentation for an explanation of the different types. + * @enum {string} + */ + usage_aggregation_type?: + | "count" + | "sum" + | "max" + | "unique" + | "latest" + | "average"; + /** @enum {string|null} */ + billable_aggregation_type?: + | "count" + | "sum" + | "max" + | "unique" + | "latest" + | "average" + | "" + | "" + | null; }; - SingleCustomerValue: { - customer_id: string; - customer_name: string; - /** Format: double */ - value: number; + MetricRequest: { + metric_id: string; + aggregation_type: string; + metric_name: string; + numeric_filters: components["schemas"]["NumericFilterRequest"][]; + categorical_filters: components["schemas"]["CategoricalFilterRequest"][]; }; - SingleDayCostAnalysis: { - /** Format: date */ - date: string; - cost_data: components["schemas"]["SingleMetricCost"][]; + MetricRevenue: { + metric_name: string; /** Format: double */ - revenue: number; - }; - SingleMetricCost: { - metric: components["schemas"]["MetricDetail"]; + original_plan_revenue: number; /** Format: double */ - cost: number; + new_plan_revenue: number; }; - SinglePaymentProcesor: { - payment_provider_name: string; - connected: boolean; - /** Format: uri */ - redirect_url: string; - self_hosted: boolean; - connection_id: string; - working: boolean; - account_id: string; + MetricUpdate: { + billable_metric_name?: string; + /** @enum {string} */ + status?: "active" | "archived"; }; - SinglePlanNumCustomers: { - plan_name: string; - num_customers: number; - /** Format: double */ - percent_total: number; + NextPlanVersionNumberResponse: { + version: number; }; - SingleSubstitution: { - substitution_name: string; - original_plan: components["schemas"]["PlanRepresentation"]; - new_plan: components["schemas"]["PlanRepresentation"]; + NumericFilter: { + property_name: string; + /** @enum {string} */ + operator: "gte" | "gt" | "eq" | "lt" | "lte"; /** Format: double */ - pct_revenue_change: number; - results: components["schemas"]["SingleSubstitutionResults"]; - }; - SingleSubstitutionResults: { - cumulative_revenue: components["schemas"]["RevenueDate"][]; - revenue_by_metric: components["schemas"]["MetricRevenue"][]; - top_customers: components["schemas"]["TopCustomers"]; + comparison_value: number; }; - SubscriptionCategoricalFilter: { - value: string; - /** @description The string name of the property to filter on. Example: 'product_id' */ + NumericFilterDetailRequest: { property_name: string; + /** @enum {string} */ + operator: "gte" | "gt" | "eq" | "lt" | "lte"; + /** Format: double */ + comparison_value: number; }; - SubscriptionCategoricalFilterDetail: { - value: string; - /** @description The string name of the property to filter on. Example: 'product_id' */ + NumericFilterRequest: { property_name: string; + /** @enum {string} */ + operator: "gte" | "gt" | "eq" | "lt" | "lte"; + /** Format: double */ + comparison_value: number; }; - SubscriptionCategoricalFilterRequest: { - value: string; - /** @description The string name of the property to filter on. Example: 'product_id' */ - property_name: string; + Organization: { + organization_id: string; + organization_name: string; + users: readonly components["schemas"]["OrganizationUser"][]; + default_currency: components["schemas"]["PricingUnitDetail"]; + available_currencies: readonly components["schemas"]["PricingUnitDetail"][]; + plan_tags: readonly components["schemas"]["Tag"][]; + /** + * Format: double + * @description Tax rate as percentage. For example, 10.5 for 10.5% + */ + tax_rate?: number; + payment_grace_period: number; + linked_organizations: readonly components["schemas"]["LightweightOrganization"][]; + current_user: components["schemas"]["LightweightUser"]; + address: components["schemas"]["Address"] | null; + team_name: string; + subscription_filter_keys: readonly string[]; + /** @enum {string} */ + timezone: + | "Africa/Abidjan" + | "Africa/Accra" + | "Africa/Addis_Ababa" + | "Africa/Algiers" + | "Africa/Asmara" + | "Africa/Bamako" + | "Africa/Bangui" + | "Africa/Banjul" + | "Africa/Bissau" + | "Africa/Blantyre" + | "Africa/Brazzaville" + | "Africa/Bujumbura" + | "Africa/Cairo" + | "Africa/Casablanca" + | "Africa/Ceuta" + | "Africa/Conakry" + | "Africa/Dakar" + | "Africa/Dar_es_Salaam" + | "Africa/Djibouti" + | "Africa/Douala" + | "Africa/El_Aaiun" + | "Africa/Freetown" + | "Africa/Gaborone" + | "Africa/Harare" + | "Africa/Johannesburg" + | "Africa/Juba" + | "Africa/Kampala" + | "Africa/Khartoum" + | "Africa/Kigali" + | "Africa/Kinshasa" + | "Africa/Lagos" + | "Africa/Libreville" + | "Africa/Lome" + | "Africa/Luanda" + | "Africa/Lubumbashi" + | "Africa/Lusaka" + | "Africa/Malabo" + | "Africa/Maputo" + | "Africa/Maseru" + | "Africa/Mbabane" + | "Africa/Mogadishu" + | "Africa/Monrovia" + | "Africa/Nairobi" + | "Africa/Ndjamena" + | "Africa/Niamey" + | "Africa/Nouakchott" + | "Africa/Ouagadougou" + | "Africa/Porto-Novo" + | "Africa/Sao_Tome" + | "Africa/Tripoli" + | "Africa/Tunis" + | "Africa/Windhoek" + | "America/Adak" + | "America/Anchorage" + | "America/Anguilla" + | "America/Antigua" + | "America/Araguaina" + | "America/Argentina/Buenos_Aires" + | "America/Argentina/Catamarca" + | "America/Argentina/Cordoba" + | "America/Argentina/Jujuy" + | "America/Argentina/La_Rioja" + | "America/Argentina/Mendoza" + | "America/Argentina/Rio_Gallegos" + | "America/Argentina/Salta" + | "America/Argentina/San_Juan" + | "America/Argentina/San_Luis" + | "America/Argentina/Tucuman" + | "America/Argentina/Ushuaia" + | "America/Aruba" + | "America/Asuncion" + | "America/Atikokan" + | "America/Bahia" + | "America/Bahia_Banderas" + | "America/Barbados" + | "America/Belem" + | "America/Belize" + | "America/Blanc-Sablon" + | "America/Boa_Vista" + | "America/Bogota" + | "America/Boise" + | "America/Cambridge_Bay" + | "America/Campo_Grande" + | "America/Cancun" + | "America/Caracas" + | "America/Cayenne" + | "America/Cayman" + | "America/Chicago" + | "America/Chihuahua" + | "America/Ciudad_Juarez" + | "America/Costa_Rica" + | "America/Creston" + | "America/Cuiaba" + | "America/Curacao" + | "America/Danmarkshavn" + | "America/Dawson" + | "America/Dawson_Creek" + | "America/Denver" + | "America/Detroit" + | "America/Dominica" + | "America/Edmonton" + | "America/Eirunepe" + | "America/El_Salvador" + | "America/Fort_Nelson" + | "America/Fortaleza" + | "America/Glace_Bay" + | "America/Goose_Bay" + | "America/Grand_Turk" + | "America/Grenada" + | "America/Guadeloupe" + | "America/Guatemala" + | "America/Guayaquil" + | "America/Guyana" + | "America/Halifax" + | "America/Havana" + | "America/Hermosillo" + | "America/Indiana/Indianapolis" + | "America/Indiana/Knox" + | "America/Indiana/Marengo" + | "America/Indiana/Petersburg" + | "America/Indiana/Tell_City" + | "America/Indiana/Vevay" + | "America/Indiana/Vincennes" + | "America/Indiana/Winamac" + | "America/Inuvik" + | "America/Iqaluit" + | "America/Jamaica" + | "America/Juneau" + | "America/Kentucky/Louisville" + | "America/Kentucky/Monticello" + | "America/Kralendijk" + | "America/La_Paz" + | "America/Lima" + | "America/Los_Angeles" + | "America/Lower_Princes" + | "America/Maceio" + | "America/Managua" + | "America/Manaus" + | "America/Marigot" + | "America/Martinique" + | "America/Matamoros" + | "America/Mazatlan" + | "America/Menominee" + | "America/Merida" + | "America/Metlakatla" + | "America/Mexico_City" + | "America/Miquelon" + | "America/Moncton" + | "America/Monterrey" + | "America/Montevideo" + | "America/Montserrat" + | "America/Nassau" + | "America/New_York" + | "America/Nome" + | "America/Noronha" + | "America/North_Dakota/Beulah" + | "America/North_Dakota/Center" + | "America/North_Dakota/New_Salem" + | "America/Nuuk" + | "America/Ojinaga" + | "America/Panama" + | "America/Paramaribo" + | "America/Phoenix" + | "America/Port-au-Prince" + | "America/Port_of_Spain" + | "America/Porto_Velho" + | "America/Puerto_Rico" + | "America/Punta_Arenas" + | "America/Rankin_Inlet" + | "America/Recife" + | "America/Regina" + | "America/Resolute" + | "America/Rio_Branco" + | "America/Santarem" + | "America/Santiago" + | "America/Santo_Domingo" + | "America/Sao_Paulo" + | "America/Scoresbysund" + | "America/Sitka" + | "America/St_Barthelemy" + | "America/St_Johns" + | "America/St_Kitts" + | "America/St_Lucia" + | "America/St_Thomas" + | "America/St_Vincent" + | "America/Swift_Current" + | "America/Tegucigalpa" + | "America/Thule" + | "America/Tijuana" + | "America/Toronto" + | "America/Tortola" + | "America/Vancouver" + | "America/Whitehorse" + | "America/Winnipeg" + | "America/Yakutat" + | "America/Yellowknife" + | "Antarctica/Casey" + | "Antarctica/Davis" + | "Antarctica/DumontDUrville" + | "Antarctica/Macquarie" + | "Antarctica/Mawson" + | "Antarctica/McMurdo" + | "Antarctica/Palmer" + | "Antarctica/Rothera" + | "Antarctica/Syowa" + | "Antarctica/Troll" + | "Antarctica/Vostok" + | "Arctic/Longyearbyen" + | "Asia/Aden" + | "Asia/Almaty" + | "Asia/Amman" + | "Asia/Anadyr" + | "Asia/Aqtau" + | "Asia/Aqtobe" + | "Asia/Ashgabat" + | "Asia/Atyrau" + | "Asia/Baghdad" + | "Asia/Bahrain" + | "Asia/Baku" + | "Asia/Bangkok" + | "Asia/Barnaul" + | "Asia/Beirut" + | "Asia/Bishkek" + | "Asia/Brunei" + | "Asia/Chita" + | "Asia/Choibalsan" + | "Asia/Colombo" + | "Asia/Damascus" + | "Asia/Dhaka" + | "Asia/Dili" + | "Asia/Dubai" + | "Asia/Dushanbe" + | "Asia/Famagusta" + | "Asia/Gaza" + | "Asia/Hebron" + | "Asia/Ho_Chi_Minh" + | "Asia/Hong_Kong" + | "Asia/Hovd" + | "Asia/Irkutsk" + | "Asia/Jakarta" + | "Asia/Jayapura" + | "Asia/Jerusalem" + | "Asia/Kabul" + | "Asia/Kamchatka" + | "Asia/Karachi" + | "Asia/Kathmandu" + | "Asia/Khandyga" + | "Asia/Kolkata" + | "Asia/Krasnoyarsk" + | "Asia/Kuala_Lumpur" + | "Asia/Kuching" + | "Asia/Kuwait" + | "Asia/Macau" + | "Asia/Magadan" + | "Asia/Makassar" + | "Asia/Manila" + | "Asia/Muscat" + | "Asia/Nicosia" + | "Asia/Novokuznetsk" + | "Asia/Novosibirsk" + | "Asia/Omsk" + | "Asia/Oral" + | "Asia/Phnom_Penh" + | "Asia/Pontianak" + | "Asia/Pyongyang" + | "Asia/Qatar" + | "Asia/Qostanay" + | "Asia/Qyzylorda" + | "Asia/Riyadh" + | "Asia/Sakhalin" + | "Asia/Samarkand" + | "Asia/Seoul" + | "Asia/Shanghai" + | "Asia/Singapore" + | "Asia/Srednekolymsk" + | "Asia/Taipei" + | "Asia/Tashkent" + | "Asia/Tbilisi" + | "Asia/Tehran" + | "Asia/Thimphu" + | "Asia/Tokyo" + | "Asia/Tomsk" + | "Asia/Ulaanbaatar" + | "Asia/Urumqi" + | "Asia/Ust-Nera" + | "Asia/Vientiane" + | "Asia/Vladivostok" + | "Asia/Yakutsk" + | "Asia/Yangon" + | "Asia/Yekaterinburg" + | "Asia/Yerevan" + | "Atlantic/Azores" + | "Atlantic/Bermuda" + | "Atlantic/Canary" + | "Atlantic/Cape_Verde" + | "Atlantic/Faroe" + | "Atlantic/Madeira" + | "Atlantic/Reykjavik" + | "Atlantic/South_Georgia" + | "Atlantic/St_Helena" + | "Atlantic/Stanley" + | "Australia/Adelaide" + | "Australia/Brisbane" + | "Australia/Broken_Hill" + | "Australia/Darwin" + | "Australia/Eucla" + | "Australia/Hobart" + | "Australia/Lindeman" + | "Australia/Lord_Howe" + | "Australia/Melbourne" + | "Australia/Perth" + | "Australia/Sydney" + | "Canada/Atlantic" + | "Canada/Central" + | "Canada/Eastern" + | "Canada/Mountain" + | "Canada/Newfoundland" + | "Canada/Pacific" + | "Europe/Amsterdam" + | "Europe/Andorra" + | "Europe/Astrakhan" + | "Europe/Athens" + | "Europe/Belgrade" + | "Europe/Berlin" + | "Europe/Bratislava" + | "Europe/Brussels" + | "Europe/Bucharest" + | "Europe/Budapest" + | "Europe/Busingen" + | "Europe/Chisinau" + | "Europe/Copenhagen" + | "Europe/Dublin" + | "Europe/Gibraltar" + | "Europe/Guernsey" + | "Europe/Helsinki" + | "Europe/Isle_of_Man" + | "Europe/Istanbul" + | "Europe/Jersey" + | "Europe/Kaliningrad" + | "Europe/Kirov" + | "Europe/Kyiv" + | "Europe/Lisbon" + | "Europe/Ljubljana" + | "Europe/London" + | "Europe/Luxembourg" + | "Europe/Madrid" + | "Europe/Malta" + | "Europe/Mariehamn" + | "Europe/Minsk" + | "Europe/Monaco" + | "Europe/Moscow" + | "Europe/Oslo" + | "Europe/Paris" + | "Europe/Podgorica" + | "Europe/Prague" + | "Europe/Riga" + | "Europe/Rome" + | "Europe/Samara" + | "Europe/San_Marino" + | "Europe/Sarajevo" + | "Europe/Saratov" + | "Europe/Simferopol" + | "Europe/Skopje" + | "Europe/Sofia" + | "Europe/Stockholm" + | "Europe/Tallinn" + | "Europe/Tirane" + | "Europe/Ulyanovsk" + | "Europe/Vaduz" + | "Europe/Vatican" + | "Europe/Vienna" + | "Europe/Vilnius" + | "Europe/Volgograd" + | "Europe/Warsaw" + | "Europe/Zagreb" + | "Europe/Zurich" + | "GMT" + | "Indian/Antananarivo" + | "Indian/Chagos" + | "Indian/Christmas" + | "Indian/Cocos" + | "Indian/Comoro" + | "Indian/Kerguelen" + | "Indian/Mahe" + | "Indian/Maldives" + | "Indian/Mauritius" + | "Indian/Mayotte" + | "Indian/Reunion" + | "Pacific/Apia" + | "Pacific/Auckland" + | "Pacific/Bougainville" + | "Pacific/Chatham" + | "Pacific/Chuuk" + | "Pacific/Easter" + | "Pacific/Efate" + | "Pacific/Fakaofo" + | "Pacific/Fiji" + | "Pacific/Funafuti" + | "Pacific/Galapagos" + | "Pacific/Gambier" + | "Pacific/Guadalcanal" + | "Pacific/Guam" + | "Pacific/Honolulu" + | "Pacific/Kanton" + | "Pacific/Kiritimati" + | "Pacific/Kosrae" + | "Pacific/Kwajalein" + | "Pacific/Majuro" + | "Pacific/Marquesas" + | "Pacific/Midway" + | "Pacific/Nauru" + | "Pacific/Niue" + | "Pacific/Norfolk" + | "Pacific/Noumea" + | "Pacific/Pago_Pago" + | "Pacific/Palau" + | "Pacific/Pitcairn" + | "Pacific/Pohnpei" + | "Pacific/Port_Moresby" + | "Pacific/Rarotonga" + | "Pacific/Saipan" + | "Pacific/Tahiti" + | "Pacific/Tarawa" + | "Pacific/Tongatapu" + | "Pacific/Wake" + | "Pacific/Wallis" + | "US/Alaska" + | "US/Arizona" + | "US/Central" + | "US/Eastern" + | "US/Hawaii" + | "US/Mountain" + | "US/Pacific" + | "UTC"; + stripe_account_id: string; + braintree_merchant_id: string; + tax_providers: readonly ("taxjar" | "lotus" | "netsuite")[]; }; - SubscriptionCustomerSummary: { - billing_plan_name: string; + OrganizationCreateRequest: { + organization_name: string; + default_currency_code?: string; /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + * @default development + * @enum {string} */ - end_date: string; - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew?: boolean; + organization_type?: "development" | "production"; }; - SubscriptionRecord: { - subscription_id: string; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - start_date: string; - /** - * Format: date-time - * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. - */ - end_date: string; - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew: boolean; - /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ - is_new: boolean; - subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; - customer: components["schemas"]["LightweightCustomer"]; - billing_plan: components["schemas"]["LightweightPlanVersion"]; - fully_billed: boolean; - addons: components["schemas"]["LightweightAddOnSubscriptionRecord"][]; + OrganizationSetting: { + setting_id: string; + /** @enum {string} */ + setting_name: + | "generate_customer_after_creating_in_lotus" + | "gen_cust_in_braintree_after_lotus" + | "subscription_filter_keys" + | "payment_grace_period"; + setting_values: { + [key: string]: Record | undefined; + }; + /** @enum {string} */ + setting_group?: "stripe" | "braintree" | "billing"; }; - SubscriptionRecordCancelRequest: { - /** - * @description When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of the subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged. - * @enum {string|null} - */ - flat_fee_behavior?: - | "refund" - | "charge_prorated" - | "charge_full" - | "" - | null; - /** - * @description If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full. - * @default bill_full - * @enum {string} - */ - usage_behavior?: "bill_full" | "bill_none"; + OrganizationSettingUpdate: { + setting_values?: { + [key: string]: Record | undefined; + }; + }; + OrganizationUser: { + /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ + username: string; + /** Format: email */ + email: string; + role: string; /** - * @description Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now. - * @default invoice_now + * @default Active * @enum {string} */ - invoicing_behavior?: "add_to_next_invoice" | "invoice_now"; + status?: "Active" | "Invited"; }; - SubscriptionRecordCreateRequest: { - /** - * Format: date-time - * @description The date the subscription starts. This should be a string in YYYY-MM-DD format of the date in UTC time. - */ - start_date: string; - /** - * Format: date-time - * @description The date the subscription ends. This should be a string in YYYY-MM-DD format of the date in UTC time. If you don’t set it (recommended), we will use the information in the billing plan to automatically calculate this. - */ - end_date?: string; - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew?: boolean; - is_new?: boolean; - /** @description Add filter key, value pairs that define which events will be applied to this plan subscription. */ - subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; - /** @description The id provided when creating the customer */ - customer_id: string; + PaginatedActionList: { + next?: string; + previous?: string; + results?: components["schemas"]["Action"][]; + }; + PaginatedEventDetailList: { + next?: string; + previous?: string; + results?: components["schemas"]["EventDetail"][]; + }; + PatchedAddOnUpdateRequest: { + addon_name?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; + }; + PatchedAddOnVersionUpdateRequest: { + addon_version_name?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; + }; + PatchedCustomerUpdateRequest: { + default_currency_code?: string; + billing_address?: components["schemas"]["AddressRequest"] | null; + shipping_address?: components["schemas"]["AddressRequest"] | null; /** - * Format: uuid - * @description The Lotus plan_id, found in the billing plan object. We will make a best-effort attempt to find the correct plan version (matching preferred currencies, prioritizing custom plans), but if more than one plan version or no plan version matches these criteria this will return an error. + * Format: double + * @description Tax rate as percentage. For example, 10.5 for 10.5% */ - plan_id?: string; - /** @description The initial units for the plan components' prepaid fixed charges. This is only required if the plan has plan components where you did not specify the initial units. */ - component_fixed_charges_initial_units?: components["schemas"]["ComponentsFixedChargeInitialValueRequest"][]; + tax_rate?: number; + /** @enum {string} */ + timezone?: + | "Africa/Abidjan" + | "Africa/Accra" + | "Africa/Addis_Ababa" + | "Africa/Algiers" + | "Africa/Asmara" + | "Africa/Bamako" + | "Africa/Bangui" + | "Africa/Banjul" + | "Africa/Bissau" + | "Africa/Blantyre" + | "Africa/Brazzaville" + | "Africa/Bujumbura" + | "Africa/Cairo" + | "Africa/Casablanca" + | "Africa/Ceuta" + | "Africa/Conakry" + | "Africa/Dakar" + | "Africa/Dar_es_Salaam" + | "Africa/Djibouti" + | "Africa/Douala" + | "Africa/El_Aaiun" + | "Africa/Freetown" + | "Africa/Gaborone" + | "Africa/Harare" + | "Africa/Johannesburg" + | "Africa/Juba" + | "Africa/Kampala" + | "Africa/Khartoum" + | "Africa/Kigali" + | "Africa/Kinshasa" + | "Africa/Lagos" + | "Africa/Libreville" + | "Africa/Lome" + | "Africa/Luanda" + | "Africa/Lubumbashi" + | "Africa/Lusaka" + | "Africa/Malabo" + | "Africa/Maputo" + | "Africa/Maseru" + | "Africa/Mbabane" + | "Africa/Mogadishu" + | "Africa/Monrovia" + | "Africa/Nairobi" + | "Africa/Ndjamena" + | "Africa/Niamey" + | "Africa/Nouakchott" + | "Africa/Ouagadougou" + | "Africa/Porto-Novo" + | "Africa/Sao_Tome" + | "Africa/Tripoli" + | "Africa/Tunis" + | "Africa/Windhoek" + | "America/Adak" + | "America/Anchorage" + | "America/Anguilla" + | "America/Antigua" + | "America/Araguaina" + | "America/Argentina/Buenos_Aires" + | "America/Argentina/Catamarca" + | "America/Argentina/Cordoba" + | "America/Argentina/Jujuy" + | "America/Argentina/La_Rioja" + | "America/Argentina/Mendoza" + | "America/Argentina/Rio_Gallegos" + | "America/Argentina/Salta" + | "America/Argentina/San_Juan" + | "America/Argentina/San_Luis" + | "America/Argentina/Tucuman" + | "America/Argentina/Ushuaia" + | "America/Aruba" + | "America/Asuncion" + | "America/Atikokan" + | "America/Bahia" + | "America/Bahia_Banderas" + | "America/Barbados" + | "America/Belem" + | "America/Belize" + | "America/Blanc-Sablon" + | "America/Boa_Vista" + | "America/Bogota" + | "America/Boise" + | "America/Cambridge_Bay" + | "America/Campo_Grande" + | "America/Cancun" + | "America/Caracas" + | "America/Cayenne" + | "America/Cayman" + | "America/Chicago" + | "America/Chihuahua" + | "America/Ciudad_Juarez" + | "America/Costa_Rica" + | "America/Creston" + | "America/Cuiaba" + | "America/Curacao" + | "America/Danmarkshavn" + | "America/Dawson" + | "America/Dawson_Creek" + | "America/Denver" + | "America/Detroit" + | "America/Dominica" + | "America/Edmonton" + | "America/Eirunepe" + | "America/El_Salvador" + | "America/Fort_Nelson" + | "America/Fortaleza" + | "America/Glace_Bay" + | "America/Goose_Bay" + | "America/Grand_Turk" + | "America/Grenada" + | "America/Guadeloupe" + | "America/Guatemala" + | "America/Guayaquil" + | "America/Guyana" + | "America/Halifax" + | "America/Havana" + | "America/Hermosillo" + | "America/Indiana/Indianapolis" + | "America/Indiana/Knox" + | "America/Indiana/Marengo" + | "America/Indiana/Petersburg" + | "America/Indiana/Tell_City" + | "America/Indiana/Vevay" + | "America/Indiana/Vincennes" + | "America/Indiana/Winamac" + | "America/Inuvik" + | "America/Iqaluit" + | "America/Jamaica" + | "America/Juneau" + | "America/Kentucky/Louisville" + | "America/Kentucky/Monticello" + | "America/Kralendijk" + | "America/La_Paz" + | "America/Lima" + | "America/Los_Angeles" + | "America/Lower_Princes" + | "America/Maceio" + | "America/Managua" + | "America/Manaus" + | "America/Marigot" + | "America/Martinique" + | "America/Matamoros" + | "America/Mazatlan" + | "America/Menominee" + | "America/Merida" + | "America/Metlakatla" + | "America/Mexico_City" + | "America/Miquelon" + | "America/Moncton" + | "America/Monterrey" + | "America/Montevideo" + | "America/Montserrat" + | "America/Nassau" + | "America/New_York" + | "America/Nome" + | "America/Noronha" + | "America/North_Dakota/Beulah" + | "America/North_Dakota/Center" + | "America/North_Dakota/New_Salem" + | "America/Nuuk" + | "America/Ojinaga" + | "America/Panama" + | "America/Paramaribo" + | "America/Phoenix" + | "America/Port-au-Prince" + | "America/Port_of_Spain" + | "America/Porto_Velho" + | "America/Puerto_Rico" + | "America/Punta_Arenas" + | "America/Rankin_Inlet" + | "America/Recife" + | "America/Regina" + | "America/Resolute" + | "America/Rio_Branco" + | "America/Santarem" + | "America/Santiago" + | "America/Santo_Domingo" + | "America/Sao_Paulo" + | "America/Scoresbysund" + | "America/Sitka" + | "America/St_Barthelemy" + | "America/St_Johns" + | "America/St_Kitts" + | "America/St_Lucia" + | "America/St_Thomas" + | "America/St_Vincent" + | "America/Swift_Current" + | "America/Tegucigalpa" + | "America/Thule" + | "America/Tijuana" + | "America/Toronto" + | "America/Tortola" + | "America/Vancouver" + | "America/Whitehorse" + | "America/Winnipeg" + | "America/Yakutat" + | "America/Yellowknife" + | "Antarctica/Casey" + | "Antarctica/Davis" + | "Antarctica/DumontDUrville" + | "Antarctica/Macquarie" + | "Antarctica/Mawson" + | "Antarctica/McMurdo" + | "Antarctica/Palmer" + | "Antarctica/Rothera" + | "Antarctica/Syowa" + | "Antarctica/Troll" + | "Antarctica/Vostok" + | "Arctic/Longyearbyen" + | "Asia/Aden" + | "Asia/Almaty" + | "Asia/Amman" + | "Asia/Anadyr" + | "Asia/Aqtau" + | "Asia/Aqtobe" + | "Asia/Ashgabat" + | "Asia/Atyrau" + | "Asia/Baghdad" + | "Asia/Bahrain" + | "Asia/Baku" + | "Asia/Bangkok" + | "Asia/Barnaul" + | "Asia/Beirut" + | "Asia/Bishkek" + | "Asia/Brunei" + | "Asia/Chita" + | "Asia/Choibalsan" + | "Asia/Colombo" + | "Asia/Damascus" + | "Asia/Dhaka" + | "Asia/Dili" + | "Asia/Dubai" + | "Asia/Dushanbe" + | "Asia/Famagusta" + | "Asia/Gaza" + | "Asia/Hebron" + | "Asia/Ho_Chi_Minh" + | "Asia/Hong_Kong" + | "Asia/Hovd" + | "Asia/Irkutsk" + | "Asia/Jakarta" + | "Asia/Jayapura" + | "Asia/Jerusalem" + | "Asia/Kabul" + | "Asia/Kamchatka" + | "Asia/Karachi" + | "Asia/Kathmandu" + | "Asia/Khandyga" + | "Asia/Kolkata" + | "Asia/Krasnoyarsk" + | "Asia/Kuala_Lumpur" + | "Asia/Kuching" + | "Asia/Kuwait" + | "Asia/Macau" + | "Asia/Magadan" + | "Asia/Makassar" + | "Asia/Manila" + | "Asia/Muscat" + | "Asia/Nicosia" + | "Asia/Novokuznetsk" + | "Asia/Novosibirsk" + | "Asia/Omsk" + | "Asia/Oral" + | "Asia/Phnom_Penh" + | "Asia/Pontianak" + | "Asia/Pyongyang" + | "Asia/Qatar" + | "Asia/Qostanay" + | "Asia/Qyzylorda" + | "Asia/Riyadh" + | "Asia/Sakhalin" + | "Asia/Samarkand" + | "Asia/Seoul" + | "Asia/Shanghai" + | "Asia/Singapore" + | "Asia/Srednekolymsk" + | "Asia/Taipei" + | "Asia/Tashkent" + | "Asia/Tbilisi" + | "Asia/Tehran" + | "Asia/Thimphu" + | "Asia/Tokyo" + | "Asia/Tomsk" + | "Asia/Ulaanbaatar" + | "Asia/Urumqi" + | "Asia/Ust-Nera" + | "Asia/Vientiane" + | "Asia/Vladivostok" + | "Asia/Yakutsk" + | "Asia/Yangon" + | "Asia/Yekaterinburg" + | "Asia/Yerevan" + | "Atlantic/Azores" + | "Atlantic/Bermuda" + | "Atlantic/Canary" + | "Atlantic/Cape_Verde" + | "Atlantic/Faroe" + | "Atlantic/Madeira" + | "Atlantic/Reykjavik" + | "Atlantic/South_Georgia" + | "Atlantic/St_Helena" + | "Atlantic/Stanley" + | "Australia/Adelaide" + | "Australia/Brisbane" + | "Australia/Broken_Hill" + | "Australia/Darwin" + | "Australia/Eucla" + | "Australia/Hobart" + | "Australia/Lindeman" + | "Australia/Lord_Howe" + | "Australia/Melbourne" + | "Australia/Perth" + | "Australia/Sydney" + | "Canada/Atlantic" + | "Canada/Central" + | "Canada/Eastern" + | "Canada/Mountain" + | "Canada/Newfoundland" + | "Canada/Pacific" + | "Europe/Amsterdam" + | "Europe/Andorra" + | "Europe/Astrakhan" + | "Europe/Athens" + | "Europe/Belgrade" + | "Europe/Berlin" + | "Europe/Bratislava" + | "Europe/Brussels" + | "Europe/Bucharest" + | "Europe/Budapest" + | "Europe/Busingen" + | "Europe/Chisinau" + | "Europe/Copenhagen" + | "Europe/Dublin" + | "Europe/Gibraltar" + | "Europe/Guernsey" + | "Europe/Helsinki" + | "Europe/Isle_of_Man" + | "Europe/Istanbul" + | "Europe/Jersey" + | "Europe/Kaliningrad" + | "Europe/Kirov" + | "Europe/Kyiv" + | "Europe/Lisbon" + | "Europe/Ljubljana" + | "Europe/London" + | "Europe/Luxembourg" + | "Europe/Madrid" + | "Europe/Malta" + | "Europe/Mariehamn" + | "Europe/Minsk" + | "Europe/Monaco" + | "Europe/Moscow" + | "Europe/Oslo" + | "Europe/Paris" + | "Europe/Podgorica" + | "Europe/Prague" + | "Europe/Riga" + | "Europe/Rome" + | "Europe/Samara" + | "Europe/San_Marino" + | "Europe/Sarajevo" + | "Europe/Saratov" + | "Europe/Simferopol" + | "Europe/Skopje" + | "Europe/Sofia" + | "Europe/Stockholm" + | "Europe/Tallinn" + | "Europe/Tirane" + | "Europe/Ulyanovsk" + | "Europe/Vaduz" + | "Europe/Vatican" + | "Europe/Vienna" + | "Europe/Vilnius" + | "Europe/Volgograd" + | "Europe/Warsaw" + | "Europe/Zagreb" + | "Europe/Zurich" + | "GMT" + | "Indian/Antananarivo" + | "Indian/Chagos" + | "Indian/Christmas" + | "Indian/Cocos" + | "Indian/Comoro" + | "Indian/Kerguelen" + | "Indian/Mahe" + | "Indian/Maldives" + | "Indian/Mauritius" + | "Indian/Mayotte" + | "Indian/Reunion" + | "Pacific/Apia" + | "Pacific/Auckland" + | "Pacific/Bougainville" + | "Pacific/Chatham" + | "Pacific/Chuuk" + | "Pacific/Easter" + | "Pacific/Efate" + | "Pacific/Fakaofo" + | "Pacific/Fiji" + | "Pacific/Funafuti" + | "Pacific/Galapagos" + | "Pacific/Gambier" + | "Pacific/Guadalcanal" + | "Pacific/Guam" + | "Pacific/Honolulu" + | "Pacific/Kanton" + | "Pacific/Kiritimati" + | "Pacific/Kosrae" + | "Pacific/Kwajalein" + | "Pacific/Majuro" + | "Pacific/Marquesas" + | "Pacific/Midway" + | "Pacific/Nauru" + | "Pacific/Niue" + | "Pacific/Norfolk" + | "Pacific/Noumea" + | "Pacific/Pago_Pago" + | "Pacific/Palau" + | "Pacific/Pitcairn" + | "Pacific/Pohnpei" + | "Pacific/Port_Moresby" + | "Pacific/Rarotonga" + | "Pacific/Saipan" + | "Pacific/Tahiti" + | "Pacific/Tarawa" + | "Pacific/Tongatapu" + | "Pacific/Wake" + | "Pacific/Wallis" + | "US/Alaska" + | "US/Arizona" + | "US/Central" + | "US/Eastern" + | "US/Hawaii" + | "US/Mountain" + | "US/Pacific" + | "UTC"; + customer_name?: string; }; - SubscriptionRecordCreateSerializerOldRequest: { - /** - * Format: date-time - * @description The date the subscription starts. This should be a string in YYYY-MM-DD format of the date in UTC time. - */ - start_date: string; - /** - * Format: date-time - * @description The date the subscription ends. This should be a string in YYYY-MM-DD format of the date in UTC time. If you don’t set it (recommended), we will use the information in the billing plan to automatically calculate this. - */ - end_date?: string; - /** @description Whether the subscription automatically renews. Defaults to true. */ - auto_renew?: boolean; - is_new?: boolean; - /** @description Add filter key, value pairs that define which events will be applied to this plan subscription. */ - subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; - /** @description The id provided when creating the customer */ - customer_id: string; - /** - * Format: uuid - * @description The Lotus plan_id, found in the billing plan object. This field has been deprecated in favor of version_id for the sake of being explicit. If used, a best effort will be made to find the correct plan version (matching preferred currencies, prioritizing custom plans), but if more than one plan versions matches this criteria this will return an error. - */ - plan_id?: string; + PatchedInvoiceUpdateRequest: { + /** @enum {string} */ + payment_status?: "paid" | "unpaid"; }; - SubscriptionRecordSwitchPlanRequest: { - /** - * Format: uuid - * @description The new plan to switch to. - */ - switch_plan_id?: string; - /** - * @description The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation. - * @default invoice_now - * @enum {string} - */ - invoicing_behavior?: "add_to_next_invoice" | "invoice_now"; - /** - * @description The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month. - * @default transfer_to_new_subscription - * @enum {string} - */ - usage_behavior?: "transfer_to_new_subscription" | "keep_separate"; - /** @description The initial units for the plan components' prepaid fixed charges. In the context of swithciong plans, this is only required if the new plan has a component the old plan did not have, that has a prepaid charge, that deos not have a default. */ - component_fixed_charges_initial_units?: components["schemas"]["ComponentsFixedChargeInitialValueRequest"][]; + PatchedMetricUpdateRequest: { + billable_metric_name?: string; + /** @enum {string} */ + status?: "active" | "archived"; }; - SubscriptionRecordUpdateRequest: { - /** @description Turn off auto renew for the subscription */ - turn_off_auto_renew?: boolean; - /** - * Format: date-time - * @description Change the end date for the subscription. - */ - end_date?: string; + PatchedOrganizationSettingUpdateRequest: { + setting_values?: { + [key: string]: Record | undefined; + }; }; - SubscriptionRecordUpdateSerializerOldRequest: { - /** - * Format: uuid - * @description [DEPRECATED] Will currently perform a best-effort attempt to find the correct plan version to replace the current plan with. If more than one plan version matches the criteria, this will return an error. Use the change_plan method of a subscription instance instead. - */ - replace_plan_id?: string; + PatchedOrganizationUpdateRequest: { + default_currency_code?: string; + address?: components["schemas"]["AddressRequest"] | null; /** - * @description The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation. - * @default invoice_now - * @enum {string} + * Format: double + * @description Tax rate as percentage. For example, 10.5 for 10.5% */ - invoicing_behavior?: "add_to_next_invoice" | "invoice_now"; + tax_rate?: number; + payment_grace_period?: number; + plan_tags?: components["schemas"]["TagRequest"][]; + subscription_filter_keys?: string[]; + /** @enum {string} */ + timezone?: + | "Africa/Abidjan" + | "Africa/Accra" + | "Africa/Addis_Ababa" + | "Africa/Algiers" + | "Africa/Asmara" + | "Africa/Bamako" + | "Africa/Bangui" + | "Africa/Banjul" + | "Africa/Bissau" + | "Africa/Blantyre" + | "Africa/Brazzaville" + | "Africa/Bujumbura" + | "Africa/Cairo" + | "Africa/Casablanca" + | "Africa/Ceuta" + | "Africa/Conakry" + | "Africa/Dakar" + | "Africa/Dar_es_Salaam" + | "Africa/Djibouti" + | "Africa/Douala" + | "Africa/El_Aaiun" + | "Africa/Freetown" + | "Africa/Gaborone" + | "Africa/Harare" + | "Africa/Johannesburg" + | "Africa/Juba" + | "Africa/Kampala" + | "Africa/Khartoum" + | "Africa/Kigali" + | "Africa/Kinshasa" + | "Africa/Lagos" + | "Africa/Libreville" + | "Africa/Lome" + | "Africa/Luanda" + | "Africa/Lubumbashi" + | "Africa/Lusaka" + | "Africa/Malabo" + | "Africa/Maputo" + | "Africa/Maseru" + | "Africa/Mbabane" + | "Africa/Mogadishu" + | "Africa/Monrovia" + | "Africa/Nairobi" + | "Africa/Ndjamena" + | "Africa/Niamey" + | "Africa/Nouakchott" + | "Africa/Ouagadougou" + | "Africa/Porto-Novo" + | "Africa/Sao_Tome" + | "Africa/Tripoli" + | "Africa/Tunis" + | "Africa/Windhoek" + | "America/Adak" + | "America/Anchorage" + | "America/Anguilla" + | "America/Antigua" + | "America/Araguaina" + | "America/Argentina/Buenos_Aires" + | "America/Argentina/Catamarca" + | "America/Argentina/Cordoba" + | "America/Argentina/Jujuy" + | "America/Argentina/La_Rioja" + | "America/Argentina/Mendoza" + | "America/Argentina/Rio_Gallegos" + | "America/Argentina/Salta" + | "America/Argentina/San_Juan" + | "America/Argentina/San_Luis" + | "America/Argentina/Tucuman" + | "America/Argentina/Ushuaia" + | "America/Aruba" + | "America/Asuncion" + | "America/Atikokan" + | "America/Bahia" + | "America/Bahia_Banderas" + | "America/Barbados" + | "America/Belem" + | "America/Belize" + | "America/Blanc-Sablon" + | "America/Boa_Vista" + | "America/Bogota" + | "America/Boise" + | "America/Cambridge_Bay" + | "America/Campo_Grande" + | "America/Cancun" + | "America/Caracas" + | "America/Cayenne" + | "America/Cayman" + | "America/Chicago" + | "America/Chihuahua" + | "America/Ciudad_Juarez" + | "America/Costa_Rica" + | "America/Creston" + | "America/Cuiaba" + | "America/Curacao" + | "America/Danmarkshavn" + | "America/Dawson" + | "America/Dawson_Creek" + | "America/Denver" + | "America/Detroit" + | "America/Dominica" + | "America/Edmonton" + | "America/Eirunepe" + | "America/El_Salvador" + | "America/Fort_Nelson" + | "America/Fortaleza" + | "America/Glace_Bay" + | "America/Goose_Bay" + | "America/Grand_Turk" + | "America/Grenada" + | "America/Guadeloupe" + | "America/Guatemala" + | "America/Guayaquil" + | "America/Guyana" + | "America/Halifax" + | "America/Havana" + | "America/Hermosillo" + | "America/Indiana/Indianapolis" + | "America/Indiana/Knox" + | "America/Indiana/Marengo" + | "America/Indiana/Petersburg" + | "America/Indiana/Tell_City" + | "America/Indiana/Vevay" + | "America/Indiana/Vincennes" + | "America/Indiana/Winamac" + | "America/Inuvik" + | "America/Iqaluit" + | "America/Jamaica" + | "America/Juneau" + | "America/Kentucky/Louisville" + | "America/Kentucky/Monticello" + | "America/Kralendijk" + | "America/La_Paz" + | "America/Lima" + | "America/Los_Angeles" + | "America/Lower_Princes" + | "America/Maceio" + | "America/Managua" + | "America/Manaus" + | "America/Marigot" + | "America/Martinique" + | "America/Matamoros" + | "America/Mazatlan" + | "America/Menominee" + | "America/Merida" + | "America/Metlakatla" + | "America/Mexico_City" + | "America/Miquelon" + | "America/Moncton" + | "America/Monterrey" + | "America/Montevideo" + | "America/Montserrat" + | "America/Nassau" + | "America/New_York" + | "America/Nome" + | "America/Noronha" + | "America/North_Dakota/Beulah" + | "America/North_Dakota/Center" + | "America/North_Dakota/New_Salem" + | "America/Nuuk" + | "America/Ojinaga" + | "America/Panama" + | "America/Paramaribo" + | "America/Phoenix" + | "America/Port-au-Prince" + | "America/Port_of_Spain" + | "America/Porto_Velho" + | "America/Puerto_Rico" + | "America/Punta_Arenas" + | "America/Rankin_Inlet" + | "America/Recife" + | "America/Regina" + | "America/Resolute" + | "America/Rio_Branco" + | "America/Santarem" + | "America/Santiago" + | "America/Santo_Domingo" + | "America/Sao_Paulo" + | "America/Scoresbysund" + | "America/Sitka" + | "America/St_Barthelemy" + | "America/St_Johns" + | "America/St_Kitts" + | "America/St_Lucia" + | "America/St_Thomas" + | "America/St_Vincent" + | "America/Swift_Current" + | "America/Tegucigalpa" + | "America/Thule" + | "America/Tijuana" + | "America/Toronto" + | "America/Tortola" + | "America/Vancouver" + | "America/Whitehorse" + | "America/Winnipeg" + | "America/Yakutat" + | "America/Yellowknife" + | "Antarctica/Casey" + | "Antarctica/Davis" + | "Antarctica/DumontDUrville" + | "Antarctica/Macquarie" + | "Antarctica/Mawson" + | "Antarctica/McMurdo" + | "Antarctica/Palmer" + | "Antarctica/Rothera" + | "Antarctica/Syowa" + | "Antarctica/Troll" + | "Antarctica/Vostok" + | "Arctic/Longyearbyen" + | "Asia/Aden" + | "Asia/Almaty" + | "Asia/Amman" + | "Asia/Anadyr" + | "Asia/Aqtau" + | "Asia/Aqtobe" + | "Asia/Ashgabat" + | "Asia/Atyrau" + | "Asia/Baghdad" + | "Asia/Bahrain" + | "Asia/Baku" + | "Asia/Bangkok" + | "Asia/Barnaul" + | "Asia/Beirut" + | "Asia/Bishkek" + | "Asia/Brunei" + | "Asia/Chita" + | "Asia/Choibalsan" + | "Asia/Colombo" + | "Asia/Damascus" + | "Asia/Dhaka" + | "Asia/Dili" + | "Asia/Dubai" + | "Asia/Dushanbe" + | "Asia/Famagusta" + | "Asia/Gaza" + | "Asia/Hebron" + | "Asia/Ho_Chi_Minh" + | "Asia/Hong_Kong" + | "Asia/Hovd" + | "Asia/Irkutsk" + | "Asia/Jakarta" + | "Asia/Jayapura" + | "Asia/Jerusalem" + | "Asia/Kabul" + | "Asia/Kamchatka" + | "Asia/Karachi" + | "Asia/Kathmandu" + | "Asia/Khandyga" + | "Asia/Kolkata" + | "Asia/Krasnoyarsk" + | "Asia/Kuala_Lumpur" + | "Asia/Kuching" + | "Asia/Kuwait" + | "Asia/Macau" + | "Asia/Magadan" + | "Asia/Makassar" + | "Asia/Manila" + | "Asia/Muscat" + | "Asia/Nicosia" + | "Asia/Novokuznetsk" + | "Asia/Novosibirsk" + | "Asia/Omsk" + | "Asia/Oral" + | "Asia/Phnom_Penh" + | "Asia/Pontianak" + | "Asia/Pyongyang" + | "Asia/Qatar" + | "Asia/Qostanay" + | "Asia/Qyzylorda" + | "Asia/Riyadh" + | "Asia/Sakhalin" + | "Asia/Samarkand" + | "Asia/Seoul" + | "Asia/Shanghai" + | "Asia/Singapore" + | "Asia/Srednekolymsk" + | "Asia/Taipei" + | "Asia/Tashkent" + | "Asia/Tbilisi" + | "Asia/Tehran" + | "Asia/Thimphu" + | "Asia/Tokyo" + | "Asia/Tomsk" + | "Asia/Ulaanbaatar" + | "Asia/Urumqi" + | "Asia/Ust-Nera" + | "Asia/Vientiane" + | "Asia/Vladivostok" + | "Asia/Yakutsk" + | "Asia/Yangon" + | "Asia/Yekaterinburg" + | "Asia/Yerevan" + | "Atlantic/Azores" + | "Atlantic/Bermuda" + | "Atlantic/Canary" + | "Atlantic/Cape_Verde" + | "Atlantic/Faroe" + | "Atlantic/Madeira" + | "Atlantic/Reykjavik" + | "Atlantic/South_Georgia" + | "Atlantic/St_Helena" + | "Atlantic/Stanley" + | "Australia/Adelaide" + | "Australia/Brisbane" + | "Australia/Broken_Hill" + | "Australia/Darwin" + | "Australia/Eucla" + | "Australia/Hobart" + | "Australia/Lindeman" + | "Australia/Lord_Howe" + | "Australia/Melbourne" + | "Australia/Perth" + | "Australia/Sydney" + | "Canada/Atlantic" + | "Canada/Central" + | "Canada/Eastern" + | "Canada/Mountain" + | "Canada/Newfoundland" + | "Canada/Pacific" + | "Europe/Amsterdam" + | "Europe/Andorra" + | "Europe/Astrakhan" + | "Europe/Athens" + | "Europe/Belgrade" + | "Europe/Berlin" + | "Europe/Bratislava" + | "Europe/Brussels" + | "Europe/Bucharest" + | "Europe/Budapest" + | "Europe/Busingen" + | "Europe/Chisinau" + | "Europe/Copenhagen" + | "Europe/Dublin" + | "Europe/Gibraltar" + | "Europe/Guernsey" + | "Europe/Helsinki" + | "Europe/Isle_of_Man" + | "Europe/Istanbul" + | "Europe/Jersey" + | "Europe/Kaliningrad" + | "Europe/Kirov" + | "Europe/Kyiv" + | "Europe/Lisbon" + | "Europe/Ljubljana" + | "Europe/London" + | "Europe/Luxembourg" + | "Europe/Madrid" + | "Europe/Malta" + | "Europe/Mariehamn" + | "Europe/Minsk" + | "Europe/Monaco" + | "Europe/Moscow" + | "Europe/Oslo" + | "Europe/Paris" + | "Europe/Podgorica" + | "Europe/Prague" + | "Europe/Riga" + | "Europe/Rome" + | "Europe/Samara" + | "Europe/San_Marino" + | "Europe/Sarajevo" + | "Europe/Saratov" + | "Europe/Simferopol" + | "Europe/Skopje" + | "Europe/Sofia" + | "Europe/Stockholm" + | "Europe/Tallinn" + | "Europe/Tirane" + | "Europe/Ulyanovsk" + | "Europe/Vaduz" + | "Europe/Vatican" + | "Europe/Vienna" + | "Europe/Vilnius" + | "Europe/Volgograd" + | "Europe/Warsaw" + | "Europe/Zagreb" + | "Europe/Zurich" + | "GMT" + | "Indian/Antananarivo" + | "Indian/Chagos" + | "Indian/Christmas" + | "Indian/Cocos" + | "Indian/Comoro" + | "Indian/Kerguelen" + | "Indian/Mahe" + | "Indian/Maldives" + | "Indian/Mauritius" + | "Indian/Mayotte" + | "Indian/Reunion" + | "Pacific/Apia" + | "Pacific/Auckland" + | "Pacific/Bougainville" + | "Pacific/Chatham" + | "Pacific/Chuuk" + | "Pacific/Easter" + | "Pacific/Efate" + | "Pacific/Fakaofo" + | "Pacific/Fiji" + | "Pacific/Funafuti" + | "Pacific/Galapagos" + | "Pacific/Gambier" + | "Pacific/Guadalcanal" + | "Pacific/Guam" + | "Pacific/Honolulu" + | "Pacific/Kanton" + | "Pacific/Kiritimati" + | "Pacific/Kosrae" + | "Pacific/Kwajalein" + | "Pacific/Majuro" + | "Pacific/Marquesas" + | "Pacific/Midway" + | "Pacific/Nauru" + | "Pacific/Niue" + | "Pacific/Norfolk" + | "Pacific/Noumea" + | "Pacific/Pago_Pago" + | "Pacific/Palau" + | "Pacific/Pitcairn" + | "Pacific/Pohnpei" + | "Pacific/Port_Moresby" + | "Pacific/Rarotonga" + | "Pacific/Saipan" + | "Pacific/Tahiti" + | "Pacific/Tarawa" + | "Pacific/Tongatapu" + | "Pacific/Wake" + | "Pacific/Wallis" + | "US/Alaska" + | "US/Arizona" + | "US/Central" + | "US/Eastern" + | "US/Hawaii" + | "US/Mountain" + | "US/Pacific" + | "UTC"; /** - * @description The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month. - * @default transfer_to_new_subscription + * @description To udpate a payment provider's ID, specify the payment provider you want to update in this field, and the payment_provider_id in the corresponding field. * @enum {string} */ - usage_behavior?: "transfer_to_new_subscription" | "keep_separate"; - /** @description Turn off auto renew for the subscription */ - turn_off_auto_renew?: boolean; - /** - * Format: date-time - * @description Change the end date for the subscription. - */ - end_date?: string; - }; - Tag: { - tag_name: string; - tag_hex: string; - tag_color: string; - }; - TagRequest: { - tag_name: string; - tag_hex: string; - tag_color: string; - }; - TargetCustomersRequest: { - customer_ids: string[]; - }; - TimezonesResponse: { - timezones: string[]; + payment_provider?: "stripe" | "braintree"; + payment_provider_id?: string; + nango_connected?: boolean; + tax_providers?: ("taxjar" | "lotus" | "netsuite")[]; }; - TopCustomers: { - original_plan_revenue: components["schemas"]["SingleCustomerValue"][]; - new_plan_revenue: components["schemas"]["SingleCustomerValue"][]; - biggest_pct_increase: components["schemas"]["SingleCustomerValue"][]; - biggest_pct_decrease: components["schemas"]["SingleCustomerValue"][]; + PatchedPlanUpdateRequest: { + /** @description Name of the plan */ + plan_name?: string; + /** @description Description of the plan */ + plan_description?: string; + taxjar_code?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; }; - TrackEventFailure: { - /** @enum {string} */ - success: "none"; - failed_events: { - [key: string]: Record | undefined; - }; + PatchedPlanVersionUpdateRequest: { + localized_name?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; }; - TrackEventSuccess: { + PaymentProcesorPostDataRequest: { /** @enum {string} */ - success: "all" | "some"; - failed_events: { + payment_processor: "stripe" | "braintree"; + data: { [key: string]: Record | undefined; }; }; - TransferSubscriptionsFailure: { - /** @enum {string} */ - status: "error"; - detail: string; - }; - TransferSubscriptionsRequestRequest: { - /** @enum {string} */ - source: "stripe" | "braintree"; - end_now: boolean; + PaymentProcesorPostRequestRequest: { + pp_info: components["schemas"]["PaymentProcesorPostDataRequest"]; }; - TransferSubscriptionsSuccess: { + PaymentProcesorPostResponse: { /** @enum {string} */ - status: "success"; - detail: string; + payment_processor: "stripe" | "braintree"; + success: boolean; + details: string; }; - UsageAlert: { - usage_alert_id: string; - metric: components["schemas"]["Metric"]; - plan_version: components["schemas"]["LightweightPlanVersion"]; + PeriodMetricRevenueResponse: { /** Format: double */ - threshold: number; - }; - UsageAlertCreate: { - /** Format: uuid */ - metric_id: string; - /** Format: uuid */ - plan_version_id: string; + total_revenue_period_1: number; /** Format: double */ - threshold: number; - }; - UsageAlertCreateRequest: { - /** Format: uuid */ - metric_id: string; - /** Format: uuid */ - plan_version_id: string; + total_revenue_period_2: number; /** Format: double */ - threshold: number; - }; - UsageAlertPayloadRequest: { - subscription: components["schemas"]["LightweightSubscriptionRecordRequest"]; - usage_alert: components["schemas"]["UsageAlertRequest"]; + earned_revenue_period_1: number; /** Format: double */ - usage: number; - /** Format: date-time */ - time_triggered: string; + earned_revenue_period_2: number; }; - UsageAlertRequest: { - metric: components["schemas"]["MetricRequest"]; - plan_version: components["schemas"]["LightweightPlanVersionRequest"]; - /** Format: double */ - threshold: number; + PeriodMetricUsageResponse: { + metrics: { + [key: string]: + | components["schemas"]["PeriodSingleMetricUsage"] + | undefined; + }; }; - UsageAlertTriggeredRequest: { - payload: components["schemas"]["UsageAlertPayloadRequest"]; + PeriodSingleMetricUsage: { + data: components["schemas"]["DayMetricUsage"][]; + }; + PeriodSubscriptionsResponse: { + period_1_total_subscriptions: number; + period_1_new_subscriptions: number; + period_2_total_subscriptions: number; + period_2_new_subscriptions: number; + }; + Plan: { + plan_id: string; + /** @description Name of the plan */ + plan_name: string; + /** + * @description Duration of the plan + * @enum {string|null} + */ + plan_duration: "monthly" | "quarterly" | "yearly" | "" | null; + /** @description Description of the plan */ + plan_description: string; + /** @description The external links that this plan has. */ + external_links: components["schemas"]["InitialExternalPlanLink"][]; + /** @description The number of versions that this plan has. */ + num_versions: number; + /** @description This plan's currently active version. */ + active_version: number; + /** @description The number of active subscriptions that this plan has across all versions. */ + active_subscriptions: number; + /** @description The tags that this plan has. */ + tags: readonly string[]; + /** @description This plan's versions. */ + versions: components["schemas"]["PlanVersion"][]; + /** + * @deprecated + * @description [DEPRECATED] The parent plan that this plan has. + */ + parent_plan: components["schemas"]["PlanNameAndID"] | null; + /** + * @deprecated + * @description [DEPRECATED] The target customer that this plan has. + */ + target_customer: components["schemas"]["LightweightCustomer"] | null; + /** + * @deprecated + * @description [DEPRECATED] Display version has been deprecated. Use 'versions' instead. We will still return this field for now with some heuristics for figuring out what the desired version is, but it will be removed in the near future. + */ + display_version: components["schemas"]["PlanVersion"]; + /** + * @deprecated + * @description [DEPRECATED] The status of this plan. + */ + status: string; }; - User: { - /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - username: string; - /** Format: email */ - email: string; - organization_name: string; - organization_id: string; + PlanComponent: { + billable_metric: components["schemas"]["Metric"]; + tiers: components["schemas"]["PriceTier"][]; + pricing_unit: components["schemas"]["PricingUnit"]; + /** @enum {string|null} */ + invoicing_interval_unit: "day" | "week" | "month" | "year" | "" | null; + invoicing_interval_count: number; + /** @enum {string|null} */ + reset_interval_unit: "day" | "week" | "month" | "year" | "" | null; + reset_interval_count: number; + prepaid_charge: components["schemas"]["ComponentCharge"] | null; }; - UserRequest: { - /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ - username: string; - /** Format: email */ - email: string; - organization_name: string; - organization_id: string; + PlanComponentCreateRequest: { + /** Format: uuid */ + metric_id: string; + tiers?: components["schemas"]["PriceTierCreateRequest"][]; + /** @enum {string|null} */ + invoicing_interval_unit?: "day" | "week" | "month" | "year" | "" | null; + invoicing_interval_count?: number; + /** @enum {string|null} */ + reset_interval_unit?: "day" | "week" | "month" | "year" | "" | null; + reset_interval_count?: number; + prepaid_charge?: + | components["schemas"]["ComponentChargeCreateRequest"] + | null; }; - WebhookEndpoint: { - webhook_endpoint_id: string; - name?: string; - webhook_url: string; - webhook_secret: string; - triggers: readonly components["schemas"]["WebhookTrigger"][]; + PlanCreateRequest: { + /** @description Name of the plan */ + plan_name: string; + /** @description Description of the plan */ + plan_description?: string; + /** + * @description Duration of the plan + * @enum {string|null} + */ + plan_duration: "monthly" | "quarterly" | "yearly" | "" | null; + initial_external_links?: components["schemas"]["InitialExternalPlanLinkRequest"][]; + initial_version: components["schemas"]["InitialPlanVersionCreateRequest"]; + tags?: components["schemas"]["TagRequest"][]; }; - WebhookEndpointRequest: { - name?: string; - webhook_url: string; - triggers_in: ( - | "invoice.created" - | "invoice.paid" - | "invoice.past_due" - | "usage_alert.triggered" - | "customer.created" - )[]; + PlanDetail: { + /** @description This plan's currently active version. */ + active_version: number; + taxjar_code?: string; + /** @description The number of versions that this plan has. */ + num_versions: number; + /** @description The external links that this plan has. */ + external_links: components["schemas"]["InitialExternalPlanLink"][]; + /** @description The number of active subscriptions that this plan has across all versions. */ + active_subscriptions: number; + /** @description Name of the plan */ + plan_name: string; + plan_id: string; + /** + * @description Duration of the plan + * @enum {string|null} + */ + plan_duration: "monthly" | "quarterly" | "yearly" | "" | null; + /** @description Description of the plan */ + plan_description: string; + /** @description The tags that this plan has. */ + tags: readonly components["schemas"]["Tag"][]; + versions: readonly components["schemas"]["PlanVersionDetail"][]; }; - WebhookTrigger: { - /** @enum {string} */ - trigger_name: - | "invoice.created" - | "invoice.paid" - | "invoice.past_due" - | "usage_alert.triggered" - | "customer.created"; + PlanNameAndID: { + /** @description Name of the plan */ + plan_name: string; + plan_id: string; }; - WebhookTriggerRequest: { - /** @enum {string} */ - trigger_name: - | "invoice.created" - | "invoice.paid" - | "invoice.past_due" - | "usage_alert.triggered" - | "customer.created"; + PlanRepresentation: { + plan_name: string; + plan_id: string; + /** Format: double */ + plan_revenue: number; }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; -} - -export type external = Record; - -export interface operations { - app_actions_list: { - /** @description API endpoint that allows events to be viewed. */ - parameters?: { - /** @description The pagination cursor value. */ - /** @description Number of results to return per page. */ - query?: { - c?: string; - page_size?: number; - }; + PlanUpdate: { + /** @description Name of the plan */ + plan_name?: string; + /** @description Description of the plan */ + plan_description?: string; + taxjar_code?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["PaginatedActionList"]; - }; - }; + PlanVersion: { + recurring_charges: readonly components["schemas"]["RecurringCharge"][]; + components: components["schemas"]["PlanComponent"][]; + features: components["schemas"]["Feature"][]; + price_adjustment: components["schemas"]["PriceAdjustment"] | null; + version: number | "custom_version"; + /** @enum {string} */ + status: + | "active" + | "retiring" + | "grandfathered" + | "deleted" + | "inactive" + | "not_started"; + plan_name: string; + currency: components["schemas"]["PricingUnit"]; + /** Format: date-time */ + active_from: string; + /** Format: date-time */ + active_to: string; + localized_name: string; + target_customers: components["schemas"]["LightweightCustomer"][]; + /** Format: date-time */ + created_on: string; + /** @deprecated */ + usage_billing_frequency: string; + /** + * @deprecated + * @enum {string} + */ + flat_fee_billing_type: "in_advance" | "in_arrears"; + /** + * Format: double + * @deprecated + */ + flat_rate: number; + /** @deprecated */ + description: string; }; - }; - app_addon_versions_create: { - requestBody: { - content: { - "application/json": components["schemas"]["AddOnVersionCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddOnVersionCreateRequest"]; - "multipart/form-data": components["schemas"]["AddOnVersionCreateRequest"]; - }; + PlanVersionCreateRequest: { + /** Format: uuid */ + plan_id: string; + recurring_charges?: components["schemas"]["RecurringChargeCreateRequest"][]; + components?: components["schemas"]["PlanComponentCreateRequest"][]; + features?: string[]; + price_adjustment?: components["schemas"]["PriceAdjustmentRequest"]; + day_anchor?: number; + month_anchor?: number; + currency_code: string; + version: number; + target_customer_ids?: string[]; + localized_name?: string; + /** @default false */ + make_active?: boolean; + /** + * @default replace_on_renewal + * @enum {string} + */ + make_active_type?: "replace_on_renewal" | "grandfather"; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["AddOnVersionDetail"]; - }; - }; + PlanVersionDetail: { + price_adjustment: components["schemas"]["PriceAdjustment"] | null; + version: number | "custom_version"; + /** @enum {string} */ + status: + | "active" + | "retiring" + | "grandfathered" + | "deleted" + | "inactive" + | "not_started"; + plan_name: string; + /** Format: date-time */ + created_on: string; + plan_id: string; + target_customers: components["schemas"]["LightweightCustomer"][]; + transition_to: components["schemas"]["LightweightPlan"]; + recurring_charges: readonly components["schemas"]["RecurringCharge"][]; + replace_with: components["schemas"]["LightweightPlanVersion"]; + /** Format: date-time */ + active_from: string; + currency: components["schemas"]["PricingUnit"]; + active_subscriptions: number; + version_id: string; + alerts: readonly components["schemas"]["UsageAlert"][]; + localized_name: string; + features: components["schemas"]["Feature"][]; + components: components["schemas"]["PlanComponent"][]; + /** Format: date-time */ + active_to: string; }; - }; - app_addon_versions_partial_update: { - parameters: { - path: { - version_id: string; - }; + PlanVersionHistoricalSubscription: { + customer_id: string; + customer_name: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew: boolean; }; - requestBody?: { - content: { - "application/json": components["schemas"]["PatchedAddOnVersionUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedAddOnVersionUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedAddOnVersionUpdateRequest"]; - }; + PlanVersionNumberSetReplaceWithResponse: { + success: boolean; + message: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["AddOnVersionUpdate"]; - }; - }; + PlanVersionNumberSetTransitionToResponse: { + success: boolean; + message: string; }; - }; - app_addon_versions_delete_create: { - parameters: { - path: { - version_id: string; - }; + PlanVersionUpdate: { + localized_name?: string; + /** Format: date-time */ + active_from?: string; + /** Format: date-time */ + active_to?: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["DeleteAddOnVersion"]; - }; - }; + PlansByNumCustomers: { + results: components["schemas"]["SinglePlanNumCustomers"][]; + /** @enum {string} */ + status: "success"; }; - }; - app_addons_list: { - responses: { - 200: { - content: { - "application/json": components["schemas"]["AddOnDetail"][]; - }; - }; + PlansSetReplaceWithForVersionNumberRequest: { + /** @description The version number of the plan that will replace the current version. */ + replacement_version_number: number; }; - }; - app_addons_create: { - requestBody: { - content: { - "application/json": components["schemas"]["AddOnCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddOnCreateRequest"]; - "multipart/form-data": components["schemas"]["AddOnCreateRequest"]; - }; + PlansSetTransitionToForVersionNumberRequest: { + /** @description The plan that the current version will transition to. */ + transition_to_plan_id: number; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["AddOnDetail"]; - }; - }; + PriceAdjustment: { + price_adjustment_name: string; + price_adjustment_description: string; + /** @enum {string} */ + price_adjustment_type: "percentage" | "fixed" | "price_override"; + /** Format: double */ + price_adjustment_amount: number; }; - }; - app_addons_retrieve: { - parameters: { - path: { - addon_id: string; - }; + PriceAdjustmentRequest: { + /** @default */ + price_adjustment_name?: string; + price_adjustment_description?: string; + /** @enum {string} */ + price_adjustment_type: "percentage" | "fixed" | "price_override"; + /** Format: double */ + price_adjustment_amount: number; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["AddOnDetail"]; - }; - }; + PriceTier: { + /** @enum {unknown} */ + type: "flat" | "per_unit" | "free"; + /** Format: double */ + range_start: number; + /** Format: double */ + range_end: number; + /** Format: double */ + cost_per_batch: number; + /** Format: double */ + metric_units_per_batch: number; + /** @enum {unknown|null} */ + batch_rounding_type: + | "round_up" + | "round_down" + | "round_nearest" + | "no_rounding" + | "" + | null; }; - }; - app_addons_partial_update: { - parameters: { - path: { - addon_id: string; - }; + PriceTierCreateRequest: { + /** @enum {string} */ + type: "flat" | "per_unit" | "free"; + /** Format: double */ + range_start: number; + /** Format: double */ + range_end?: number; + /** Format: double */ + cost_per_batch?: number; + /** Format: double */ + metric_units_per_batch?: number; + /** + * @default no_rounding + * @enum {string|null} + */ + batch_rounding_type?: + | "round_up" + | "round_down" + | "round_nearest" + | "no_rounding" + | "" + | null; }; - requestBody?: { - content: { - "application/json": components["schemas"]["PatchedAddOnUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedAddOnUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedAddOnUpdateRequest"]; - }; + PricingUnit: { + code: string; + name: string; + symbol: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["AddOnUpdate"]; - }; - }; + PricingUnitDetail: { + code: string; + name: string; + symbol: string; }; - }; - app_addons_delete_create: { - parameters: { - path: { - addon_id: string; - }; + PricingUnitDetailRequest: { + code: string; + name: string; + symbol: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["DeleteAddOn"]; - }; - }; + PricingUnitRequest: { + code: string; + name: string; + symbol: string; }; - }; - app_addons_features_add_create: { - parameters: { - path: { - addon_id: string; - }; + RecurringCharge: { + name: string; + /** @enum {string} */ + charge_timing: "in_advance" | "in_arrears"; + /** @enum {string} */ + charge_behavior: "prorate" | "full"; + /** Format: double */ + amount: number; + pricing_unit: components["schemas"]["PricingUnit"]; + /** @enum {string|null} */ + invoicing_interval_unit: "day" | "week" | "month" | "year" | "" | null; + invoicing_interval_count: number; + /** @enum {string|null} */ + reset_interval_unit: "day" | "week" | "month" | "year" | "" | null; + reset_interval_count: number; }; - requestBody: { - content: { - "application/json": components["schemas"]["AddFeatureToAddOnRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddFeatureToAddOnRequest"]; - "multipart/form-data": components["schemas"]["AddFeatureToAddOnRequest"]; - }; + RecurringChargeCreateRequest: { + name: string; + /** @enum {string} */ + charge_timing: "in_advance" | "in_arrears"; + /** + * @default prorate + * @enum {string} + */ + charge_behavior?: "prorate" | "full"; + /** Format: double */ + amount: number; + pricing_unit_code?: string; + /** @enum {string|null} */ + invoicing_interval_unit?: "day" | "week" | "month" | "year" | "" | null; + invoicing_interval_count?: number; + /** @enum {string|null} */ + reset_interval_unit?: "day" | "week" | "month" | "year" | "" | null; + reset_interval_count?: number; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["AddFeatureToAddOnResponse"]; - }; - }; + RegistrationDetailRequest: { + organization_name: string; + industry: string; + email: string; + password: string; + username: string; }; - }; - app_api_tokens_list: { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - responses: { - 200: { - content: { - "application/json": components["schemas"]["APIToken"][]; - }; - }; + RegistrationFailure: { + detail: string; }; - }; - app_api_tokens_create: { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - requestBody?: { - content: { - "application/json": components["schemas"]["APITokenRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["APITokenRequest"]; - "multipart/form-data": components["schemas"]["APITokenRequest"]; - }; + RegistrationRequest: { + register: components["schemas"]["RegistrationDetailRequest"]; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["APITokenCreateResponse"]; - }; - }; + RegistrationSuccess: { + detail: string; + token: string; + user: components["schemas"]["User"]; }; - }; - app_api_tokens_destroy: { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - parameters: { - path: { - prefix: string; - }; + RemovePlanTags: { + tags?: components["schemas"]["Tag"][]; + success: boolean; + message: string; }; - responses: { - /** @description No response body */ - 204: never; + RemovePlanTagsRequest: { + tags?: components["schemas"]["TagRequest"][]; }; - }; - app_api_tokens_roll_create: { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - parameters: { - path: { - prefix: string; - }; + RemoveTargetCustomerResponse: { + success: boolean; + message: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["APITokenRollResponse"]; - }; - }; + ResetPasswordRequestRequest: { + userId: string; + password: string; + token: string; }; - }; - app_backtests_list: { - responses: { - 200: { - content: { - "application/json": components["schemas"]["BacktestSummary"][]; - }; - }; + ResetPasswordSuccess: { + detail: string; + token: string; }; - }; - app_backtests_create: { - requestBody: { - content: { - "application/json": components["schemas"]["BacktestCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["BacktestCreateRequest"]; - "multipart/form-data": components["schemas"]["BacktestCreateRequest"]; - }; + RevenueDate: { + /** Format: date */ + date: string; + /** Format: double */ + original_plan_revenue: number; + /** Format: double */ + new_plan_revenue: number; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["BacktestCreate"]; - }; - }; + Seller: { + name: string; + address?: components["schemas"]["Address"] | null; + phone?: string; + /** Format: email */ + email?: string; }; - }; - app_backtests_retrieve: { - parameters: { - path: { - backtest_id: string; - }; + SellerRequest: { + name: string; + phone?: string; + /** Format: email */ + email?: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["BacktestDetail"]; - }; - }; + SessionSuccess: { + isAuthenticated: boolean; }; - }; - app_cost_analysis_retrieve: { - /** @description Returns the revenue for an organization in a given time period. */ - parameters: { - query: { - customer_id: string; - end_date: string; - start_date: string; - }; + SetPlanTagsRequest: { + tags?: components["schemas"]["TagRequest"][]; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CostAnalysis"]; - }; - }; + SetPlanTagsResponse: { + tags?: components["schemas"]["Tag"][]; + success: boolean; + message: string; }; - }; - app_credits_list: { - parameters: { - /** @description Filter to adjustments in a specific currency */ - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - /** @description Filter to adjustments that are effective after this date */ - /** @description Filter to adjustments that are effective before this date */ - /** @description Filter to adjustments that expire after this date */ - /** @description Filter to adjustments that expire before this date */ - /** @description Filter to adjustments that were issued after this date */ - /** @description Filter to adjustments that were issued before this date */ - /** @description Filter to a specific set of adjustment statuses. Defaults to both active and inactive. */ - query: { - currency_code?: string; - customer_id: string; - effective_after?: string; - effective_before?: string; - expires_after?: string; - expires_before?: string; - issued_after?: string; - issued_before?: string; - status?: ("active" | "inactive")[]; - }; + SetReplaceWithRequest: { + /** + * Format: uuid + * @description The plan version to replace the current version with. + */ + replace_with: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustment"][]; - }; - }; + SetReplaceWithResponse: { + success: boolean; + message: string; }; - }; - app_credits_create: { - requestBody: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustmentCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["CustomerBalanceAdjustmentCreateRequest"]; - "multipart/form-data": components["schemas"]["CustomerBalanceAdjustmentCreateRequest"]; - }; + SingleCustomerValue: { + customer_id: string; + customer_name: string; + /** Format: double */ + value: number; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustment"]; - }; - }; + SingleDayCostAnalysis: { + /** Format: date */ + date: string; + cost_data: components["schemas"]["SingleMetricCost"][]; + /** Format: double */ + revenue: number; }; - }; - app_credits_retrieve: { - parameters: { - /** @description The ID of the credit to retrieve or update. */ - path: { - credit_id: string; - }; + SingleMetricCost: { + metric: components["schemas"]["MetricDetail"]; + /** Format: double */ + cost: number; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustment"]; - }; - }; + SinglePaymentProcesor: { + payment_provider_name: string; + connected: boolean; + /** Format: uri */ + redirect_url: string; + self_hosted: boolean; + connection_id: string; + working: boolean; + account_id: string; }; - }; - app_credits_update_create: { - parameters: { - /** @description The ID of the credit to retrieve or update. */ - path: { - credit_id: string; - }; + SinglePlanNumCustomers: { + plan_name: string; + num_customers: number; + /** Format: double */ + percent_total: number; }; - requestBody?: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustmentUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["CustomerBalanceAdjustmentUpdateRequest"]; - "multipart/form-data": components["schemas"]["CustomerBalanceAdjustmentUpdateRequest"]; - }; + SingleSubstitution: { + substitution_name: string; + original_plan: components["schemas"]["PlanRepresentation"]; + new_plan: components["schemas"]["PlanRepresentation"]; + /** Format: double */ + pct_revenue_change: number; + results: components["schemas"]["SingleSubstitutionResults"]; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustment"]; - }; - }; + SingleSubstitutionResults: { + cumulative_revenue: components["schemas"]["RevenueDate"][]; + revenue_by_metric: components["schemas"]["MetricRevenue"][]; + top_customers: components["schemas"]["TopCustomers"]; }; - }; - app_credits_void_create: { - parameters: { - /** @description The ID of the credit to retrieve or update. */ - path: { - credit_id: string; - }; + SubscriptionCancelledRequest: { + payload: components["schemas"]["SubscriptionRecordRequest"]; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerBalanceAdjustment"]; - }; - }; + SubscriptionCategoricalFilter: { + value: string; + /** @description The string name of the property to filter on. Example: 'product_id' */ + property_name: string; }; - }; - app_customers_list: { - responses: { - 200: { - content: { - "application/json": components["schemas"]["Customer"][]; - }; - }; + SubscriptionCategoricalFilterRequest: { + value: string; + /** @description The string name of the property to filter on. Example: 'product_id' */ + property_name: string; }; - }; - app_customers_create: { - requestBody: { - content: { - "application/json": components["schemas"]["CustomerCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["CustomerCreateRequest"]; - "multipart/form-data": components["schemas"]["CustomerCreateRequest"]; - }; + SubscriptionCreatedRequest: { + payload: components["schemas"]["SubscriptionRecordRequest"]; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["Customer"]; - }; - }; + SubscriptionCustomerSummary: { + billing_plan_name: string; + plan_version: number; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew?: boolean; }; - }; - app_customers_retrieve: { - parameters: { - path: { - customer_id: string; + SubscriptionRecord: { + subscription_id: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew: boolean; + /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ + is_new: boolean; + subscription_filters: components["schemas"]["SubscriptionCategoricalFilter"][]; + customer: components["schemas"]["LightweightCustomer"]; + billing_plan: components["schemas"]["LightweightPlanVersion"]; + fully_billed: boolean; + addons: components["schemas"]["LightweightAddOnSubscriptionRecord"][]; + metadata: { + [key: string]: Record | undefined; }; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["Customer"]; - }; - }; + SubscriptionRecordCancelRequest: { + /** + * @description When canceling a subscription, the behavior used to calculate the flat fee. If null or not provided, the charge's default behavior will be used according to the subscription's start and end dates. If charge_full, the full flat fee will be charged, regardless of the duration of the subscription. If refund, the flat fee will not be charged. If charge_prorated, the prorated flat fee will be charged. + * @enum {string|null} + */ + flat_fee_behavior?: + | "refund" + | "charge_prorated" + | "charge_full" + | "" + | null; + /** + * @description If bill_full, current usage will be billed on the invoice. If bill_none, current unbilled usage will be dropped from the invoice. Defaults to bill_full. + * @default bill_full + * @enum {string} + */ + usage_behavior?: "bill_full" | "bill_none"; + /** + * @description Whether to invoice now or invoice at the end of the billing period. Defaults to invoice now. + * @default invoice_now + * @enum {string} + */ + invoicing_behavior?: "add_to_next_invoice" | "invoice_now"; }; - }; - app_customers_partial_update: { - parameters: { - path: { - customer_id: string; + SubscriptionRecordCreateRequest: { + /** + * Format: date-time + * @description The date the subscription starts. This should be a string in YYYY-MM-DD format of the date in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The date the subscription ends. This should be a string in YYYY-MM-DD format of the date in UTC time. If you don’t set it (recommended), we will use the information in the billing plan to automatically calculate this. + */ + end_date?: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew?: boolean; + is_new?: boolean; + /** @description Add filter key, value pairs that define which events will be applied to this plan subscription. */ + subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + /** @description The id provided when creating the customer */ + customer_id: string; + /** + * Format: uuid + * @description The Lotus plan_id, found in the billing plan object. We will make a best-effort attempt to find the correct plan version (matching preferred currencies, prioritizing custom plans), but if more than one plan version or no plan version matches these criteria this will return an error. + */ + plan_id?: string; + /** @description The initial units for the plan components' prepaid fixed charges. This is only required if the plan has plan components where you did not specify the initial units. */ + component_fixed_charges_initial_units?: components["schemas"]["ComponentsFixedChargeInitialValueRequest"][]; + /** @description A JSON object containing additional information about the subscription. */ + metadata?: { + [key: string]: Record | undefined; }; }; - requestBody?: { - content: { - "application/json": components["schemas"]["PatchedCustomerUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedCustomerUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedCustomerUpdateRequest"]; - }; + SubscriptionRecordCreateSerializerOldRequest: { + /** + * Format: date-time + * @description The date the subscription starts. This should be a string in YYYY-MM-DD format of the date in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The date the subscription ends. This should be a string in YYYY-MM-DD format of the date in UTC time. If you don’t set it (recommended), we will use the information in the billing plan to automatically calculate this. + */ + end_date?: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew?: boolean; + is_new?: boolean; + /** @description Add filter key, value pairs that define which events will be applied to this plan subscription. */ + subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + /** @description The id provided when creating the customer */ + customer_id: string; + /** + * Format: uuid + * @description The Lotus plan_id, found in the billing plan object. This field has been deprecated in favor of version_id for the sake of being explicit. If used, a best effort will be made to find the correct plan version (matching preferred currencies, prioritizing custom plans), but if more than one plan versions matches this criteria this will return an error. + */ + plan_id?: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerUpdate"]; - }; + SubscriptionRecordRequest: { + subscription_id: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + start_date: string; + /** + * Format: date-time + * @description The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time. + */ + end_date: string; + /** @description Whether the subscription automatically renews. Defaults to true. */ + auto_renew: boolean; + /** @description Whether this subscription came from a renewal or from a first-time. Defaults to true on creation. */ + is_new: boolean; + subscription_filters: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + billing_plan: components["schemas"]["LightweightPlanVersionRequest"]; + addons: components["schemas"]["LightweightAddOnSubscriptionRecordRequest"][]; + metadata: { + [key: string]: Record | undefined; }; }; - }; - app_customers_delete_create: { - parameters: { - path: { - customer_id: string; + SubscriptionRecordSwitchPlanRequest: { + /** + * Format: uuid + * @description The new plan to switch to. + */ + switch_plan_id?: string; + /** + * @description The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation. + * @default invoice_now + * @enum {string} + */ + invoicing_behavior?: "add_to_next_invoice" | "invoice_now"; + /** + * @description The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month. + * @default transfer_to_new_subscription + * @enum {string} + */ + usage_behavior?: "transfer_to_new_subscription" | "keep_separate"; + /** @description The initial units for the plan components' prepaid fixed charges. In the context of swithciong plans, this is only required if the new plan has a component the old plan did not have, that has a prepaid charge, that deos not have a default. */ + component_fixed_charges_initial_units?: components["schemas"]["ComponentsFixedChargeInitialValueRequest"][]; + }; + SubscriptionRecordUpdateRequest: { + /** @description Turn off auto renew for the subscription */ + turn_off_auto_renew?: boolean; + /** + * Format: date-time + * @description Change the end date for the subscription. + */ + end_date?: string; + /** @description Update the metadata for the subscription. */ + metadata?: { + [key: string]: Record | undefined; }; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerDeleteResponse"]; - }; - }; + SubscriptionRecordUpdateSerializerOldRequest: { + /** + * Format: uuid + * @description [DEPRECATED] Will currently perform a best-effort attempt to find the correct plan version to replace the current plan with. If more than one plan version matches the criteria, this will return an error. Use the change_plan method of a subscription instance instead. + */ + replace_plan_id?: string; + /** + * @description The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation. + * @default invoice_now + * @enum {string} + */ + invoicing_behavior?: "add_to_next_invoice" | "invoice_now"; + /** + * @description The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas keep_separate will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month. + * @default transfer_to_new_subscription + * @enum {string} + */ + usage_behavior?: "transfer_to_new_subscription" | "keep_separate"; + /** @description Turn off auto renew for the subscription */ + turn_off_auto_renew?: boolean; + /** + * Format: date-time + * @description Change the end date for the subscription. + */ + end_date?: string; + }; + SubscriptionRenewedRequest: { + payload: components["schemas"]["SubscriptionRecordRequest"]; }; - }; - app_customers_summary_retrieve: { - /** @description Get the current settings for the organization. */ - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerSummary"]; - }; - }; + Tag: { + tag_name: string; + tag_hex: string; + tag_color: string; }; - }; - app_customers_totals_retrieve: { - /** @description Get the current settings for the organization. */ - responses: { - 200: { - content: { - "application/json": components["schemas"]["CustomerWithRevenue"]; - }; - }; + TagRequest: { + tag_name: string; + tag_hex: string; + tag_color: string; }; - }; - app_demo_login_create: { - requestBody: { - content: { - "application/json": components["schemas"]["DemoLoginRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["DemoLoginRequestRequest"]; - "multipart/form-data": components["schemas"]["DemoLoginRequestRequest"]; - }; + TargetCustomersRequest: { + customer_ids: string[]; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["DemoLoginSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["DemoLoginFailure"]; - }; - }; + TimezonesResponse: { + timezones: string[]; }; - }; - app_demo_register_create: { - requestBody: { - content: { - "application/json": components["schemas"]["DemoRegistrationRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["DemoRegistrationRequest"]; - "multipart/form-data": components["schemas"]["DemoRegistrationRequest"]; - }; + TopCustomers: { + original_plan_revenue: components["schemas"]["SingleCustomerValue"][]; + new_plan_revenue: components["schemas"]["SingleCustomerValue"][]; + biggest_pct_increase: components["schemas"]["SingleCustomerValue"][]; + biggest_pct_decrease: components["schemas"]["SingleCustomerValue"][]; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["DemoRegistrationSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["DemoRegistrationFailure"]; - }; + TrackEventFailure: { + /** @enum {string} */ + success: "none"; + failed_events: { + [key: string]: Record | undefined; }; }; - }; - app_draft_invoice_retrieve: { - /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ - parameters: { - /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ - query: { - customer_id: string; - include_next_period?: boolean; + TrackEventSuccess: { + /** @enum {string} */ + success: "all" | "some"; + failed_events: { + [key: string]: Record | undefined; }; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["DraftInvoiceResponse"]; - }; - }; + TransferSubscriptionsFailure: { + /** @enum {string} */ + status: "error"; + detail: string; }; - }; - app_events_list: { - /** @description API endpoint that allows events to be viewed. */ - parameters?: { - /** @description The pagination cursor value. */ - /** @description Number of results to return per page. */ - query?: { - c?: string; - page_size?: number; - }; + TransferSubscriptionsRequestRequest: { + /** @enum {string} */ + source: "stripe" | "braintree"; + end_now: boolean; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["PaginatedEventDetailList"]; - }; - }; + TransferSubscriptionsSuccess: { + /** @enum {string} */ + status: "success"; + detail: string; }; - }; - app_external_plan_links_create: { - requestBody: { - content: { - "application/json": components["schemas"]["ExternalPlanLinkRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ExternalPlanLinkRequest"]; - "multipart/form-data": components["schemas"]["ExternalPlanLinkRequest"]; - }; + URLResponse: { + /** Format: uri */ + url: string; + exists: boolean; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["ExternalPlanLink"]; - }; - }; + UsageAlert: { + usage_alert_id: string; + metric: components["schemas"]["Metric"]; + plan_version: components["schemas"]["LightweightPlanVersion"]; + /** Format: double */ + threshold: number; }; - }; - app_external_plan_links_destroy: { - parameters: { - query: { - source: "stripe" | "braintree"; - }; - path: { - external_plan_id: string; - }; + UsageAlertCreate: { + /** Format: uuid */ + metric_id: string; + /** Format: uuid */ + plan_version_id: string; + /** Format: double */ + threshold: number; }; - responses: { - /** @description No response body */ - 204: never; + UsageAlertCreateRequest: { + /** Format: uuid */ + metric_id: string; + /** Format: uuid */ + plan_version_id: string; + /** Format: double */ + threshold: number; }; - }; - app_features_list: { - responses: { - 200: { - content: { - "application/json": components["schemas"]["FeatureDetail"][]; - }; - }; + UsageAlertPayloadRequest: { + subscription: components["schemas"]["LightweightSubscriptionRecordRequest"]; + usage_alert: components["schemas"]["UsageAlertRequest"]; + /** Format: double */ + usage: number; + /** Format: date-time */ + time_triggered: string; }; - }; - app_features_create: { - requestBody: { - content: { - "application/json": components["schemas"]["FeatureCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["FeatureCreateRequest"]; - "multipart/form-data": components["schemas"]["FeatureCreateRequest"]; - }; + UsageAlertRequest: { + metric: components["schemas"]["MetricRequest"]; + plan_version: components["schemas"]["LightweightPlanVersionRequest"]; + /** Format: double */ + threshold: number; }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["FeatureDetail"]; - }; - }; + UsageAlertTriggeredRequest: { + payload: components["schemas"]["UsageAlertPayloadRequest"]; }; - }; - app_import_customers_create: { - requestBody: { - content: { - "application/json": components["schemas"]["ImportCustomersRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ImportCustomersRequestRequest"]; - "multipart/form-data": components["schemas"]["ImportCustomersRequestRequest"]; - }; + User: { + /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ + username: string; + /** Format: email */ + email: string; + organization_name: string; + organization_id: string; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["ImportCustomerSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["ImportCustomerFailure"]; - }; - }; + UserRequest: { + /** @description Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */ + username: string; + /** Format: email */ + email: string; + organization_name: string; + organization_id: string; + }; + WebhookEndpoint: { + webhook_endpoint_id: string; + name?: string; + webhook_url: string; + webhook_secret: string; + triggers: readonly components["schemas"]["WebhookTrigger"][]; + }; + WebhookEndpointRequest: { + name?: string; + webhook_url: string; + triggers_in: ( + | "customer.created" + | "invoice.created" + | "invoice.paid" + | "invoice.past_due" + | "subscription.created" + | "usage_alert.triggered" + | "subscription.cancelled" + | "subscription.renewed" + )[]; }; - }; - app_import_payment_objects_create: { - requestBody: { - content: { - "application/json": components["schemas"]["ImportPaymentObjectsRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ImportPaymentObjectsRequestRequest"]; - "multipart/form-data": components["schemas"]["ImportPaymentObjectsRequestRequest"]; - }; + WebhookTrigger: { + /** @enum {string} */ + trigger_name: + | "customer.created" + | "invoice.created" + | "invoice.paid" + | "invoice.past_due" + | "subscription.created" + | "usage_alert.triggered" + | "subscription.cancelled" + | "subscription.renewed"; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["ImportPaymentObjectSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["ImportPaymentObjectFailure"]; - }; - }; + WebhookTriggerRequest: { + /** @enum {string} */ + trigger_name: + | "customer.created" + | "invoice.created" + | "invoice.paid" + | "invoice.past_due" + | "subscription.created" + | "usage_alert.triggered" + | "subscription.cancelled" + | "subscription.renewed"; }; }; - app_invoices_list: { + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} + +export type external = Record; + +export interface operations { + app_actions_list: { + /** @description API endpoint that allows events to be viewed. */ parameters?: { - /** @description A filter for invoices for a specific customer */ - /** @description A filter for invoices with a specific payment status */ + /** @description The pagination cursor value. */ + /** @description Number of results to return per page. */ query?: { - customer_id?: string; - payment_status?: ("unpaid" | "paid")[]; + c?: string; + page_size?: number; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["Invoice"][]; + "application/json": components["schemas"]["PaginatedActionList"]; }; }; }; }; - app_invoices_create: { + app_addon_versions_create: { requestBody: { content: { - "application/json": components["schemas"]["InvoiceRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["InvoiceRequest"]; - "multipart/form-data": components["schemas"]["InvoiceRequest"]; + "application/json": components["schemas"]["AddOnVersionCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddOnVersionCreateRequest"]; + "multipart/form-data": components["schemas"]["AddOnVersionCreateRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["Invoice"]; - }; - }; - }; - }; - app_invoices_retrieve: { - parameters: { - path: { - invoice_id: string; - }; - }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["Invoice"]; + "application/json": components["schemas"]["AddOnVersionDetail"]; }; }; }; }; - app_invoices_partial_update: { + app_addon_versions_partial_update: { parameters: { path: { - invoice_id: string; + version_id: string; }; }; requestBody?: { content: { - "application/json": components["schemas"]["PatchedInvoiceUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedInvoiceUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedInvoiceUpdateRequest"]; - }; - }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["InvoiceUpdate"]; - }; - }; - }; - }; - app_invoices_pdf_url_retrieve: { - parameters: { - /** @description Either an invoice ID (in the format `invoice_`) or an invoice number (in the format `YYMMDD-000001`) */ - path: { - invoice_id: string; + "application/json": components["schemas"]["PatchedAddOnVersionUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedAddOnVersionUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedAddOnVersionUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["Invoice"]; + "application/json": components["schemas"]["AddOnVersionUpdate"]; }; }; }; }; - app_invoices_send_create: { + app_addon_versions_delete_create: { parameters: { path: { - invoice_id: string; - }; - }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["InvoiceDetail"]; - }; - }; - }; - }; - app_login_create: { - requestBody: { - content: { - "application/json": components["schemas"]["LoginRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["LoginRequestRequest"]; - "multipart/form-data": components["schemas"]["LoginRequestRequest"]; - }; - }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["LoginSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["LoginFailure"]; - }; + version_id: string; }; }; - }; - app_logout_create: { responses: { 200: { content: { - "application/json": components["schemas"]["LogoutSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["LogoutFailure"]; + "application/json": components["schemas"]["DeleteAddOnVersion"]; }; }; }; }; - app_metrics_list: { + app_addons_list: { responses: { 200: { content: { - "application/json": components["schemas"]["MetricDetail"][]; + "application/json": components["schemas"]["AddOnDetail"][]; }; }; }; }; - app_metrics_create: { + app_addons_create: { requestBody: { content: { - "application/json": components["schemas"]["MetricCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["MetricCreateRequest"]; - "multipart/form-data": components["schemas"]["MetricCreateRequest"]; + "application/json": components["schemas"]["AddOnCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddOnCreateRequest"]; + "multipart/form-data": components["schemas"]["AddOnCreateRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["MetricDetail"]; + "application/json": components["schemas"]["AddOnDetail"]; }; }; }; }; - app_metrics_retrieve: { + app_addons_retrieve: { parameters: { path: { - metric_id: string; + addon_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["MetricDetail"]; + "application/json": components["schemas"]["AddOnDetail"]; }; }; }; }; - app_metrics_partial_update: { + app_addons_partial_update: { parameters: { path: { - metric_id: string; + addon_id: string; }; }; requestBody?: { content: { - "application/json": components["schemas"]["PatchedMetricUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedMetricUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedMetricUpdateRequest"]; - }; - }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["MetricUpdate"]; - }; + "application/json": components["schemas"]["PatchedAddOnUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedAddOnUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedAddOnUpdateRequest"]; }; }; - }; - app_netsuite_invoices_retrieve: { responses: { 200: { content: { - "application/json": components["schemas"]["NetsuiteInvoiceCSVView"]; + "application/json": components["schemas"]["AddOnUpdate"]; }; }; }; }; - app_organization_invite_create: { - requestBody: { - content: { - "application/json": components["schemas"]["InviteRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["InviteRequestRequest"]; - "multipart/form-data": components["schemas"]["InviteRequestRequest"]; + app_addons_delete_create: { + parameters: { + path: { + addon_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["InviteResponse"]; + "application/json": components["schemas"]["DeleteAddOn"]; }; }; }; }; - app_organization_invite_link_create: { + app_addons_features_add_create: { + parameters: { + path: { + addon_id: string; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["InviteRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["InviteRequestRequest"]; - "multipart/form-data": components["schemas"]["InviteRequestRequest"]; + "application/json": components["schemas"]["AddFeatureToAddOnRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddFeatureToAddOnRequest"]; + "multipart/form-data": components["schemas"]["AddFeatureToAddOnRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["InviteLinkResponse"]; + "application/json": components["schemas"]["AddFeatureToAddOnResponse"]; }; }; }; }; - app_organization_settings_list: { - parameters?: { - /** @description Filters organization_settings to a single setting_group. Defaults to returning all settings. */ - /** @description Filters organization_settings by setting_name. Defaults to returning all settings. */ - query?: { - setting_group?: "stripe" | "braintree" | "billing"; - setting_name?: ( - | "generate_customer_after_creating_in_lotus" - | "gen_cust_in_braintree_after_lotus" - | "subscription_filter_keys" - | "payment_grace_period" - )[]; - }; - }; + app_api_tokens_list: { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ responses: { 200: { content: { - "application/json": components["schemas"]["OrganizationSetting"][]; + "application/json": components["schemas"]["APIToken"][]; }; }; }; }; - app_organization_settings_retrieve: { - parameters: { - path: { - setting_id: string; + app_api_tokens_create: { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ + requestBody?: { + content: { + "application/json": components["schemas"]["APITokenRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["APITokenRequest"]; + "multipart/form-data": components["schemas"]["APITokenRequest"]; }; }; responses: { - 200: { + 201: { content: { - "application/json": components["schemas"]["OrganizationSetting"]; + "application/json": components["schemas"]["APITokenCreateResponse"]; }; }; }; }; - app_organization_settings_partial_update: { + app_api_tokens_destroy: { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ parameters: { path: { - setting_id: string; + prefix: string; }; }; - requestBody?: { - content: { - "application/json": components["schemas"]["PatchedOrganizationSettingUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedOrganizationSettingUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedOrganizationSettingUpdateRequest"]; + responses: { + /** @description No response body */ + 204: never; + }; + }; + app_api_tokens_roll_create: { + /** @description API endpoint that allows API Tokens to be viewed or edited. */ + parameters: { + path: { + prefix: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["OrganizationSettingUpdate"]; + "application/json": components["schemas"]["APITokenRollResponse"]; }; }; }; }; - app_organizations_list: { + app_backtests_list: { responses: { 200: { content: { - "application/json": components["schemas"]["Organization"][]; + "application/json": components["schemas"]["BacktestSummary"][]; }; }; }; }; - app_organizations_create: { + app_backtests_create: { requestBody: { content: { - "application/json": components["schemas"]["OrganizationCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["OrganizationCreateRequest"]; - "multipart/form-data": components["schemas"]["OrganizationCreateRequest"]; + "application/json": components["schemas"]["BacktestCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["BacktestCreateRequest"]; + "multipart/form-data": components["schemas"]["BacktestCreateRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["Organization"]; + "application/json": components["schemas"]["BacktestCreate"]; }; }; }; }; - app_organizations_partial_update: { + app_backtests_retrieve: { parameters: { path: { - organization_id: string; - }; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PatchedOrganizationUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedOrganizationUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedOrganizationUpdateRequest"]; + backtest_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["Organization"]; + "application/json": components["schemas"]["BacktestDetail"]; }; }; }; }; - app_payment_providers_list: { + app_cost_analysis_retrieve: { + /** @description Returns the revenue for an organization in a given time period. */ + parameters: { + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + query: { + customer_id: string; + end_date: string; + start_date: string; + }; + }; responses: { 200: { content: { - "application/json": components["schemas"]["SinglePaymentProcesor"][]; + "application/json": components["schemas"]["CostAnalysis"]; }; }; }; }; - app_payment_providers_create: { - requestBody: { - content: { - "application/json": components["schemas"]["PaymentProcesorPostRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PaymentProcesorPostRequestRequest"]; - "multipart/form-data": components["schemas"]["PaymentProcesorPostRequestRequest"]; + app_credits_list: { + parameters: { + /** @description Filter to adjustments in a specific currency */ + /** @description The id provided when creating the customer, we suggest matching with your internal customer id in your backend */ + /** @description Filter to adjustments that are effective after this date */ + /** @description Filter to adjustments that are effective before this date */ + /** @description Filter to adjustments that expire after this date */ + /** @description Filter to adjustments that expire before this date */ + /** @description Filter to adjustments that were issued after this date */ + /** @description Filter to adjustments that were issued before this date */ + /** @description Filter to a specific set of adjustment statuses. Defaults to both active and inactive. */ + query: { + currency_code?: string; + customer_id: string; + effective_after?: string; + effective_before?: string; + expires_after?: string; + expires_before?: string; + issued_after?: string; + issued_before?: string; + status?: ("active" | "inactive")[]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PaymentProcesorPostResponse"]; + "application/json": components["schemas"]["CustomerBalanceAdjustment"][]; }; }; }; }; - app_period_events_retrieve: { - /** @description Returns the revenue for an organization in a given time period. */ - parameters: { - query: { - period_1_end_date: string; - period_1_start_date: string; - period_2_end_date: string; - period_2_start_date: string; + app_credits_create: { + requestBody: { + content: { + "application/json": components["schemas"]["CustomerBalanceAdjustmentCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["CustomerBalanceAdjustmentCreateRequest"]; + "multipart/form-data": components["schemas"]["CustomerBalanceAdjustmentCreateRequest"]; }; }; responses: { - 200: { + 201: { content: { - "application/json": components["schemas"]["PeriodMetricRevenueResponse"]; + "application/json": components["schemas"]["CustomerBalanceAdjustment"]; }; }; }; }; - app_period_metric_revenue_retrieve: { - /** @description Returns the revenue for an organization in a given time period. */ + app_credits_retrieve: { parameters: { - query: { - period_1_end_date: string; - period_1_start_date: string; - period_2_end_date: string; - period_2_start_date: string; + /** @description The ID of the credit to retrieve or update. */ + path: { + credit_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PeriodMetricRevenueResponse"]; + "application/json": components["schemas"]["CustomerBalanceAdjustment"]; }; }; }; }; - app_period_metric_usage_retrieve: { - /** @description Return current usage for a customer during a given billing period. */ + app_credits_update_create: { parameters: { - query: { - end_date: string; - start_date: string; - top_n_customers?: number; + /** @description The ID of the credit to retrieve or update. */ + path: { + credit_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["CustomerBalanceAdjustmentUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["CustomerBalanceAdjustmentUpdateRequest"]; + "multipart/form-data": components["schemas"]["CustomerBalanceAdjustmentUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PeriodMetricUsageResponse"]; + "application/json": components["schemas"]["CustomerBalanceAdjustment"]; }; }; }; }; - app_period_subscriptions_retrieve: { + app_credits_void_create: { parameters: { - query: { - period_1_end_date: string; - period_1_start_date: string; - period_2_end_date: string; - period_2_start_date: string; + /** @description The ID of the credit to retrieve or update. */ + path: { + credit_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PeriodSubscriptionsResponse"]; + "application/json": components["schemas"]["CustomerBalanceAdjustment"]; }; }; }; }; - app_plan_versions_list: { + app_customers_list: { responses: { 200: { content: { - "application/json": components["schemas"]["PlanVersionDetail"][]; + "application/json": components["schemas"]["Customer"][]; }; }; }; }; - app_plan_versions_create: { + app_customers_create: { requestBody: { content: { - "application/json": components["schemas"]["PlanVersionCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PlanVersionCreateRequest"]; - "multipart/form-data": components["schemas"]["PlanVersionCreateRequest"]; + "application/json": components["schemas"]["CustomerCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["CustomerCreateRequest"]; + "multipart/form-data": components["schemas"]["CustomerCreateRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["PlanVersionDetail"]; + "application/json": components["schemas"]["Customer"]; }; }; }; }; - app_plan_versions_retrieve: { + app_customers_retrieve: { parameters: { path: { - version_id: string; + customer_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanVersionDetail"]; + "application/json": components["schemas"]["Customer"]; }; }; }; }; - app_plan_versions_partial_update: { + app_customers_partial_update: { parameters: { path: { - version_id: string; + customer_id: string; }; }; requestBody?: { content: { - "application/json": components["schemas"]["PatchedPlanVersionUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedPlanVersionUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedPlanVersionUpdateRequest"]; + "application/json": components["schemas"]["PatchedCustomerUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedCustomerUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedCustomerUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanVersionUpdate"]; + "application/json": components["schemas"]["CustomerUpdate"]; }; }; }; }; - app_plan_versions_delete_create: { + app_customers_delete_create: { parameters: { path: { - version_id: string; + customer_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["DeletePlanVersion"]; + "application/json": components["schemas"]["CustomerDeleteResponse"]; }; }; }; }; - app_plan_versions_features_add_create: { + app_customers_draft_invoice_retrieve: { parameters: { + query?: { + include_next_period?: boolean; + }; path: { - version_id: string; + customer_id: string; + }; + }; + responses: { + /** @description No response body */ + 200: never; + }; + }; + app_customers_summary_retrieve: { + /** @description Get the current settings for the organization. */ + responses: { + 200: { + content: { + "application/json": components["schemas"]["CustomerSummary"]; + }; + }; + }; + }; + app_customers_totals_retrieve: { + /** @description Get the current settings for the organization. */ + responses: { + 200: { + content: { + "application/json": components["schemas"]["CustomerWithRevenue"]; + }; + }; + }; + }; + app_demo_login_create: { + requestBody: { + content: { + "application/json": components["schemas"]["DemoLoginRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["DemoLoginRequestRequest"]; + "multipart/form-data": components["schemas"]["DemoLoginRequestRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["DemoLoginSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["DemoLoginFailure"]; + }; }; }; + }; + app_demo_register_create: { requestBody: { content: { - "application/json": components["schemas"]["AddFeatureRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddFeatureRequest"]; - "multipart/form-data": components["schemas"]["AddFeatureRequest"]; + "application/json": components["schemas"]["DemoRegistrationRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["DemoRegistrationRequest"]; + "multipart/form-data": components["schemas"]["DemoRegistrationRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["AddFeatureResponse"]; + "application/json": components["schemas"]["DemoRegistrationSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["DemoRegistrationFailure"]; }; }; }; }; - app_plan_versions_make_public_create: { - parameters: { - path: { - version_id: string; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MakePublicRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["MakePublicRequestRequest"]; - "multipart/form-data": components["schemas"]["MakePublicRequestRequest"]; + app_events_list: { + /** @description API endpoint that allows events to be viewed. */ + parameters?: { + /** @description The pagination cursor value. */ + /** @description Number of results to return per page. */ + query?: { + c?: string; + page_size?: number; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["MakePublicResponse"]; + "application/json": components["schemas"]["PaginatedEventDetailList"]; }; }; }; }; - app_plan_versions_replacement_make_create: { - parameters: { - path: { - version_id: string; - }; - }; + app_external_plan_links_create: { requestBody: { content: { - "application/json": components["schemas"]["MakeReplaceWithRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["MakeReplaceWithRequest"]; - "multipart/form-data": components["schemas"]["MakeReplaceWithRequest"]; + "application/json": components["schemas"]["ExternalPlanLinkRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ExternalPlanLinkRequest"]; + "multipart/form-data": components["schemas"]["ExternalPlanLinkRequest"]; }; }; responses: { - 200: { + 201: { content: { - "application/json": components["schemas"]["MakeReplaceWithResponse"]; + "application/json": components["schemas"]["ExternalPlanLink"]; }; }; }; }; - app_plan_versions_replacement_set_create: { + app_external_plan_links_destroy: { parameters: { + query: { + source: "stripe" | "braintree"; + }; path: { - version_id: string; + external_plan_id: string; }; }; - requestBody: { - content: { - "application/json": components["schemas"]["SetReplaceWithRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SetReplaceWithRequest"]; - "multipart/form-data": components["schemas"]["SetReplaceWithRequest"]; - }; + responses: { + /** @description No response body */ + 204: never; }; + }; + app_features_list: { responses: { 200: { content: { - "application/json": components["schemas"]["SetReplaceWithResponse"]; + "application/json": components["schemas"]["FeatureDetail"][]; }; }; }; }; - app_plan_versions_subscriptions_list: { - parameters: { - path: { - version_id: string; + app_features_create: { + requestBody: { + content: { + "application/json": components["schemas"]["FeatureCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["FeatureCreateRequest"]; + "multipart/form-data": components["schemas"]["FeatureCreateRequest"]; }; }; responses: { - 200: { + 201: { content: { - "application/json": components["schemas"]["PlanVersionHistoricalSubscription"][]; + "application/json": components["schemas"]["FeatureDetail"]; }; }; }; }; - app_plan_versions_target_customers_add_create: { - parameters: { - path: { - version_id: string; - }; - }; + app_import_customers_create: { requestBody: { content: { - "application/json": components["schemas"]["TargetCustomersRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["TargetCustomersRequest"]; - "multipart/form-data": components["schemas"]["TargetCustomersRequest"]; + "application/json": components["schemas"]["ImportCustomersRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ImportCustomersRequestRequest"]; + "multipart/form-data": components["schemas"]["ImportCustomersRequestRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["AddTargetCustomerResponse"]; + "application/json": components["schemas"]["ImportCustomerSuccess"]; }; }; - }; - }; - app_plan_versions_target_customers_remove_create: { - parameters: { - path: { - version_id: string; + 400: { + content: { + "application/json": components["schemas"]["ImportCustomerFailure"]; + }; }; }; + }; + app_import_payment_objects_create: { requestBody: { content: { - "application/json": components["schemas"]["TargetCustomersRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["TargetCustomersRequest"]; - "multipart/form-data": components["schemas"]["TargetCustomersRequest"]; + "application/json": components["schemas"]["ImportPaymentObjectsRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ImportPaymentObjectsRequestRequest"]; + "multipart/form-data": components["schemas"]["ImportPaymentObjectsRequestRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["RemoveTargetCustomerResponse"]; + "application/json": components["schemas"]["ImportPaymentObjectSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["ImportPaymentObjectFailure"]; }; }; }; }; - app_plans_list: { - /** @description ViewSet for viewing and editing Plans. */ + app_invoices_list: { parameters?: { - /** @description Filter to plans that have this duration. */ - /** @description Filter to plans that do not have any of the tags in this list. */ - /** @description Filter to plans that have any of the tags in this list. */ - /** @description Filter to plans that have all of the tags in this list. */ - /** @description Filter to versions that have the currency specified by this currency code. */ - /** @description Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers. */ - /** @description Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. */ + /** @description A filter for invoices for a specific customer */ + /** @description A filter for invoices with a specific payment status */ query?: { - duration?: "monthly" | "quarterly" | "yearly"; - exclude_tags?: string[]; - include_tags?: string[]; - include_tags_all?: string[]; - version_currency_code?: string; - version_custom_type?: "custom_only" | "public_only" | "all"; - version_status?: ("active" | "ended" | "not_started")[]; + customer_id?: string; + payment_status?: ("unpaid" | "paid")[]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanDetail"][]; + "application/json": components["schemas"]["Invoice"][]; }; }; }; }; - app_plans_create: { - /** @description ViewSet for viewing and editing Plans. */ + app_invoices_create: { requestBody: { content: { - "application/json": components["schemas"]["PlanCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PlanCreateRequest"]; - "multipart/form-data": components["schemas"]["PlanCreateRequest"]; + "application/json": components["schemas"]["InvoiceRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["InvoiceRequest"]; + "multipart/form-data": components["schemas"]["InvoiceRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["PlanDetail"]; + "application/json": components["schemas"]["Invoice"]; }; }; }; }; - app_plans_retrieve: { - /** @description ViewSet for viewing and editing Plans. */ + app_invoices_retrieve: { parameters: { - /** @description Filter to versions that have the currency specified by this currency code. */ - /** @description Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers. */ - /** @description Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. */ - query?: { - version_currency_code?: string; - version_custom_type?: "custom_only" | "public_only" | "all"; - version_status?: ("active" | "ended" | "not_started")[]; - }; path: { - plan_id: string; + invoice_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanDetail"]; + "application/json": components["schemas"]["Invoice"]; }; }; }; }; - app_plans_partial_update: { - /** @description ViewSet for viewing and editing Plans. */ + app_invoices_partial_update: { parameters: { path: { - plan_id: string; + invoice_id: string; }; }; requestBody?: { content: { - "application/json": components["schemas"]["PatchedPlanUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PatchedPlanUpdateRequest"]; - "multipart/form-data": components["schemas"]["PatchedPlanUpdateRequest"]; + "application/json": components["schemas"]["PatchedInvoiceUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedInvoiceUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedInvoiceUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanUpdate"]; + "application/json": components["schemas"]["InvoiceUpdate"]; }; }; }; }; - app_plans_delete_create: { - /** @description ViewSet for viewing and editing Plans. */ + app_invoices_pdf_url_retrieve: { parameters: { + /** @description Either an invoice ID (in the format `invoice_`) or an invoice number (in the format `YYMMDD-000001`) */ path: { - plan_id: string; + invoice_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["DeletePlan"]; + "application/json": components["schemas"]["Invoice"]; }; }; }; }; - app_plans_features_add_create: { - /** @description ViewSet for viewing and editing Plans. */ + app_invoices_send_create: { parameters: { path: { - plan_id: string; + invoice_id: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["InvoiceDetail"]; + }; }; }; + }; + app_login_create: { requestBody: { content: { - "application/json": components["schemas"]["AddFeatureToPlanRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddFeatureToPlanRequest"]; - "multipart/form-data": components["schemas"]["AddFeatureToPlanRequest"]; + "application/json": components["schemas"]["LoginRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["LoginRequestRequest"]; + "multipart/form-data": components["schemas"]["LoginRequestRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["AddFeatureToPlanResponse"]; + "application/json": components["schemas"]["LoginSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["LoginFailure"]; }; }; }; }; - app_plans_tags_add_create: { - /** @description ViewSet for viewing and editing Plans. */ - parameters: { - path: { - plan_id: string; + app_logout_create: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["LogoutSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["LogoutFailure"]; + }; }; }; - requestBody?: { + }; + app_metrics_list: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["MetricDetail"][]; + }; + }; + }; + }; + app_metrics_create: { + requestBody: { content: { - "application/json": components["schemas"]["AddPlanTagsRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddPlanTagsRequest"]; - "multipart/form-data": components["schemas"]["AddPlanTagsRequest"]; + "application/json": components["schemas"]["MetricCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["MetricCreateRequest"]; + "multipart/form-data": components["schemas"]["MetricCreateRequest"]; + }; + }; + responses: { + 201: { + content: { + "application/json": components["schemas"]["MetricDetail"]; + }; + }; + }; + }; + app_metrics_retrieve: { + parameters: { + path: { + metric_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["AddPlanTags"]; + "application/json": components["schemas"]["MetricDetail"]; }; }; }; }; - app_plans_tags_remove_create: { - /** @description ViewSet for viewing and editing Plans. */ + app_metrics_partial_update: { parameters: { path: { - plan_id: string; + metric_id: string; }; }; requestBody?: { content: { - "application/json": components["schemas"]["RemovePlanTagsRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["RemovePlanTagsRequest"]; - "multipart/form-data": components["schemas"]["RemovePlanTagsRequest"]; + "application/json": components["schemas"]["PatchedMetricUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedMetricUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedMetricUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["RemovePlanTags"]; + "application/json": components["schemas"]["MetricUpdate"]; }; }; }; }; - app_plans_tags_set_create: { - /** @description ViewSet for viewing and editing Plans. */ - parameters: { - path: { - plan_id: string; - }; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SetPlanTagsRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SetPlanTagsRequest"]; - "multipart/form-data": components["schemas"]["SetPlanTagsRequest"]; - }; - }; + app_netsuite_customers_retrieve: { responses: { 200: { content: { - "application/json": components["schemas"]["SetPlanTagsResponse"]; + "application/json": components["schemas"]["URLResponse"]; }; }; }; }; - app_plans_versions_active_dates_update_create: { - /** @description ViewSet for viewing and editing Plans. */ - parameters: { - /** @description The ID of the plan whose versions we're changing the active dates. */ - /** @description The version number to update. */ - path: { - plan_id: string; - version_number: number; + app_netsuite_invoices_retrieve: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["URLResponse"]; + }; }; }; - requestBody?: { + }; + app_organization_invite_create: { + requestBody: { content: { - "application/json": components["schemas"]["ChangeActiveDatesRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ChangeActiveDatesRequest"]; - "multipart/form-data": components["schemas"]["ChangeActiveDatesRequest"]; + "application/json": components["schemas"]["InviteRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["InviteRequestRequest"]; + "multipart/form-data": components["schemas"]["InviteRequestRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["ChangeActiveDateResponse"]; + "application/json": components["schemas"]["InviteResponse"]; }; }; }; }; - app_plans_versions_features_add_create: { - /** @description ViewSet for viewing and editing Plans. */ - parameters: { - /** @description The ID of the plan whose versions we're adding a feature to. */ - /** @description The version number to update. */ - path: { - plan_id: string; - version_number: number; - }; - }; + app_organization_invite_link_create: { requestBody: { content: { - "application/json": components["schemas"]["AddFeatureToPlanRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddFeatureToPlanRequest"]; - "multipart/form-data": components["schemas"]["AddFeatureToPlanRequest"]; + "application/json": components["schemas"]["InviteRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["InviteRequestRequest"]; + "multipart/form-data": components["schemas"]["InviteRequestRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["AddFeatureToPlanVersionNumberResponse"]; + "application/json": components["schemas"]["InviteLinkResponse"]; }; }; }; }; - app_plans_versions_replacement_set_create: { - /** @description ViewSet for viewing and editing Plans. */ - parameters: { - path: { - plan_id: string; - version_number: string; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PlansSetReplaceWithForVersionNumberRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PlansSetReplaceWithForVersionNumberRequest"]; - "multipart/form-data": components["schemas"]["PlansSetReplaceWithForVersionNumberRequest"]; + app_organization_settings_list: { + parameters?: { + /** @description Filters organization_settings to a single setting_group. Defaults to returning all settings. */ + /** @description Filters organization_settings by setting_name. Defaults to returning all settings. */ + query?: { + setting_group?: "stripe" | "braintree" | "billing"; + setting_name?: ( + | "generate_customer_after_creating_in_lotus" + | "gen_cust_in_braintree_after_lotus" + | "subscription_filter_keys" + | "payment_grace_period" + )[]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanVersionNumberSetReplaceWithResponse"]; + "application/json": components["schemas"]["OrganizationSetting"][]; }; }; }; }; - app_plans_versions_transition_set_create: { - /** @description ViewSet for viewing and editing Plans. */ + app_organization_settings_retrieve: { parameters: { path: { - plan_id: string; - version_number: string; - }; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PlansSetTransitionToForVersionNumberRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PlansSetTransitionToForVersionNumberRequest"]; - "multipart/form-data": components["schemas"]["PlansSetTransitionToForVersionNumberRequest"]; + setting_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["PlanVersionNumberSetTransitionToResponse"]; + "application/json": components["schemas"]["OrganizationSetting"]; }; }; }; }; - app_plans_by_customer_retrieve: { + app_organization_settings_partial_update: { + parameters: { + path: { + setting_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PatchedOrganizationSettingUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedOrganizationSettingUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedOrganizationSettingUpdateRequest"]; + }; + }; responses: { 200: { content: { - "application/json": components["schemas"]["PlansByNumCustomers"]; + "application/json": components["schemas"]["OrganizationSettingUpdate"]; }; }; }; }; - app_pricing_units_list: { + app_organizations_list: { responses: { 200: { content: { - "application/json": components["schemas"]["PricingUnitDetail"][]; + "application/json": components["schemas"]["Organization"][]; }; }; }; }; - app_pricing_units_create: { + app_organizations_create: { requestBody: { content: { - "application/json": components["schemas"]["PricingUnitDetailRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["PricingUnitDetailRequest"]; - "multipart/form-data": components["schemas"]["PricingUnitDetailRequest"]; + "application/json": components["schemas"]["OrganizationCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["OrganizationCreateRequest"]; + "multipart/form-data": components["schemas"]["OrganizationCreateRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["PricingUnitDetail"]; + "application/json": components["schemas"]["Organization"]; }; }; }; }; - app_register_create: { - requestBody: { + app_organizations_partial_update: { + parameters: { + path: { + organization_id: string; + }; + }; + requestBody?: { content: { - "application/json": components["schemas"]["RegistrationRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["RegistrationRequest"]; - "multipart/form-data": components["schemas"]["RegistrationRequest"]; + "application/json": components["schemas"]["PatchedOrganizationUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedOrganizationUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedOrganizationUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["RegistrationSuccess"]; + "application/json": components["schemas"]["Organization"]; }; }; - 400: { + }; + }; + app_payment_providers_list: { + responses: { + 200: { content: { - "application/json": components["schemas"]["RegistrationFailure"]; + "application/json": components["schemas"]["SinglePaymentProcesor"][]; }; }; }; }; - app_session_retrieve: { + app_payment_providers_create: { + requestBody: { + content: { + "application/json": components["schemas"]["PaymentProcesorPostRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PaymentProcesorPostRequestRequest"]; + "multipart/form-data": components["schemas"]["PaymentProcesorPostRequestRequest"]; + }; + }; responses: { 200: { content: { - "application/json": components["schemas"]["SessionSuccess"]; + "application/json": components["schemas"]["PaymentProcesorPostResponse"]; }; }; }; }; - app_subscriptions_list: { + app_period_events_retrieve: { + /** @description Returns the revenue for an organization in a given time period. */ parameters: { - /** @description Filter to a specific customer. */ - /** @description Filter to a specific plan. */ - /** @description If specified, will only return subscriptions with a start date before this date. */ - /** @description If specified, will only return subscriptions with an end date after this date. */ - /** @description Filter to a specific set of subscription statuses. Defaults to active. */ - /** @description Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. */ query: { - customer_id: string; - plan_id?: string; - range_end?: string; - range_start?: string; - status?: ("active" | "ended" | "not_started")[]; - subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + period_1_end_date: string; + period_1_start_date: string; + period_2_end_date: string; + period_2_start_date: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"][]; + "application/json": components["schemas"]["PeriodMetricRevenueResponse"]; }; }; }; }; - app_subscriptions_create: { - requestBody: { - content: { - "application/json": components["schemas"]["SubscriptionRecordCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCreateRequest"]; - "multipart/form-data": components["schemas"]["SubscriptionRecordCreateRequest"]; + app_period_metric_revenue_retrieve: { + /** @description Returns the revenue for an organization in a given time period. */ + parameters: { + query: { + period_1_end_date: string; + period_1_start_date: string; + period_2_end_date: string; + period_2_start_date: string; }; }; responses: { - 201: { + 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"]; + "application/json": components["schemas"]["PeriodMetricRevenueResponse"]; }; }; }; }; - app_subscriptions_retrieve: { + app_period_metric_usage_retrieve: { + /** @description Return current usage for a customer during a given billing period. */ parameters: { - path: { - subscription_id: string; + query: { + end_date: string; + start_date: string; + top_n_customers?: number; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"]; + "application/json": components["schemas"]["PeriodMetricUsageResponse"]; }; }; }; }; - app_subscriptions_addons_cancel_create: { + app_period_subscriptions_retrieve: { parameters: { - /** @description The ID of the addon within the subscription update. */ - /** @description The ID of the subscription to update. */ - path: { - addon_id: string; - subscription_id: string; - }; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SubscriptionRecordCancelRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCancelRequest"]; - "multipart/form-data": components["schemas"]["SubscriptionRecordCancelRequest"]; + query: { + period_1_end_date: string; + period_1_start_date: string; + period_2_end_date: string; + period_2_start_date: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["AddOnSubscriptionRecord"][]; + "application/json": components["schemas"]["PeriodSubscriptionsResponse"]; }; }; }; }; - app_subscriptions_addons_attach_create: { - parameters: { - /** @description The ID of the subscription to add an addon to. */ - path: { - subscription_id: string; + app_plan_versions_list: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["PlanVersionDetail"][]; + }; }; }; - requestBody?: { + }; + app_plan_versions_create: { + requestBody: { content: { - "application/json": components["schemas"]["AddOnSubscriptionRecordCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["AddOnSubscriptionRecordCreateRequest"]; - "multipart/form-data": components["schemas"]["AddOnSubscriptionRecordCreateRequest"]; + "application/json": components["schemas"]["PlanVersionCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PlanVersionCreateRequest"]; + "multipart/form-data": components["schemas"]["PlanVersionCreateRequest"]; }; }; responses: { - 200: { + 201: { content: { - "application/json": components["schemas"]["AddOnSubscriptionRecord"]; + "application/json": components["schemas"]["PlanVersionDetail"]; }; }; }; }; - app_subscriptions_cancel_create: { + app_plan_versions_retrieve: { parameters: { - /** @description The ID of the subscription to cancel. */ path: { - subscription_id: string; - }; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SubscriptionRecordCancelRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCancelRequest"]; - "multipart/form-data": components["schemas"]["SubscriptionRecordCancelRequest"]; + version_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"]; + "application/json": components["schemas"]["PlanVersionDetail"]; }; }; }; }; - app_subscriptions_components_change_prepaid_units_create: { + app_plan_versions_partial_update: { parameters: { - /** @description The ID of the metric to alter the prepaid usage for. */ - /** @description The ID of the subscription which will have its plans switched. */ path: { - metric_id: string; - subscription_id: string; + version_id: string; }; }; - requestBody: { + requestBody?: { content: { - "application/json": components["schemas"]["ChangePrepaidUnitsRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ChangePrepaidUnitsRequest"]; - "multipart/form-data": components["schemas"]["ChangePrepaidUnitsRequest"]; + "application/json": components["schemas"]["PatchedPlanVersionUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedPlanVersionUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedPlanVersionUpdateRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"]; + "application/json": components["schemas"]["PlanVersionUpdate"]; }; }; }; }; - app_subscriptions_switch_plan_create: { + app_plan_versions_delete_create: { parameters: { - /** @description The ID of the subscription which will have its plans switched. */ path: { - subscription_id: string; - }; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SubscriptionRecordSwitchPlanRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordSwitchPlanRequest"]; - "multipart/form-data": components["schemas"]["SubscriptionRecordSwitchPlanRequest"]; + version_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"]; + "application/json": components["schemas"]["DeletePlanVersion"]; }; }; }; }; - app_subscriptions_update_create: { + app_plan_versions_features_add_create: { parameters: { - /** @description The ID of the subscription to update. */ path: { - subscription_id: string; + version_id: string; }; }; - requestBody?: { + requestBody: { content: { - "application/json": components["schemas"]["SubscriptionRecordUpdateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordUpdateRequest"]; - "multipart/form-data": components["schemas"]["SubscriptionRecordUpdateRequest"]; + "application/json": components["schemas"]["AddFeatureRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddFeatureRequest"]; + "multipart/form-data": components["schemas"]["AddFeatureRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["SubscriptionRecord"]; + "application/json": components["schemas"]["AddFeatureResponse"]; }; }; }; }; - app_switch_organization_create: { - /** @description Get the current settings for the organization. */ + app_plan_versions_make_public_create: { + parameters: { + path: { + version_id: string; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["ChangeUserOrganizationRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ChangeUserOrganizationRequestRequest"]; - "multipart/form-data": components["schemas"]["ChangeUserOrganizationRequestRequest"]; + "application/json": components["schemas"]["MakePublicRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["MakePublicRequestRequest"]; + "multipart/form-data": components["schemas"]["MakePublicRequestRequest"]; }; }; - responses: { - /** @description No response body */ - 200: never; - }; - }; - app_timezones_retrieve: { - /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ responses: { 200: { content: { - "application/json": components["schemas"]["TimezonesResponse"]; + "application/json": components["schemas"]["MakePublicResponse"]; }; }; }; }; - app_transfer_subscriptions_create: { + app_plan_versions_replacement_make_create: { + parameters: { + path: { + version_id: string; + }; + }; requestBody: { content: { - "application/json": components["schemas"]["TransferSubscriptionsRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["TransferSubscriptionsRequestRequest"]; - "multipart/form-data": components["schemas"]["TransferSubscriptionsRequestRequest"]; + "application/json": components["schemas"]["MakeReplaceWithRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["MakeReplaceWithRequest"]; + "multipart/form-data": components["schemas"]["MakeReplaceWithRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["TransferSubscriptionsSuccess"]; - }; - }; - 400: { - content: { - "application/json": components["schemas"]["TransferSubscriptionsFailure"]; + "application/json": components["schemas"]["MakeReplaceWithResponse"]; }; }; }; }; - app_usage_alerts_list: { - /** @description ViewSet for viewing and editing UsageAlerts. */ - responses: { - 200: { - content: { - "application/json": components["schemas"]["UsageAlert"][]; - }; + app_plan_versions_replacement_set_create: { + parameters: { + path: { + version_id: string; }; }; - }; - app_usage_alerts_create: { - /** @description ViewSet for viewing and editing UsageAlerts. */ requestBody: { content: { - "application/json": components["schemas"]["UsageAlertCreateRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["UsageAlertCreateRequest"]; - "multipart/form-data": components["schemas"]["UsageAlertCreateRequest"]; + "application/json": components["schemas"]["SetReplaceWithRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SetReplaceWithRequest"]; + "multipart/form-data": components["schemas"]["SetReplaceWithRequest"]; }; }; responses: { - 201: { + 200: { content: { - "application/json": components["schemas"]["UsageAlertCreate"]; + "application/json": components["schemas"]["SetReplaceWithResponse"]; }; }; }; }; - app_usage_alerts_retrieve: { - /** @description ViewSet for viewing and editing UsageAlerts. */ + app_plan_versions_subscriptions_list: { parameters: { path: { - usage_alert_id: string; + version_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["UsageAlert"]; + "application/json": components["schemas"]["PlanVersionHistoricalSubscription"][]; }; }; }; }; - app_usage_alerts_destroy: { - /** @description ViewSet for viewing and editing UsageAlerts. */ + app_plan_versions_target_customers_add_create: { parameters: { path: { - usage_alert_id: string; + version_id: string; }; }; - responses: { - /** @description No response body */ - 204: never; - }; - }; - app_user_password_reset_create: { - /** @description Verifies the token and resets the password. */ requestBody: { content: { - "application/json": components["schemas"]["ResetPasswordRequestRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["ResetPasswordRequestRequest"]; - "multipart/form-data": components["schemas"]["ResetPasswordRequestRequest"]; + "application/json": components["schemas"]["TargetCustomersRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["TargetCustomersRequest"]; + "multipart/form-data": components["schemas"]["TargetCustomersRequest"]; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["ResetPasswordSuccess"]; + "application/json": components["schemas"]["AddTargetCustomerResponse"]; }; }; }; }; - app_user_password_reset_init_create: { - requestBody: { - content: { - "application/json": components["schemas"]["EmailRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["EmailRequest"]; - "multipart/form-data": components["schemas"]["EmailRequest"]; + app_plan_versions_target_customers_remove_create: { + parameters: { + path: { + version_id: string; }; }; - responses: { - 200: { - content: { - "application/json": components["schemas"]["InitResetPasswordSuccess"]; - }; + requestBody: { + content: { + "application/json": components["schemas"]["TargetCustomersRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["TargetCustomersRequest"]; + "multipart/form-data": components["schemas"]["TargetCustomersRequest"]; }; }; - }; - app_users_list: { responses: { 200: { content: { - "application/json": components["schemas"]["User"][]; + "application/json": components["schemas"]["RemoveTargetCustomerResponse"]; }; }; }; }; - app_users_create: { - requestBody: { - content: { - "application/json": components["schemas"]["UserRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["UserRequest"]; - "multipart/form-data": components["schemas"]["UserRequest"]; - }; - }; - responses: { - 201: { - content: { - "application/json": components["schemas"]["User"]; - }; + app_plans_list: { + /** @description ViewSet for viewing and editing Plans. */ + parameters?: { + /** @description Filter to plans that have this duration. */ + /** @description Filter to plans that do not have any of the tags in this list. */ + /** @description Filter to plans that have any of the tags in this list. */ + /** @description Filter to plans that have all of the tags in this list. */ + /** @description Filter to versions that have the currency specified by this currency code. */ + /** @description Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers. */ + /** @description Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. */ + query?: { + duration?: "monthly" | "quarterly" | "yearly"; + exclude_tags?: string[]; + include_tags?: string[]; + include_tags_all?: string[]; + version_currency_code?: string; + version_custom_type?: "custom_only" | "public_only" | "all"; + version_status?: ("active" | "ended" | "not_started")[]; }; }; - }; - app_webhooks_list: { - /** @description API endpoint that allows alerts to be viewed or edited. */ responses: { 200: { content: { - "application/json": components["schemas"]["WebhookEndpoint"][]; + "application/json": components["schemas"]["PlanDetail"][]; }; }; }; }; - app_webhooks_create: { - /** @description API endpoint that allows alerts to be viewed or edited. */ + app_plans_create: { + /** @description ViewSet for viewing and editing Plans. */ requestBody: { content: { - "application/json": components["schemas"]["WebhookEndpointRequest"]; - "application/x-www-form-urlencoded": components["schemas"]["WebhookEndpointRequest"]; - "multipart/form-data": components["schemas"]["WebhookEndpointRequest"]; + "application/json": components["schemas"]["PlanCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PlanCreateRequest"]; + "multipart/form-data": components["schemas"]["PlanCreateRequest"]; }; }; responses: { 201: { content: { - "application/json": components["schemas"]["WebhookEndpoint"]; + "application/json": components["schemas"]["PlanDetail"]; }; }; }; - }; - app_webhooks_retrieve: { - /** @description API endpoint that allows alerts to be viewed or edited. */ + }; + app_plans_retrieve: { + /** @description ViewSet for viewing and editing Plans. */ parameters: { + /** @description Filter to versions that have the currency specified by this currency code. */ + /** @description Filter to versions that have this custom type. If you choose custom_only, you will only see versions that have target customers. If you choose public_only, you will only see versions that do not have target customers. */ + /** @description Filter to versions that have this status. Ended means it has an active_to date in the past. Not started means it has an active_from date in the future or null. */ + query?: { + version_currency_code?: string; + version_custom_type?: "custom_only" | "public_only" | "all"; + version_status?: ("active" | "ended" | "not_started")[]; + }; path: { - webhook_endpoint_id: string; + plan_id: string; }; }; responses: { 200: { content: { - "application/json": components["schemas"]["WebhookEndpoint"]; + "application/json": components["schemas"]["PlanDetail"]; }; }; }; }; - app_webhooks_destroy: { - /** @description API endpoint that allows alerts to be viewed or edited. */ + app_plans_partial_update: { + /** @description ViewSet for viewing and editing Plans. */ parameters: { path: { - webhook_endpoint_id: string; + plan_id: string; }; }; - responses: { - /** @description No response body */ - 204: never; + requestBody?: { + content: { + "application/json": components["schemas"]["PatchedPlanUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PatchedPlanUpdateRequest"]; + "multipart/form-data": components["schemas"]["PatchedPlanUpdateRequest"]; + }; }; - }; - stripe_webhook_create: { responses: { - /** @description No response body */ - 200: never; - }; - }; -} -export interface paths { - "/app/actions/": { - /** @description API endpoint that allows events to be viewed. */ - get: operations["app_actions_list"]; - }; - "/app/addon_versions/": { - post: operations["app_addon_versions_create"]; - }; - "/app/addon_versions/{version_id}/": { - patch: operations["app_addon_versions_partial_update"]; - }; - "/app/addon_versions/{version_id}/delete/": { - post: operations["app_addon_versions_delete_create"]; - }; - "/app/addons/": { - get: operations["app_addons_list"]; - post: operations["app_addons_create"]; - }; - "/app/addons/{addon_id}/": { - get: operations["app_addons_retrieve"]; - patch: operations["app_addons_partial_update"]; - }; - "/app/addons/{addon_id}/delete/": { - post: operations["app_addons_delete_create"]; - }; - "/app/addons/{addon_id}/features/add/": { - post: operations["app_addons_features_add_create"]; - }; - "/app/api_tokens/": { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - get: operations["app_api_tokens_list"]; - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - post: operations["app_api_tokens_create"]; - }; - "/app/api_tokens/{prefix}/": { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - delete: operations["app_api_tokens_destroy"]; - }; - "/app/api_tokens/{prefix}/roll/": { - /** @description API endpoint that allows API Tokens to be viewed or edited. */ - post: operations["app_api_tokens_roll_create"]; - }; - "/app/backtests/": { - get: operations["app_backtests_list"]; - post: operations["app_backtests_create"]; - }; - "/app/backtests/{backtest_id}/": { - get: operations["app_backtests_retrieve"]; - }; - "/app/cost_analysis/": { - /** @description Returns the revenue for an organization in a given time period. */ - get: operations["app_cost_analysis_retrieve"]; - }; - "/app/credits/": { - get: operations["app_credits_list"]; - post: operations["app_credits_create"]; - }; - "/app/credits/{credit_id}/": { - get: operations["app_credits_retrieve"]; - }; - "/app/credits/{credit_id}/update/": { - post: operations["app_credits_update_create"]; - }; - "/app/credits/{credit_id}/void/": { - post: operations["app_credits_void_create"]; - }; - "/app/customers/": { - get: operations["app_customers_list"]; - post: operations["app_customers_create"]; - }; - "/app/customers/{customer_id}/": { - get: operations["app_customers_retrieve"]; - patch: operations["app_customers_partial_update"]; - }; - "/app/customers/{customer_id}/delete/": { - post: operations["app_customers_delete_create"]; - }; - "/app/customers/summary/": { - /** @description Get the current settings for the organization. */ - get: operations["app_customers_summary_retrieve"]; - }; - "/app/customers/totals/": { - /** @description Get the current settings for the organization. */ - get: operations["app_customers_totals_retrieve"]; - }; - "/app/demo_login/": { - post: operations["app_demo_login_create"]; - }; - "/app/demo_register/": { - post: operations["app_demo_register_create"]; - }; - "/app/draft_invoice/": { - /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ - get: operations["app_draft_invoice_retrieve"]; - }; - "/app/events/": { - /** @description API endpoint that allows events to be viewed. */ - get: operations["app_events_list"]; - }; - "/app/external_plan_links/": { - post: operations["app_external_plan_links_create"]; - }; - "/app/external_plan_links/{external_plan_id}/": { - delete: operations["app_external_plan_links_destroy"]; - }; - "/app/features/": { - get: operations["app_features_list"]; - post: operations["app_features_create"]; - }; - "/app/import_customers/": { - post: operations["app_import_customers_create"]; - }; - "/app/import_payment_objects/": { - post: operations["app_import_payment_objects_create"]; - }; - "/app/invoices/": { - get: operations["app_invoices_list"]; - post: operations["app_invoices_create"]; - }; - "/app/invoices/{invoice_id}/": { - get: operations["app_invoices_retrieve"]; - patch: operations["app_invoices_partial_update"]; - }; - "/app/invoices/{invoice_id}/pdf_url/": { - get: operations["app_invoices_pdf_url_retrieve"]; - }; - "/app/invoices/{invoice_id}/send/": { - post: operations["app_invoices_send_create"]; - }; - "/app/login/": { - post: operations["app_login_create"]; - }; - "/app/logout/": { - post: operations["app_logout_create"]; - }; - "/app/metrics/": { - get: operations["app_metrics_list"]; - post: operations["app_metrics_create"]; - }; - "/app/metrics/{metric_id}/": { - get: operations["app_metrics_retrieve"]; - patch: operations["app_metrics_partial_update"]; - }; - "/app/netsuite_invoices/": { - get: operations["app_netsuite_invoices_retrieve"]; - }; - "/app/organization/invite/": { - post: operations["app_organization_invite_create"]; - }; - "/app/organization/invite_link/": { - post: operations["app_organization_invite_link_create"]; - }; - "/app/organization_settings/": { - get: operations["app_organization_settings_list"]; - }; - "/app/organization_settings/{setting_id}/": { - get: operations["app_organization_settings_retrieve"]; - patch: operations["app_organization_settings_partial_update"]; - }; - "/app/organizations/": { - get: operations["app_organizations_list"]; - post: operations["app_organizations_create"]; - }; - "/app/organizations/{organization_id}/": { - patch: operations["app_organizations_partial_update"]; - }; - "/app/payment_providers/": { - get: operations["app_payment_providers_list"]; - post: operations["app_payment_providers_create"]; - }; - "/app/period_events/": { - /** @description Returns the revenue for an organization in a given time period. */ - get: operations["app_period_events_retrieve"]; - }; - "/app/period_metric_revenue/": { - /** @description Returns the revenue for an organization in a given time period. */ - get: operations["app_period_metric_revenue_retrieve"]; - }; - "/app/period_metric_usage/": { - /** @description Return current usage for a customer during a given billing period. */ - get: operations["app_period_metric_usage_retrieve"]; - }; - "/app/period_subscriptions/": { - get: operations["app_period_subscriptions_retrieve"]; - }; - "/app/plan_versions/": { - get: operations["app_plan_versions_list"]; - post: operations["app_plan_versions_create"]; - }; - "/app/plan_versions/{version_id}/": { - get: operations["app_plan_versions_retrieve"]; - patch: operations["app_plan_versions_partial_update"]; - }; - "/app/plan_versions/{version_id}/delete/": { - post: operations["app_plan_versions_delete_create"]; - }; - "/app/plan_versions/{version_id}/features/add/": { - post: operations["app_plan_versions_features_add_create"]; - }; - "/app/plan_versions/{version_id}/make_public/": { - post: operations["app_plan_versions_make_public_create"]; - }; - "/app/plan_versions/{version_id}/replacement/make/": { - post: operations["app_plan_versions_replacement_make_create"]; - }; - "/app/plan_versions/{version_id}/replacement/set/": { - post: operations["app_plan_versions_replacement_set_create"]; - }; - "/app/plan_versions/{version_id}/subscriptions/": { - get: operations["app_plan_versions_subscriptions_list"]; - }; - "/app/plan_versions/{version_id}/target_customers/add/": { - post: operations["app_plan_versions_target_customers_add_create"]; - }; - "/app/plan_versions/{version_id}/target_customers/remove/": { - post: operations["app_plan_versions_target_customers_remove_create"]; + 200: { + content: { + "application/json": components["schemas"]["PlanUpdate"]; + }; + }; + }; }; - "/app/plans/": { - /** @description ViewSet for viewing and editing Plans. */ - get: operations["app_plans_list"]; + app_plans_delete_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_create"]; + parameters: { + path: { + plan_id: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["DeletePlan"]; + }; + }; + }; }; - "/app/plans/{plan_id}/": { - /** @description ViewSet for viewing and editing Plans. */ - get: operations["app_plans_retrieve"]; + app_plans_features_add_create: { /** @description ViewSet for viewing and editing Plans. */ - patch: operations["app_plans_partial_update"]; + parameters: { + path: { + plan_id: string; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AddFeatureToPlanRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddFeatureToPlanRequest"]; + "multipart/form-data": components["schemas"]["AddFeatureToPlanRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["AddFeatureToPlanResponse"]; + }; + }; + }; }; - "/app/plans/{plan_id}/delete/": { + app_plans_tags_add_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_delete_create"]; + parameters: { + path: { + plan_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddPlanTagsRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddPlanTagsRequest"]; + "multipart/form-data": components["schemas"]["AddPlanTagsRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["AddPlanTags"]; + }; + }; + }; }; - "/app/plans/{plan_id}/features/add/": { + app_plans_tags_remove_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_features_add_create"]; + parameters: { + path: { + plan_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["RemovePlanTagsRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["RemovePlanTagsRequest"]; + "multipart/form-data": components["schemas"]["RemovePlanTagsRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["RemovePlanTags"]; + }; + }; + }; }; - "/app/plans/{plan_id}/tags/add/": { + app_plans_tags_set_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_tags_add_create"]; + parameters: { + path: { + plan_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SetPlanTagsRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SetPlanTagsRequest"]; + "multipart/form-data": components["schemas"]["SetPlanTagsRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SetPlanTagsResponse"]; + }; + }; + }; }; - "/app/plans/{plan_id}/tags/remove/": { + app_plans_versions_active_dates_update_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_tags_remove_create"]; + parameters: { + /** @description The ID of the plan whose versions we're changing the active dates. */ + /** @description The version number to update. */ + path: { + plan_id: string; + version_number: number; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ChangeActiveDatesRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ChangeActiveDatesRequest"]; + "multipart/form-data": components["schemas"]["ChangeActiveDatesRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["ChangeActiveDateResponse"]; + }; + }; + }; }; - "/app/plans/{plan_id}/tags/set/": { + app_plans_versions_features_add_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_tags_set_create"]; + parameters: { + /** @description The ID of the plan whose versions we're adding a feature to. */ + /** @description The version number to update. */ + path: { + plan_id: string; + version_number: number; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AddFeatureToPlanRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddFeatureToPlanRequest"]; + "multipart/form-data": components["schemas"]["AddFeatureToPlanRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["AddFeatureToPlanVersionNumberResponse"]; + }; + }; + }; }; - "/app/plans/{plan_id}/versions/{version_number}/active_dates/update/": { + app_plans_versions_replacement_set_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_versions_active_dates_update_create"]; + parameters: { + path: { + plan_id: string; + version_number: string; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PlansSetReplaceWithForVersionNumberRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PlansSetReplaceWithForVersionNumberRequest"]; + "multipart/form-data": components["schemas"]["PlansSetReplaceWithForVersionNumberRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["PlanVersionNumberSetReplaceWithResponse"]; + }; + }; + }; }; - "/app/plans/{plan_id}/versions/{version_number}/features/add/": { + app_plans_versions_transition_set_create: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_versions_features_add_create"]; + parameters: { + path: { + plan_id: string; + version_number: string; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PlansSetTransitionToForVersionNumberRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PlansSetTransitionToForVersionNumberRequest"]; + "multipart/form-data": components["schemas"]["PlansSetTransitionToForVersionNumberRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["PlanVersionNumberSetTransitionToResponse"]; + }; + }; + }; }; - "/app/plans/{plan_id}/versions/{version_number}/replacement/set/": { + app_plans_versions_next_retrieve: { /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_versions_replacement_set_create"]; + parameters: { + path: { + plan_id: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["NextPlanVersionNumberResponse"]; + }; + }; + }; + }; + app_plans_by_customer_retrieve: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["PlansByNumCustomers"]; + }; + }; + }; + }; + app_pricing_units_list: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["PricingUnitDetail"][]; + }; + }; + }; + }; + app_pricing_units_create: { + requestBody: { + content: { + "application/json": components["schemas"]["PricingUnitDetailRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["PricingUnitDetailRequest"]; + "multipart/form-data": components["schemas"]["PricingUnitDetailRequest"]; + }; + }; + responses: { + 201: { + content: { + "application/json": components["schemas"]["PricingUnitDetail"]; + }; + }; + }; + }; + app_register_create: { + requestBody: { + content: { + "application/json": components["schemas"]["RegistrationRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["RegistrationRequest"]; + "multipart/form-data": components["schemas"]["RegistrationRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["RegistrationSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["RegistrationFailure"]; + }; + }; + }; }; - "/app/plans/{plan_id}/versions/{version_number}/transition/set/": { - /** @description ViewSet for viewing and editing Plans. */ - post: operations["app_plans_versions_transition_set_create"]; + app_session_retrieve: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["SessionSuccess"]; + }; + }; + }; }; - "/app/plans_by_customer/": { - get: operations["app_plans_by_customer_retrieve"]; + app_subscriptions_list: { + parameters: { + /** @description Filter to a specific customer. */ + /** @description Filter to a specific plan. */ + /** @description If specified, will only return subscriptions with a start date before this date. */ + /** @description If specified, will only return subscriptions with an end date after this date. */ + /** @description Filter to a specific set of subscription statuses. Defaults to active. */ + /** @description Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. */ + query: { + customer_id: string; + plan_id?: string; + range_end?: string; + range_start?: string; + status?: ("active" | "ended" | "not_started")[]; + subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"][]; + }; + }; + }; }; - "/app/pricing_units/": { - get: operations["app_pricing_units_list"]; - post: operations["app_pricing_units_create"]; + app_subscriptions_create: { + requestBody: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCreateRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCreateRequest"]; + }; + }; + responses: { + 201: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/register/": { - post: operations["app_register_create"]; + app_subscriptions_retrieve: { + parameters: { + path: { + subscription_id: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/session/": { - get: operations["app_session_retrieve"]; + app_subscriptions_addons_cancel_create: { + parameters: { + /** @description The ID of the addon within the subscription update. */ + /** @description The ID of the subscription to update. */ + path: { + addon_id: string; + subscription_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCancelRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCancelRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCancelRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["AddOnSubscriptionRecord"][]; + }; + }; + }; }; - "/app/subscriptions/": { - get: operations["app_subscriptions_list"]; - post: operations["app_subscriptions_create"]; + app_subscriptions_addons_attach_create: { + parameters: { + /** @description The ID of the subscription to add an addon to. */ + path: { + subscription_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["AddOnSubscriptionRecordCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["AddOnSubscriptionRecordCreateRequest"]; + "multipart/form-data": components["schemas"]["AddOnSubscriptionRecordCreateRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["AddOnSubscriptionRecord"]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/": { - get: operations["app_subscriptions_retrieve"]; + app_subscriptions_cancel_create_2: { + parameters: { + /** @description The ID of the subscription to cancel. */ + path: { + subscription_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCancelRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCancelRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCancelRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/addons/{addon_id}/cancel/": { - post: operations["app_subscriptions_addons_cancel_create"]; + app_subscriptions_components_change_prepaid_units_create: { + parameters: { + /** @description The ID of the metric to alter the prepaid usage for. */ + /** @description The ID of the subscription which will have its plans switched. */ + path: { + metric_id: string; + subscription_id: string; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ChangePrepaidUnitsRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ChangePrepaidUnitsRequest"]; + "multipart/form-data": components["schemas"]["ChangePrepaidUnitsRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/addons/attach/": { - post: operations["app_subscriptions_addons_attach_create"]; + app_subscriptions_switch_plan_create: { + parameters: { + /** @description The ID of the subscription which will have its plans switched. */ + path: { + subscription_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordSwitchPlanRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordSwitchPlanRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordSwitchPlanRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/cancel/": { - post: operations["app_subscriptions_cancel_create"]; + app_subscriptions_update_create_2: { + parameters: { + /** @description The ID of the subscription to update. */ + path: { + subscription_id: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordUpdateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordUpdateRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordUpdateRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/components/{metric_id}/change_prepaid_units/": { - post: operations["app_subscriptions_components_change_prepaid_units_create"]; + app_subscriptions_add_create: { + /** @deprecated */ + requestBody: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCreateSerializerOldRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCreateSerializerOldRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCreateSerializerOldRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/switch_plan/": { - post: operations["app_subscriptions_switch_plan_create"]; + app_subscriptions_cancel_create: { + /** @deprecated */ + parameters: { + /** @description Filter to a specific customer. */ + /** @description Filter to a specific plan. If not specified, all plans will be included in the cancellation request. */ + /** @description Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. */ + query: { + customer_id: string; + plan_id?: string; + subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordCancelRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordCancelRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordCancelRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"][]; + }; + }; + }; }; - "/app/subscriptions/{subscription_id}/update/": { - post: operations["app_subscriptions_update_create"]; + app_subscriptions_update_create: { + parameters: { + /** @description Filter to a specific customer. */ + /** @description Filter to a specific plan. */ + /** @description Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'. */ + query: { + customer_id: string; + plan_id: string; + subscription_filters?: components["schemas"]["SubscriptionCategoricalFilterRequest"][]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SubscriptionRecordUpdateSerializerOldRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["SubscriptionRecordUpdateSerializerOldRequest"]; + "multipart/form-data": components["schemas"]["SubscriptionRecordUpdateSerializerOldRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["SubscriptionRecord"][]; + }; + }; + }; }; - "/app/switch_organization/": { + app_switch_organization_create: { /** @description Get the current settings for the organization. */ - post: operations["app_switch_organization_create"]; + requestBody: { + content: { + "application/json": components["schemas"]["ChangeUserOrganizationRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ChangeUserOrganizationRequestRequest"]; + "multipart/form-data": components["schemas"]["ChangeUserOrganizationRequestRequest"]; + }; + }; + responses: { + /** @description No response body */ + 200: never; + }; }; - "/app/timezones/": { + app_timezones_retrieve: { /** @description Pagination-enabled endpoint for retrieving an organization's event stream. */ - get: operations["app_timezones_retrieve"]; + responses: { + 200: { + content: { + "application/json": components["schemas"]["TimezonesResponse"]; + }; + }; + }; }; - "/app/transfer_subscriptions/": { - post: operations["app_transfer_subscriptions_create"]; + app_transfer_subscriptions_create: { + requestBody: { + content: { + "application/json": components["schemas"]["TransferSubscriptionsRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["TransferSubscriptionsRequestRequest"]; + "multipart/form-data": components["schemas"]["TransferSubscriptionsRequestRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["TransferSubscriptionsSuccess"]; + }; + }; + 400: { + content: { + "application/json": components["schemas"]["TransferSubscriptionsFailure"]; + }; + }; + }; }; - "/app/usage_alerts/": { + app_usage_alerts_list: { /** @description ViewSet for viewing and editing UsageAlerts. */ - get: operations["app_usage_alerts_list"]; + responses: { + 200: { + content: { + "application/json": components["schemas"]["UsageAlert"][]; + }; + }; + }; + }; + app_usage_alerts_create: { /** @description ViewSet for viewing and editing UsageAlerts. */ - post: operations["app_usage_alerts_create"]; + requestBody: { + content: { + "application/json": components["schemas"]["UsageAlertCreateRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["UsageAlertCreateRequest"]; + "multipart/form-data": components["schemas"]["UsageAlertCreateRequest"]; + }; + }; + responses: { + 201: { + content: { + "application/json": components["schemas"]["UsageAlertCreate"]; + }; + }; + }; }; - "/app/usage_alerts/{usage_alert_id}/": { + app_usage_alerts_retrieve: { /** @description ViewSet for viewing and editing UsageAlerts. */ - get: operations["app_usage_alerts_retrieve"]; + parameters: { + path: { + usage_alert_id: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["UsageAlert"]; + }; + }; + }; + }; + app_usage_alerts_destroy: { /** @description ViewSet for viewing and editing UsageAlerts. */ - delete: operations["app_usage_alerts_destroy"]; + parameters: { + path: { + usage_alert_id: string; + }; + }; + responses: { + /** @description No response body */ + 204: never; + }; }; - "/app/user/password/reset/": { + app_user_password_reset_create: { /** @description Verifies the token and resets the password. */ - post: operations["app_user_password_reset_create"]; + requestBody: { + content: { + "application/json": components["schemas"]["ResetPasswordRequestRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["ResetPasswordRequestRequest"]; + "multipart/form-data": components["schemas"]["ResetPasswordRequestRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["ResetPasswordSuccess"]; + }; + }; + }; }; - "/app/user/password/reset/init/": { - post: operations["app_user_password_reset_init_create"]; + app_user_password_reset_init_create: { + requestBody: { + content: { + "application/json": components["schemas"]["EmailRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["EmailRequest"]; + "multipart/form-data": components["schemas"]["EmailRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["InitResetPasswordSuccess"]; + }; + }; + }; }; - "/app/users/": { - get: operations["app_users_list"]; - post: operations["app_users_create"]; + app_users_list: { + responses: { + 200: { + content: { + "application/json": components["schemas"]["User"][]; + }; + }; + }; }; - "/app/webhooks/": { + app_users_create: { + requestBody: { + content: { + "application/json": components["schemas"]["UserRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["UserRequest"]; + "multipart/form-data": components["schemas"]["UserRequest"]; + }; + }; + responses: { + 201: { + content: { + "application/json": components["schemas"]["User"]; + }; + }; + }; + }; + app_webhooks_list: { /** @description API endpoint that allows alerts to be viewed or edited. */ - get: operations["app_webhooks_list"]; + responses: { + 200: { + content: { + "application/json": components["schemas"]["WebhookEndpoint"][]; + }; + }; + }; + }; + app_webhooks_create: { /** @description API endpoint that allows alerts to be viewed or edited. */ - post: operations["app_webhooks_create"]; + requestBody: { + content: { + "application/json": components["schemas"]["WebhookEndpointRequest"]; + "application/x-www-form-urlencoded": components["schemas"]["WebhookEndpointRequest"]; + "multipart/form-data": components["schemas"]["WebhookEndpointRequest"]; + }; + }; + responses: { + 201: { + content: { + "application/json": components["schemas"]["WebhookEndpoint"]; + }; + }; + }; }; - "/app/webhooks/{webhook_endpoint_id}/": { + app_webhooks_retrieve: { /** @description API endpoint that allows alerts to be viewed or edited. */ - get: operations["app_webhooks_retrieve"]; + parameters: { + path: { + webhook_endpoint_id: string; + }; + }; + responses: { + 200: { + content: { + "application/json": components["schemas"]["WebhookEndpoint"]; + }; + }; + }; + }; + app_webhooks_destroy: { /** @description API endpoint that allows alerts to be viewed or edited. */ - delete: operations["app_webhooks_destroy"]; + parameters: { + path: { + webhook_endpoint_id: string; + }; + }; + responses: { + /** @description No response body */ + 204: never; + }; }; - "/stripe/webhook/": { - post: operations["stripe_webhook_create"]; + stripe_webhook_create: { + responses: { + /** @description No response body */ + 200: never; + }; }; } diff --git a/gen/package-lock.json b/gen/package-lock.json index 3fd29c19e..16aa88b66 100644 --- a/gen/package-lock.json +++ b/gen/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "gen", "version": "0.0.1", "license": "MIT", "dependencies": { diff --git a/scripts/gen.sh b/scripts/gen.sh new file mode 100755 index 000000000..76779e9df --- /dev/null +++ b/scripts/gen.sh @@ -0,0 +1,8 @@ +#!/bin/bash +cd backend +python manage.py generate_schema +cd .. +cd gen +npm run update-types +cd .. +