#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetBillingInfoReq {
#[prost(string, tag = "1")]
pub team_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub billing_info: ::core::option::Option<super::prod_charger::BillingInfo>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetBillingInfoResp {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBillingInfoReq {
#[prost(string, tag = "1")]
pub team_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetBillingInfoResp {
#[prost(message, optional, tag = "10")]
pub billing_info: ::core::option::Option<super::prod_charger::BillingInfo>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPaymentMethodsReq {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PendingPaymentMethod {
#[prost(string, tag = "10")]
pub ach_microdeposit_hosted_verification_url: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPaymentMethodsResp {
#[prost(message, repeated, tag = "10")]
pub payment_methods: ::prost::alloc::vec::Vec<super::prod_charger::PaymentMethod>,
#[prost(message, optional, tag = "21")]
pub pending_payment_method: ::core::option::Option<PendingPaymentMethod>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetDefaultPaymentMethodReq {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
#[prost(string, tag = "20")]
pub payment_method_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetDefaultPaymentMethodResp {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Line {
#[prost(string, tag = "1")]
pub cluster_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub unit_type: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub unit_price: i64,
#[prost(int64, tag = "5")]
pub num_units: i64,
#[prost(int64, tag = "6")]
pub amount: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CoreInvoice {
#[prost(message, repeated, tag = "1")]
pub lines: ::prost::alloc::vec::Vec<Line>,
#[prost(int64, tag = "2")]
pub amount_before_vat: i64,
#[prost(int64, tag = "3")]
pub vat_cost: i64,
#[prost(int64, tag = "4")]
pub amount_after_vat: i64,
#[prost(int64, tag = "5")]
pub auto_credits_issued: i64,
#[prost(int64, tag = "6")]
pub default_credits_issued: i64,
#[prost(message, optional, tag = "9")]
pub total_with_corr: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "8")]
pub prepaid_credits: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "7")]
pub prepaid_credits_used: ::core::option::Option<super::prod_charger::Cent>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAmountToPayReq {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAmountToPayResp {
#[prost(message, optional, tag = "1")]
pub core_invoice: ::core::option::Option<CoreInvoice>,
#[prost(int64, tag = "2")]
pub effective_spending_limit: i64,
#[prost(int64, tag = "3")]
pub default_credits: i64,
#[prost(message, optional, tag = "4")]
pub billing_cycle: ::core::option::Option<BillingCycle>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnalyzeBillingItemsRequest {
#[prost(message, optional, tag = "1")]
pub analytics_request: ::core::option::Option<
super::prod::clickhouse_analytics::AnalyticsRequest,
>,
#[prost(string, tag = "2")]
pub team_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BillingCycle {
#[prost(int32, tag = "1")]
pub year: i32,
#[prost(int32, tag = "2")]
pub month: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChargerAttempt {
#[prost(int32, tag = "10")]
pub ticket: i32,
#[prost(bool, tag = "20")]
pub successful: bool,
#[prost(string, tag = "30")]
pub payment_method_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MonthlyInvoiceBundle {
#[prost(message, optional, tag = "10")]
pub billing_cycle: ::core::option::Option<BillingCycle>,
#[prost(message, optional, tag = "20")]
pub default_credits_issued: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "30")]
pub auto_credits_issued: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "35")]
pub prepaid_tokens_to_spend: ::core::option::Option<super::prod_charger::Cent>,
#[prost(string, optional, tag = "40")]
pub billing_items_csv_asset_key_suffix: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(string, optional, tag = "50")]
pub corrections_csv_asset_key_suffix: ::core::option::Option<
::prost::alloc::string::String,
>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PrepaidInvoiceBundle {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscriptionsInvoiceBundle {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InvoiceBundle {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
#[prost(string, tag = "20")]
pub invoice_id: ::prost::alloc::string::String,
#[prost(string, tag = "21")]
pub invoice_number: ::prost::alloc::string::String,
#[prost(message, optional, tag = "31")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(enumeration = "invoice_bundle::Status", tag = "40")]
pub invoice_status: i32,
#[prost(message, optional, tag = "50")]
pub first_desired_next_cycle_ts: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, repeated, tag = "60")]
pub charger_attempts: ::prost::alloc::vec::Vec<ChargerAttempt>,
#[prost(message, repeated, tag = "70")]
pub lines: ::prost::alloc::vec::Vec<Line>,
#[prost(int64, tag = "80")]
pub subtotal: i64,
#[prost(int64, tag = "90")]
pub tax: i64,
#[prost(int64, tag = "100")]
pub total: i64,
#[prost(string, tag = "110")]
pub invoice_pdf_asset_key_suffix: ::prost::alloc::string::String,
#[prost(oneof = "invoice_bundle::Flavour", tags = "120, 130, 140")]
pub flavour: ::core::option::Option<invoice_bundle::Flavour>,
}
pub mod invoice_bundle {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Status {
Invalid = 0,
Pending = 1,
Paid = 2,
WillNeverBeCharged = 3,
Failed = 4,
}
impl Status {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Invalid => "INVALID",
Self::Pending => "PENDING",
Self::Paid => "PAID",
Self::WillNeverBeCharged => "WILL_NEVER_BE_CHARGED",
Self::Failed => "FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INVALID" => Some(Self::Invalid),
"PENDING" => Some(Self::Pending),
"PAID" => Some(Self::Paid),
"WILL_NEVER_BE_CHARGED" => Some(Self::WillNeverBeCharged),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Flavour {
#[prost(message, tag = "120")]
Monthly(super::MonthlyInvoiceBundle),
#[prost(message, tag = "130")]
Prepaid(super::PrepaidInvoiceBundle),
#[prost(message, tag = "140")]
Subscriptions(super::SubscriptionsInvoiceBundle),
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InvoiceIds {
#[prost(string, repeated, tag = "10")]
pub invoice_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListInvoicesReq {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
#[prost(oneof = "list_invoices_req::Filter", tags = "20, 30, 40")]
pub filter: ::core::option::Option<list_invoices_req::Filter>,
}
pub mod list_invoices_req {
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
pub enum Filter {
#[prost(message, tag = "20")]
BillingCycle(super::BillingCycle),
#[prost(message, tag = "30")]
Since(super::BillingCycle),
#[prost(message, tag = "40")]
InvoiceIds(super::InvoiceIds),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListInvoicesResp {
#[prost(message, repeated, tag = "1")]
pub invoices: ::prost::alloc::vec::Vec<InvoiceBundle>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PrepaidBalanceChange {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
#[prost(enumeration = "prepaid_balance_change::ChangeOrigin", tag = "20")]
pub change_origin: i32,
#[prost(enumeration = "prepaid_balance_change::TopUpStatus", optional, tag = "30")]
pub topup_status: ::core::option::Option<i32>,
#[prost(message, optional, tag = "40")]
pub amount: ::core::option::Option<super::prod_charger::Cent>,
#[prost(string, optional, tag = "50")]
pub invoice_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "51")]
pub invoice_number: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "60")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int32, optional, tag = "70")]
pub spend_bp_key_year: ::core::option::Option<i32>,
#[prost(int32, optional, tag = "80")]
pub spend_bp_key_month: ::core::option::Option<i32>,
#[prost(message, optional, tag = "85")]
pub create_ts: ::core::option::Option<::prost_types::Timestamp>,
}
pub mod prepaid_balance_change {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ChangeOrigin {
InvalidOrigin = 0,
Purchase = 10,
Spend = 20,
Refund = 30,
Manual = 40,
}
impl ChangeOrigin {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::InvalidOrigin => "INVALID_ORIGIN",
Self::Purchase => "PURCHASE",
Self::Spend => "SPEND",
Self::Refund => "REFUND",
Self::Manual => "MANUAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INVALID_ORIGIN" => Some(Self::InvalidOrigin),
"PURCHASE" => Some(Self::Purchase),
"SPEND" => Some(Self::Spend),
"REFUND" => Some(Self::Refund),
"MANUAL" => Some(Self::Manual),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum TopUpStatus {
InvalidStatus = 0,
ToGenerateInvoice = 10,
FailedToGenerateInvoice = 20,
ToCharge = 30,
FailedToCharge = 40,
Succeeded = 50,
}
impl TopUpStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::InvalidStatus => "INVALID_STATUS",
Self::ToGenerateInvoice => "TO_GENERATE_INVOICE",
Self::FailedToGenerateInvoice => "FAILED_TO_GENERATE_INVOICE",
Self::ToCharge => "TO_CHARGE",
Self::FailedToCharge => "FAILED_TO_CHARGE",
Self::Succeeded => "SUCCEEDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INVALID_STATUS" => Some(Self::InvalidStatus),
"TO_GENERATE_INVOICE" => Some(Self::ToGenerateInvoice),
"FAILED_TO_GENERATE_INVOICE" => Some(Self::FailedToGenerateInvoice),
"TO_CHARGE" => Some(Self::ToCharge),
"FAILED_TO_CHARGE" => Some(Self::FailedToCharge),
"SUCCEEDED" => Some(Self::Succeeded),
_ => None,
}
}
}
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPrepaidBalanceChangesReq {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPrepaidBalanceChangesResp {
#[prost(message, repeated, tag = "10")]
pub changes: ::prost::alloc::vec::Vec<PrepaidBalanceChange>,
#[prost(message, optional, tag = "20")]
pub total: ::core::option::Option<super::prod_charger::Cent>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopUpOrGetExistingPendingChangeReq {
#[prost(string, tag = "10")]
pub team_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "20")]
pub amount: ::core::option::Option<super::prod_charger::Cent>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TopUpOrGetExistingPendingChangeResp {
#[prost(message, optional, tag = "10")]
pub change: ::core::option::Option<PrepaidBalanceChange>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSpendingLimitsReq {
#[prost(string, tag = "1")]
pub team_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SpendingLimits {
#[prost(message, optional, tag = "1")]
pub hard_sl_override: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "2")]
pub hard_sl_auto: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "5")]
pub effective_hard_sl: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "3")]
pub soft_sl: ::core::option::Option<super::prod_charger::Cent>,
#[prost(message, optional, tag = "4")]
pub effective_sl: ::core::option::Option<super::prod_charger::Cent>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSpendingLimitsResp {
#[prost(message, optional, tag = "1")]
pub spending_limits: ::core::option::Option<SpendingLimits>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetSoftSpendingLimitReq {
#[prost(string, tag = "1")]
pub team_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub desired_soft_spending_limit: ::core::option::Option<super::prod_charger::Cent>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetSoftSpendingLimitResp {
#[prost(message, optional, tag = "1")]
pub this_bp_soft_spending_limit: ::core::option::Option<super::prod_charger::Cent>,
}
pub mod ui_svc_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct UiSvcClient<T> {
inner: tonic::client::Grpc<T>,
}
impl UiSvcClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> UiSvcClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> UiSvcClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
UiSvcClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn set_billing_info(
&mut self,
request: impl tonic::IntoRequest<super::SetBillingInfoReq>,
) -> std::result::Result<
tonic::Response<super::SetBillingInfoResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/SetBillingInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "SetBillingInfo"));
self.inner.unary(req, path, codec).await
}
pub async fn get_billing_info(
&mut self,
request: impl tonic::IntoRequest<super::GetBillingInfoReq>,
) -> std::result::Result<
tonic::Response<super::GetBillingInfoResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/GetBillingInfo",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "GetBillingInfo"));
self.inner.unary(req, path, codec).await
}
pub async fn list_payment_methods(
&mut self,
request: impl tonic::IntoRequest<super::ListPaymentMethodsReq>,
) -> std::result::Result<
tonic::Response<super::ListPaymentMethodsResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/ListPaymentMethods",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "ListPaymentMethods"));
self.inner.unary(req, path, codec).await
}
pub async fn set_default_payment_method(
&mut self,
request: impl tonic::IntoRequest<super::SetDefaultPaymentMethodReq>,
) -> std::result::Result<
tonic::Response<super::SetDefaultPaymentMethodResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/SetDefaultPaymentMethod",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("prod_mc_billing.UISvc", "SetDefaultPaymentMethod"),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_amount_to_pay(
&mut self,
request: impl tonic::IntoRequest<super::GetAmountToPayReq>,
) -> std::result::Result<
tonic::Response<super::GetAmountToPayResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/GetAmountToPay",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "GetAmountToPay"));
self.inner.unary(req, path, codec).await
}
pub async fn analyze_billing_items(
&mut self,
request: impl tonic::IntoRequest<super::AnalyzeBillingItemsRequest>,
) -> std::result::Result<
tonic::Response<super::super::prod::clickhouse_analytics::AnalyticsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/AnalyzeBillingItems",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "AnalyzeBillingItems"));
self.inner.unary(req, path, codec).await
}
pub async fn list_invoices(
&mut self,
request: impl tonic::IntoRequest<super::ListInvoicesReq>,
) -> std::result::Result<
tonic::Response<super::ListInvoicesResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/ListInvoices",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "ListInvoices"));
self.inner.unary(req, path, codec).await
}
pub async fn list_prepaid_balance_changes(
&mut self,
request: impl tonic::IntoRequest<super::ListPrepaidBalanceChangesReq>,
) -> std::result::Result<
tonic::Response<super::ListPrepaidBalanceChangesResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/ListPrepaidBalanceChanges",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("prod_mc_billing.UISvc", "ListPrepaidBalanceChanges"),
);
self.inner.unary(req, path, codec).await
}
pub async fn top_up_or_get_existing_pending_change(
&mut self,
request: impl tonic::IntoRequest<super::TopUpOrGetExistingPendingChangeReq>,
) -> std::result::Result<
tonic::Response<super::TopUpOrGetExistingPendingChangeResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/TopUpOrGetExistingPendingChange",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"prod_mc_billing.UISvc",
"TopUpOrGetExistingPendingChange",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_spending_limits(
&mut self,
request: impl tonic::IntoRequest<super::GetSpendingLimitsReq>,
) -> std::result::Result<
tonic::Response<super::GetSpendingLimitsResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/GetSpendingLimits",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("prod_mc_billing.UISvc", "GetSpendingLimits"));
self.inner.unary(req, path, codec).await
}
pub async fn set_soft_spending_limit(
&mut self,
request: impl tonic::IntoRequest<super::SetSoftSpendingLimitReq>,
) -> std::result::Result<
tonic::Response<super::SetSoftSpendingLimitResp>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic_prost::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/prod_mc_billing.UISvc/SetSoftSpendingLimit",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("prod_mc_billing.UISvc", "SetSoftSpendingLimit"),
);
self.inner.unary(req, path, codec).await
}
}
}