pub struct SubscriptionResponse {
pub cancel_at_period_end: bool,
pub current_period_end: Option<DateTime<Utc>>,
pub current_period_start: Option<DateTime<Utc>>,
pub id: i64,
pub status: SubscriptionStatus,
pub user_id: i64,
}Expand description
Subscription response.
JSON schema
{
"title": "SubscriptionResponse",
"description": "Subscription response.",
"type": "object",
"required": [
"id",
"status",
"user_id"
],
"properties": {
"cancel_at_period_end": {
"title": "Cancel At Period End",
"default": false,
"type": "boolean"
},
"current_period_end": {
"title": "Current Period End",
"type": [
"string",
"null"
],
"format": "date-time"
},
"current_period_start": {
"title": "Current Period Start",
"type": [
"string",
"null"
],
"format": "date-time"
},
"id": {
"title": "Id",
"type": "integer"
},
"status": {
"$ref": "#/components/schemas/SubscriptionStatus"
},
"user_id": {
"title": "User Id",
"type": "integer"
}
}
}Fields§
§cancel_at_period_end: bool§current_period_end: Option<DateTime<Utc>>§current_period_start: Option<DateTime<Utc>>§id: i64§status: SubscriptionStatus§user_id: i64Implementations§
Source§impl SubscriptionResponse
impl SubscriptionResponse
pub fn builder() -> SubscriptionResponse
Trait Implementations§
Source§impl Clone for SubscriptionResponse
impl Clone for SubscriptionResponse
Source§fn clone(&self) -> SubscriptionResponse
fn clone(&self) -> SubscriptionResponse
Returns a duplicate of the value. Read more
1.0.0 · 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 SubscriptionResponse
impl Debug for SubscriptionResponse
Source§impl<'de> Deserialize<'de> for SubscriptionResponse
impl<'de> Deserialize<'de> for SubscriptionResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&SubscriptionResponse> for SubscriptionResponse
impl From<&SubscriptionResponse> for SubscriptionResponse
Source§fn from(value: &SubscriptionResponse) -> Self
fn from(value: &SubscriptionResponse) -> Self
Converts to this type from the input type.
Source§impl From<SubscriptionResponse> for SubscriptionResponse
impl From<SubscriptionResponse> for SubscriptionResponse
Source§fn from(value: SubscriptionResponse) -> Self
fn from(value: SubscriptionResponse) -> Self
Converts to this type from the input type.
Source§impl Serialize for SubscriptionResponse
impl Serialize for SubscriptionResponse
Source§impl TryFrom<SubscriptionResponse> for SubscriptionResponse
impl TryFrom<SubscriptionResponse> for SubscriptionResponse
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: SubscriptionResponse) -> Result<Self, ConversionError>
fn try_from(value: SubscriptionResponse) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for SubscriptionResponse
impl RefUnwindSafe for SubscriptionResponse
impl Send for SubscriptionResponse
impl Sync for SubscriptionResponse
impl Unpin for SubscriptionResponse
impl UnwindSafe for SubscriptionResponse
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