Struct google_api_proto::google::shopping::merchant::inventories::v1beta::LocalInventory
source · pub struct LocalInventory {
pub name: String,
pub account: i64,
pub store_code: String,
pub price: Option<Price>,
pub sale_price: Option<Price>,
pub sale_price_effective_date: Option<Interval>,
pub availability: Option<String>,
pub quantity: Option<i64>,
pub pickup_method: Option<String>,
pub pickup_sla: Option<String>,
pub instore_product_location: Option<String>,
pub custom_attributes: Vec<CustomAttribute>,
}
Expand description
Local inventory information for the product. Represents in-store information
for a specific product at the store specified by
[storeCode
][google.shopping.merchant.inventories.v1beta.LocalInventory.store_code].
For a list of all accepted attribute values, see the local product inventory
data specification.
Fields§
§name: String
Output only. The name of the LocalInventory
resource.
Format:
accounts/{account}/products/{product}/localInventories/{store_code}
account: i64
Output only. The account that owns the product. This field will be ignored if set by the client.
store_code: String
Required. Immutable. Store code (the store ID from your Business Profile) of the physical store the product is sold in. See the Local product inventory data specification for more information.
price: Option<Price>
Price of the product at this store.
sale_price: Option<Price>
Sale price of the product at this store. Mandatory if
[salePriceEffectiveDate
][google.shopping.merchant.inventories.v1beta.LocalInventory.sale_price_effective_date]
is defined.
sale_price_effective_date: Option<Interval>
The TimePeriod
of the
sale at this store.
availability: Option<String>
Availability of the product at this store. For accepted attribute values, see the local product inventory data specification
quantity: Option<i64>
Quantity of the product available at this store. Must be greater than or equal to zero.
pickup_method: Option<String>
Supported pickup method for this product. Unless the value is "not supported"
, this field must be submitted together with
pickupSla
.
For accepted attribute values, see the local product inventory data
specification
pickup_sla: Option<String>
Relative time period from the order date for an order for this product,
from this store, to be ready for pickup. Must be submitted with
pickupMethod
.
For accepted attribute values, see the local product inventory data
specification
instore_product_location: Option<String>
Location of the product inside the store. Maximum length is 20 bytes.
custom_attributes: Vec<CustomAttribute>
A list of custom (merchant-provided) attributes. You can also use
CustomAttribute
to submit any attribute of the data specification in its
generic form.
Implementations§
source§impl LocalInventory
impl LocalInventory
sourcepub fn availability(&self) -> &str
pub fn availability(&self) -> &str
Returns the value of availability
, or the default value if availability
is unset.
sourcepub fn quantity(&self) -> i64
pub fn quantity(&self) -> i64
Returns the value of quantity
, or the default value if quantity
is unset.
sourcepub fn pickup_method(&self) -> &str
pub fn pickup_method(&self) -> &str
Returns the value of pickup_method
, or the default value if pickup_method
is unset.
sourcepub fn pickup_sla(&self) -> &str
pub fn pickup_sla(&self) -> &str
Returns the value of pickup_sla
, or the default value if pickup_sla
is unset.
sourcepub fn instore_product_location(&self) -> &str
pub fn instore_product_location(&self) -> &str
Returns the value of instore_product_location
, or the default value if instore_product_location
is unset.
Trait Implementations§
source§impl Clone for LocalInventory
impl Clone for LocalInventory
source§fn clone(&self) -> LocalInventory
fn clone(&self) -> LocalInventory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LocalInventory
impl Debug for LocalInventory
source§impl Default for LocalInventory
impl Default for LocalInventory
source§impl Message for LocalInventory
impl Message for LocalInventory
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
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,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
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,
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,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
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,
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,
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,
self
.source§impl PartialEq for LocalInventory
impl PartialEq for LocalInventory
source§fn eq(&self, other: &LocalInventory) -> bool
fn eq(&self, other: &LocalInventory) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for LocalInventory
Auto Trait Implementations§
impl Freeze for LocalInventory
impl RefUnwindSafe for LocalInventory
impl Send for LocalInventory
impl Sync for LocalInventory
impl Unpin for LocalInventory
impl UnwindSafe for LocalInventory
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request