Skip to content

Commit

Permalink
Add _manifest to product provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Sep 12, 2024
1 parent bfa6265 commit ef7e80c
Show file tree
Hide file tree
Showing 49 changed files with 1,776 additions and 483 deletions.
389 changes: 291 additions & 98 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ TF_REATTACH_PROVIDERS=... terraform apply



<!-- Start Summary [summary] -->
## Summary


<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents

* [SDK Installation](#sdk-installation)
* [SDK Example Usage](#sdk-example-usage)
<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
## SDK Installation

Expand All @@ -64,7 +77,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.10.3"
version = "0.10.4"
}
}
}
Expand Down Expand Up @@ -100,12 +113,6 @@ TF_REATTACH_PROVIDERS=... terraform apply



<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations


<!-- End Available Resources and Operations [operations] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods.
Expand Down
24 changes: 11 additions & 13 deletions docs/data-sources/price.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Price DataSource

```terraform
data "epilot-product_price" "my_price" {
hydrate = true
price_id = "123e4567-e89b-12d3-a456-426614174000"
strict = true
hydrate = false
strict = true
}
```

Expand All @@ -34,37 +33,36 @@ data "epilot-product_price" "my_price" {
- `active` (Boolean) Whether the price can be used for new purchases.
- `additional` (Map of String) Additional fields that are not part of the schema
- `billing_duration_amount` (Number) The billing period duration
- `billing_duration_unit` (String) The billing period duration unit. must be one of ["weeks", "months", "years"]
- `billing_duration_unit` (String) The billing period duration unit
- `created_at` (String)
- `description` (String) A brief description of the price.
- `files` (Attributes) (see [below for nested schema](#nestedatt--files))
- `id` (String) The ID of this resource.
- `is_composite_price` (Boolean) The flag for prices that contain price components.
- `is_tax_inclusive` (Boolean) Specifies whether the price is considered `inclusive` of taxes or not.
- `long_description` (String) A detailed description of the price. This is shown on the order document and order table. Multi-line supported.
- `manifest` (List of String) Manifest ID used to create/update the entity
- `notice_time_amount` (Number) The notice period duration
- `notice_time_unit` (String) The notice period duration unit. must be one of ["weeks", "months", "years"]
- `notice_time_unit` (String) The notice period duration unit
- `org` (String) Organization Id the entity belongs to
- `owners` (Attributes List) (see [below for nested schema](#nestedatt--owners))
- `price_components` (Attributes) A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. (see [below for nested schema](#nestedatt--price_components))
- `price_display_in_journeys` (String) Defines the way the price amount is display in epilot journeys. must be one of ["show_price", "show_as_starting_price", "show_as_on_request"]
- `price_display_in_journeys` (String) Defines the way the price amount is display in epilot journeys.
- `pricing_model` (String) Describes how to compute the price per period. Either `per_unit`, `tiered_graduated` or `tiered_volume`.
- `per_unit` indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity
- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.

must be one of ["per_unit", "tiered_volume", "tiered_graduated", "tiered_flatfee"]
- `renewal_duration_amount` (Number) The renewal period duration
- `renewal_duration_unit` (String) The renewal period duration unit. must be one of ["weeks", "months", "years"]
- `schema` (String) must be one of ["price"]
- `renewal_duration_unit` (String) The renewal period duration unit
- `schema` (String)
- `tags` (List of String)
- `tax` (String) Parsed as JSON.
- `termination_time_amount` (Number) The termination period duration
- `termination_time_unit` (String) The termination period duration unit. must be one of ["weeks", "months", "years"]
- `termination_time_unit` (String) The termination period duration unit
- `tiers` (Attributes List) Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee. (see [below for nested schema](#nestedatt--tiers))
- `title` (String)
- `type` (String) One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. must be one of ["one_time", "recurring"]
- `type` (String) One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase.
- `unit` (String) The unit of measurement used for display purposes and possibly for calculations when the price is variable.
- `unit_amount` (Number) The unit amount in cents to be charged, represented as a whole integer if possible.
- `unit_amount_currency` (String) Three-letter ISO currency code, in lowercase.
Expand Down Expand Up @@ -130,7 +128,7 @@ Read-Only:

Read-Only:

- `display_mode` (String) must be one of ["hidden", "on_request"]
- `display_mode` (String)
- `flat_fee_amount` (Number)
- `flat_fee_amount_decimal` (String)
- `unit_amount` (Number)
Expand Down
10 changes: 4 additions & 6 deletions docs/data-sources/product.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Product DataSource

```terraform
data "epilot-product_product" "my_product" {
hydrate = false
product_id = "123e4567-e89b-12d3-a456-426614174000"
strict = true
hydrate = false
strict = false
}
```

Expand All @@ -41,14 +40,15 @@ data "epilot-product_product" "my_product" {
- `files` (Attributes) (see [below for nested schema](#nestedatt--files))
- `id` (String) The ID of this resource.
- `internal_name` (String) Not visible to customers, only in internal tables
- `manifest` (List of String) Manifest ID used to create/update the entity
- `name` (String) The description for the product
- `org` (String) Organization Id the entity belongs to
- `owners` (Attributes List) (see [below for nested schema](#nestedatt--owners))
- `price_options` (Attributes) (see [below for nested schema](#nestedatt--price_options))
- `product_downloads` (Attributes) (see [below for nested schema](#nestedatt--product_downloads))
- `product_images` (Attributes) (see [below for nested schema](#nestedatt--product_images))
- `purpose` (List of String)
- `schema` (String) must be one of ["product"]
- `schema` (String)
- `tags` (List of String)
- `title` (String)
- `type` (String) The type of Product:
Expand All @@ -57,8 +57,6 @@ data "epilot-product_product" "my_product" {
|----| ----|
| `product` | Represents a physical good |
| `service` | Represents a service or virtual product |

must be one of ["product", "service"]
- `updated_at` (String)

<a id="nestedatt--acl"></a>
Expand Down
8 changes: 4 additions & 4 deletions docs/data-sources/tax.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Tax DataSource

```terraform
data "epilot-product_tax" "my_tax" {
hydrate = true
hydrate = false
strict = false
tax_id = "123e4567-e89b-12d3-a456-426614174000"
}
```

Expand All @@ -37,14 +36,15 @@ data "epilot-product_tax" "my_tax" {
- `description` (String)
- `files` (Attributes) (see [below for nested schema](#nestedatt--files))
- `id` (String) The ID of this resource.
- `manifest` (List of String) Manifest ID used to create/update the entity
- `org` (String) Organization Id the entity belongs to
- `owners` (Attributes List) (see [below for nested schema](#nestedatt--owners))
- `rate` (String)
- `region` (String)
- `schema` (String) must be one of ["tax"]
- `schema` (String)
- `tags` (List of String)
- `title` (String)
- `type` (String) must be one of ["VAT", "Custom"]
- `type` (String)
- `updated_at` (String)

<a id="nestedatt--acl"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.10.3"
version = "0.10.4"
}
}
}
Expand Down
92 changes: 65 additions & 27 deletions docs/resources/price.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,68 @@ Price Resource

```terraform
resource "epilot-product_price" "my_price" {
schema = "price"
active = true
billing_duration_amount = 66.76
billing_duration_unit = "weeks"
description = "...my_description..."
is_composite_price = false
is_tax_inclusive = true
long_description = "...my_long_description..."
notice_time_amount = 2.66
notice_time_unit = "months"
price_display_in_journeys = "show_as_starting_price"
price_id = "123e4567-e89b-12d3-a456-426614174000"
active = false
additional = {
"see" : jsonencode("documentation"),
}
billing_duration_amount = 4.23
billing_duration_unit = "years"
description = "...my_description..."
files = {
dollar_relation = [
{
entity_id = "123e4567-e89b-12d3-a456-426614174000"
tags = [
"..."
]
}
]
}
is_composite_price = false
is_tax_inclusive = false
long_description = "...my_long_description..."
manifest = [
"123e4567-e89b-12d3-a456-426614174000"
]
notice_time_amount = 7.88
notice_time_unit = "weeks"
price_components = {
dollar_relation = [
{
entity_id = "...my_entity_id..."
tags = [
"..."
]
}
]
}
price_display_in_journeys = "show_price"
pricing_model = "tiered_graduated"
renewal_duration_amount = 13.87
renewal_duration_unit = "months"
tax = "{ \"see\": \"documentation\" }"
termination_time_amount = 70.52
termination_time_unit = "weeks"
type = "one_time"
unit = "...my_unit..."
unit_amount = 62.81
unit_amount_currency = "EUR"
unit_amount_decimal = "...my_unit_amount_decimal..."
variable_price = true
renewal_duration_amount = 3.79
renewal_duration_unit = "years"
schema = "price"
tags = [
"..."
]
tax = "{ \"see\": \"documentation\" }"
termination_time_amount = 2.23
termination_time_unit = "years"
tiers = [
{
display_mode = "on_request"
flat_fee_amount = 1.58
flat_fee_amount_decimal = "...my_flat_fee_amount_decimal..."
unit_amount = 4.92
unit_amount_decimal = "...my_unit_amount_decimal..."
up_to = 5.32
}
]
type = "one_time"
unit = "...my_unit..."
unit_amount = 6.37
unit_amount_currency = "EUR"
unit_amount_decimal = "...my_unit_amount_decimal..."
variable_price = true
}
```

Expand All @@ -58,6 +96,7 @@ resource "epilot-product_price" "my_price" {
- `is_composite_price` (Boolean) The flag for prices that contain price components.
- `is_tax_inclusive` (Boolean) Specifies whether the price is considered `inclusive` of taxes or not. Default: false
- `long_description` (String) A detailed description of the price. This is shown on the order document and order table. Multi-line supported.
- `manifest` (List of String) Manifest ID used to create/update the entity
- `notice_time_amount` (Number) The notice period duration
- `notice_time_unit` (String) The notice period duration unit. must be one of ["weeks", "months", "years"]
- `price_components` (Attributes) A set of [price](/api/pricing#tag/simple_price_schema) components that define the composite price. (see [below for nested schema](#nestedatt--price_components))
Expand All @@ -67,17 +106,16 @@ resource "epilot-product_price" "my_price" {
- `tiered_graduated` indicates that the unit pricing will be computed using tiers attribute. The customer pays the price per unit in every range their purchase rises through.
- `tiered_volume` indicates that the unit pricing will be computed using tiers attribute. The customer pays the same unit price for all purchased units.
- `tiered_flatfee` While similar to tiered_volume, tiered flat fee charges for the same price (flat) for the entire range instead using the unit price to multiply the quantity.

must be one of ["per_unit", "tiered_volume", "tiered_graduated", "tiered_flatfee"]; Default: "per_unit"
Default: "per_unit"; must be one of ["per_unit", "tiered_volume", "tiered_graduated", "tiered_flatfee"]
- `renewal_duration_amount` (Number) The renewal period duration
- `renewal_duration_unit` (String) The renewal period duration unit. must be one of ["weeks", "months", "years"]
- `schema` (String) must be one of ["price"]
- `schema` (String) must be "price"
- `tags` (List of String)
- `tax` (String) Parsed as JSON.
- `termination_time_amount` (Number) The termination period duration
- `termination_time_unit` (String) The termination period duration unit. must be one of ["weeks", "months", "years"]
- `tiers` (Attributes List) Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee. (see [below for nested schema](#nestedatt--tiers))
- `type` (String) One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. must be one of ["one_time", "recurring"]; Default: "one_time"
- `type` (String) One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. Default: "one_time"; must be one of ["one_time", "recurring"]
- `unit` (String) The unit of measurement used for display purposes and possibly for calculations when the price is variable.
- `unit_amount` (Number) The unit amount in cents to be charged, represented as a whole integer if possible.
- `unit_amount_currency` (String) Three-letter ISO currency code, in lowercase.
Expand Down
Loading

0 comments on commit ef7e80c

Please sign in to comment.