pub struct RateGroup {
pub applicable_shipping_labels: Vec<String>,
pub single_value: Option<Value>,
pub main_table: Option<Table>,
pub subtables: Vec<Table>,
pub carrier_rates: Vec<CarrierRate>,
pub name: Option<String>,
}
Expand description
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.
Fields§
§applicable_shipping_labels: Vec<String>
Required. A list of shipping labels defining the products to which this rate group applies to. This is a disjunction: only one of the labels has to match for the rate group to apply. May only be empty for the last rate group of a service.
single_value: Option<Value>
The value of the rate group (For example flat rate $10). Can only be set
if main_table
and subtables
are not set.
main_table: Option<Table>
A table defining the rate group, when single_value
is not
expressive enough. Can only be set if single_value
is not
set.
subtables: Vec<Table>
Optional. A list of subtables referred to by main_table
. Can only
be set if main_table
is set.
carrier_rates: Vec<CarrierRate>
Optional. A list of carrier rates that can be referred to by
main_table
or single_value
.
name: Option<String>
Optional. Name of the rate group. If set has to be unique within shipping service.
Implementations§
Trait Implementations§
source§impl Message for RateGroup
impl Message for RateGroup
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 RateGroup
impl PartialEq for RateGroup
impl StructuralPartialEq for RateGroup
Auto Trait Implementations§
impl Freeze for RateGroup
impl RefUnwindSafe for RateGroup
impl Send for RateGroup
impl Sync for RateGroup
impl Unpin for RateGroup
impl UnwindSafe for RateGroup
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