pub struct Catalog {
pub last_updated: String,
pub provider: Option<Value>,
pub category_filter: Option<Value>,
pub provider_filter: Option<Value>,
pub source: Option<Value>,
pub services: Vec<ServiceDetail>,
pub extra: BTreeMap<String, Value>,
}Expand description
The data payload of a stripe projects catalog --json envelope.
Fields§
§last_updated: String§provider: Option<Value>Present on provider-filtered responses; wire type varies (string or object).
category_filter: Option<Value>Present on category-filtered responses; wire type varies (string or object).
provider_filter: Option<Value>Echo of the provider filter token; wire type varies (string or object).
source: Option<Value>§services: Vec<ServiceDetail>§extra: BTreeMap<String, Value>Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn from_json_envelope(raw: &str) -> Result<Self, Error>
pub fn from_json_envelope(raw: &str) -> Result<Self, Error>
Parse a full {ok, command, version, data} envelope and return its
data as a Catalog.
Sourcepub fn lookup(&self, reference: &str) -> Option<&ServiceDetail>
pub fn lookup(&self, reference: &str) -> Option<&ServiceDetail>
Look up a service by its stripe projects add reference
(provider_name lowercased + / + service_id).
Sourcepub fn drift_report(&self) -> Vec<String>
pub fn drift_report(&self) -> Vec<String>
Collect every unmodeled field (extra) and every Unknown enum across
the whole catalog. Empty means the model fully covers the wire format.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Catalog
impl<'de> Deserialize<'de> for Catalog
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
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
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