pub struct Service {
pub service_name: Option<String>,
pub active: Option<bool>,
pub delivery_countries: Vec<String>,
pub currency_code: Option<String>,
pub delivery_time: Option<DeliveryTime>,
pub rate_groups: Vec<RateGroup>,
pub shipment_type: Option<i32>,
pub minimum_order_value: Option<Price>,
pub minimum_order_value_table: Option<MinimumOrderValueTable>,
pub store_config: Option<StoreConfig>,
pub loyalty_programs: Vec<LoyaltyProgram>,
}
Expand description
Shipping service.
Fields§
§service_name: Option<String>
Required. Free-form name of the service. Must be unique within target account.
active: Option<bool>
Required. A boolean exposing the active status of the shipping service.
delivery_countries: Vec<String>
Required. The CLDR territory code of the countries to which the service applies.
currency_code: Option<String>
The CLDR code of the currency to which this service applies. Must match that of the prices in rate groups.
delivery_time: Option<DeliveryTime>
Required. Time spent in various aspects from order to the delivery of the product.
rate_groups: Vec<RateGroup>
Optional. Shipping rate group definitions. Only the last one is allowed to
have an empty applicable_shipping_labels
, which means “everything else”.
The other applicable_shipping_labels
must not overlap.
shipment_type: Option<i32>
Type of locations this service ships orders to.
minimum_order_value: Option<Price>
Minimum order value for this service. If set, indicates that customers will have to spend at least this amount. All prices within a service must have the same currency. Cannot be set together with minimum_order_value_table.
minimum_order_value_table: Option<MinimumOrderValueTable>
Table of per store minimum order values for the pickup fulfillment type. Cannot be set together with minimum_order_value.
store_config: Option<StoreConfig>
A list of stores your products are delivered from. This is only valid for the local delivery shipment type.
loyalty_programs: Vec<LoyaltyProgram>
Optional. Loyalty programs that this shipping service is limited to.
Implementations§
source§impl Service
impl Service
sourcepub fn service_name(&self) -> &str
pub fn service_name(&self) -> &str
Returns the value of service_name
, or the default value if service_name
is unset.
sourcepub fn active(&self) -> bool
pub fn active(&self) -> bool
Returns the value of active
, or the default value if active
is unset.
sourcepub fn currency_code(&self) -> &str
pub fn currency_code(&self) -> &str
Returns the value of currency_code
, or the default value if currency_code
is unset.
sourcepub fn shipment_type(&self) -> ShipmentType
pub fn shipment_type(&self) -> ShipmentType
Returns the enum value of shipment_type
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_shipment_type(&mut self, value: ShipmentType)
pub fn set_shipment_type(&mut self, value: ShipmentType)
Sets shipment_type
to the provided enum value.
Trait Implementations§
source§impl Message for Service
impl Message for Service
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 Service
impl PartialEq for Service
impl StructuralPartialEq for Service
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
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