diff --git a/Cargo.lock b/Cargo.lock index d0fbd53..059871c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -717,7 +717,7 @@ checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "sentry_protos" -version = "0.8.22" +version = "0.8.23" dependencies = [ "prost", "prost-types", diff --git a/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_create_and_bill_contract.proto b/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_create_and_bill_contract.proto new file mode 100644 index 0000000..1e43458 --- /dev/null +++ b/proto/sentry_protos/billing/v1/services/invoicer/v1/endpoint_create_and_bill_contract.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; + +package sentry_protos.billing.v1.services.invoicer.v1; + +import "sentry_protos/billing/v1/services/contract/v1/pricing_config.proto"; + +message CreateAndBillContractRequest { + uint64 organization_id = 1; + string package_uid = 2; + repeated sentry_protos.billing.v1.services.contract.v1.UserConfig user_configs = 3; +} + +message CreateAndBillContractResponse { + bool success = 1; +} diff --git a/rust/src/sentry_protos.billing.v1.services.invoicer.v1.rs b/rust/src/sentry_protos.billing.v1.services.invoicer.v1.rs index 767c015..2581b16 100644 --- a/rust/src/sentry_protos.billing.v1.services.invoicer.v1.rs +++ b/rust/src/sentry_protos.billing.v1.services.invoicer.v1.rs @@ -8,6 +8,20 @@ pub struct ChargeInvoicesRequest { } #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct ChargeInvoicesResponse {} +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct CreateAndBillContractRequest { + #[prost(uint64, tag = "1")] + pub organization_id: u64, + #[prost(string, tag = "2")] + pub package_uid: ::prost::alloc::string::String, + #[prost(message, repeated, tag = "3")] + pub user_configs: ::prost::alloc::vec::Vec, +} +#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] +pub struct CreateAndBillContractResponse { + #[prost(bool, tag = "1")] + pub success: bool, +} #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)] pub struct CreateInvoicesRequest { /// The current time used to select contracts whose billing period has ended