pub struct RecordSubscriptionRequest {
pub subject: String,
pub product_id: String,
pub status: i32,
pub provider: String,
pub provider_customer_id: String,
pub provider_subscription_id: String,
pub current_period_end: Option<Timestamp>,
pub event_id: String,
pub client_operation_id: String,
}Expand description
Records/updates a subject’s paid entitlement. A privilege-granting write —
weft gates it on the billing service account’s billing:write Right and
maps product_id → plan from checked-in, fail-closed config.
Fields§
§subject: String§product_id: String§status: i32§provider: String§provider_customer_id: String§provider_subscription_id: String§current_period_end: Option<Timestamp>§event_id: StringProvider webhook event id — the natural idempotency key for the upstream
billing event. Retained for handler-side dedup alongside the transport
client_operation_id.
client_operation_id: StringImplementations§
Source§impl RecordSubscriptionRequest
impl RecordSubscriptionRequest
Sourcepub fn status(&self) -> SubscriptionStatus
pub fn status(&self) -> SubscriptionStatus
Returns the enum value of status, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: SubscriptionStatus)
pub fn set_status(&mut self, value: SubscriptionStatus)
Sets status to the provided enum value.
Trait Implementations§
Source§impl Clone for RecordSubscriptionRequest
impl Clone for RecordSubscriptionRequest
Source§fn clone(&self) -> RecordSubscriptionRequest
fn clone(&self) -> RecordSubscriptionRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RecordSubscriptionRequest
impl Debug for RecordSubscriptionRequest
Source§impl Default for RecordSubscriptionRequest
impl Default for RecordSubscriptionRequest
impl Eq for RecordSubscriptionRequest
Source§impl Hash for RecordSubscriptionRequest
impl Hash for RecordSubscriptionRequest
Source§impl Message for RecordSubscriptionRequest
impl Message for RecordSubscriptionRequest
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for RecordSubscriptionRequest
Auto Trait Implementations§
impl Freeze for RecordSubscriptionRequest
impl RefUnwindSafe for RecordSubscriptionRequest
impl Send for RecordSubscriptionRequest
impl Sync for RecordSubscriptionRequest
impl Unpin for RecordSubscriptionRequest
impl UnsafeUnpin for RecordSubscriptionRequest
impl UnwindSafe for RecordSubscriptionRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more