Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): api update #211

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e480186cdd0e2cc631befa7e2c6ba5f2d7ae52052f0e79a748214f3ade8a98ee.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7fca89ba5a0b4997358c25e6cdfb616a1d8b93a6820e25078f3fa5f61110bfe6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,21 @@ private constructor(
fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) =
price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice))

/**
* The Price resource represents a price that can be billed on a subscription,
* resulting in a charge on an invoice in the form of an invoice line item. Prices
* take a quantity and determine an amount to bill.
*
* Orb supports a few different pricing models out of the box. Each of these models
* is serialized differently in a given Price object. The model_type field
* determines the key for the configuration object that is present.
*
* For more on the types of prices, see
* [the core concepts documentation](/core-concepts#plan-and-price)
*/
fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) =
price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice))

/**
* Price's contributions for the timeframe, excluding any minimums and discounts.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,21 @@ private constructor(
fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) =
price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice))

/**
* The Price resource represents a price that can be billed on a subscription,
* resulting in a charge on an invoice in the form of an invoice line item. Prices
* take a quantity and determine an amount to bill.
*
* Orb supports a few different pricing models out of the box. Each of these models
* is serialized differently in a given Price object. The model_type field
* determines the key for the configuration object that is present.
*
* For more on the types of prices, see
* [the core concepts documentation](/core-concepts#plan-and-price)
*/
fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) =
price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice))

/**
* Price's contributions for the timeframe, excluding any minimums and discounts.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import java.util.Optional
* This performs a deletion of this customer, its subscriptions, and its invoices, provided the
* customer does not have any issued invoices. Customers with issued invoices cannot be deleted.
* This operation is irreversible. Note that this is a _soft_ deletion, but the data will be
* inaccessible through the API and Orb dashboard. For a hard-deletion, please reach out to the Orb
* team directly.
* inaccessible through the API and Orb dashboard.
*
* For a hard-deletion, please reach out to the Orb team directly.
*
* **Note**: This operation happens asynchronously and can be expected to take a few minutes to
* propagate to related resources. However, querying for the customer on subsequent GET requests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import java.util.Optional
* for that customer. If neither is specified, the backfill will affect all customers.
*
* When `replace_existing_events` is `true`, this indicates that existing events in the timeframe
* should no longer be counter towards invoiced usage. In this scenario, the parameter `filter` can
* should no longer be counted towards invoiced usage. In this scenario, the parameter `filter` can
* be optionally added which enables filtering using
* [computed properties](/extensibility/advanced-metrics#computed-properties). The expressiveness of
* computed properties allows you to deprecate existing events based on both a period of time and
Expand Down
15 changes: 15 additions & 0 deletions orb-java-core/src/main/kotlin/com/withorb/api/models/Invoice.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5293,6 +5293,21 @@ private constructor(
fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) =
price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice))

/**
* The Price resource represents a price that can be billed on a subscription, resulting
* in a charge on an invoice in the form of an invoice line item. Prices take a quantity
* and determine an amount to bill.
*
* Orb supports a few different pricing models out of the box. Each of these models is
* serialized differently in a given Price object. The model_type field determines the
* key for the configuration object that is present.
*
* For more on the types of prices, see
* [the core concepts documentation](/core-concepts#plan-and-price)
*/
fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) =
price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice))

fun quantity(quantity: Double) = quantity(JsonField.of(quantity))

fun quantity(quantity: JsonField<Double>) = apply { this.quantity = quantity }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5287,6 +5287,21 @@ private constructor(
fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) =
price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice))

/**
* The Price resource represents a price that can be billed on a subscription, resulting
* in a charge on an invoice in the form of an invoice line item. Prices take a quantity
* and determine an amount to bill.
*
* Orb supports a few different pricing models out of the box. Each of these models is
* serialized differently in a given Price object. The model_type field determines the
* key for the configuration object that is present.
*
* For more on the types of prices, see
* [the core concepts documentation](/core-concepts#plan-and-price)
*/
fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) =
price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice))

fun quantity(quantity: Double) = quantity(JsonField.of(quantity))

fun quantity(quantity: JsonField<Double>) = apply { this.quantity = quantity }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,21 @@ private constructor(
fun price(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) =
price(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice))

/**
* The Price resource represents a price that can be billed on a subscription, resulting in
* a charge on an invoice in the form of an invoice line item. Prices take a quantity and
* determine an amount to bill.
*
* Orb supports a few different pricing models out of the box. Each of these models is
* serialized differently in a given Price object. The model_type field determines the key
* for the configuration object that is present.
*
* For more on the types of prices, see
* [the core concepts documentation](/core-concepts#plan-and-price)
*/
fun price(maxGroupTieredPrice: Price.MaxGroupTieredPrice) =
price(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice))

fun quantity(quantity: Double) = quantity(JsonField.of(quantity))

fun quantity(quantity: JsonField<Double>) = apply { this.quantity = quantity }
Expand Down
7 changes: 7 additions & 0 deletions orb-java-core/src/main/kotlin/com/withorb/api/models/Plan.kt
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,13 @@ private constructor(
fun addPrice(groupedTieredPackagePrice: Price.GroupedTieredPackagePrice) =
addPrice(Price.ofGroupedTieredPackagePrice(groupedTieredPackagePrice))

/**
* Prices for this plan. If the plan has phases, this includes prices across all phases of
* the plan.
*/
fun addPrice(maxGroupTieredPrice: Price.MaxGroupTieredPrice) =
addPrice(Price.ofMaxGroupTieredPrice(maxGroupTieredPrice))

fun product(product: Product) = product(JsonField.of(product))

fun product(product: JsonField<Product>) = apply { this.product = product }
Expand Down
Loading