Skip to content
Open
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 Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions proto/sentry_protos/billing/v1/credit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would only make sense for dollar skus right? shared unit skus don't make any sense

Copy link
Copy Markdown
Member Author

@brendanhsentry brendanhsentry Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, that's true. are you thinking we should add a new message specifically for CreditBudget ?

}
9 changes: 7 additions & 2 deletions rust/src/sentry_protos.billing.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -94,6 +95,10 @@ pub struct Credit {
pub end_date: ::core::option::Option<Date>,
#[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<i32>,
}
/// Whether the credit represents a cents allowance or a unit quantity.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
Expand Down
Loading