diff --git a/Cargo.lock b/Cargo.lock index 116d9e7b..4d879270 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.8.6" +version = "0.8.7" dependencies = [ "prost", "prost-types", diff --git a/proto/sentry_protos/billing/v1/credit.proto b/proto/sentry_protos/billing/v1/credit.proto index fdd37a56..e2be3bb0 100644 --- a/proto/sentry_protos/billing/v1/credit.proto +++ b/proto/sentry_protos/billing/v1/credit.proto @@ -25,11 +25,14 @@ enum CreditStatus { // allowance (in cents) or a number of units for specific SKUs. message Credit { CreditType type = 1; - // The SKU this credit applies to. - sentry_protos.billing.v1.SKU sku = 2; + // Deprecated: Use `skus` instead. This field only supports a single SKU. + sentry_protos.billing.v1.SKU sku = 2 [deprecated = true]; // Amount in cents (for CENTS credits) or unit count (for UNITS credits). int64 amount = 3; Date start_date = 4; Date end_date = 5; CreditStatus status = 6; + // The SKUs this credit applies to. For shared budgets, the credit amount + // is shared across all listed SKUs. + repeated sentry_protos.billing.v1.SKU skus = 7; } diff --git a/rust/src/sentry_protos.billing.v1.rs b/rust/src/sentry_protos.billing.v1.rs index 3c7c3641..3cad0b39 100644 --- a/rust/src/sentry_protos.billing.v1.rs +++ b/rust/src/sentry_protos.billing.v1.rs @@ -78,11 +78,12 @@ impl Sku { } /// A credit granted to an organization, representing either a monetary /// allowance (in cents) or a number of units for specific SKUs. -#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] pub struct Credit { #[prost(enumeration = "CreditType", tag = "1")] pub r#type: i32, - /// The SKU this credit applies to. + /// Deprecated: Use `skus` instead. This field only supports a single SKU. + #[deprecated] #[prost(enumeration = "Sku", tag = "2")] pub sku: i32, /// Amount in cents (for CENTS credits) or unit count (for UNITS credits). @@ -94,6 +95,10 @@ pub struct Credit { pub end_date: ::core::option::Option, #[prost(enumeration = "CreditStatus", tag = "6")] pub status: i32, + /// The SKUs this credit applies to. For shared budgets, the credit amount + /// is shared across all listed SKUs. + #[prost(enumeration = "Sku", repeated, tag = "7")] + pub skus: ::prost::alloc::vec::Vec, } /// Whether the credit represents a cents allowance or a unit quantity. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]