Struct google_api_proto::google::shopping::merchant::accounts::v1beta::CarrierRate
source · pub struct CarrierRate {
pub name: Option<String>,
pub carrier: Option<String>,
pub carrier_service: Option<String>,
pub origin_postal_code: Option<String>,
pub percentage_adjustment: Option<String>,
pub flat_adjustment: Option<Price>,
}
Expand description
A list of carrier rates that can be referred to by
main_table
or single_value
.
Fields§
§name: Option<String>
Required. Name of the carrier rate. Must be unique per rate group.
carrier: Option<String>
Required. Carrier service, such as "UPS"
or "Fedex"
.
carrier_service: Option<String>
Required. Carrier service, such as "ground"
or "2 days"
.
origin_postal_code: Option<String>
Required. Shipping origin for this carrier rate.
percentage_adjustment: Option<String>
Optional. Multiplicative shipping rate modifier as a number in decimal
notation. Can be negative. For example "5.4"
increases the rate by 5.4%,
"-3"
decreases the rate by 3%.
flat_adjustment: Option<Price>
Optional. Additive shipping rate modifier. Can be negative. For example
{ "amount_micros": 1, "currency_code" : "USD" }
adds $1 to the rate,
{ "amount_micros": -3, "currency_code" : "USD" }
removes $3 from the
rate.
Implementations§
source§impl CarrierRate
impl CarrierRate
sourcepub fn carrier(&self) -> &str
pub fn carrier(&self) -> &str
Returns the value of carrier
, or the default value if carrier
is unset.
sourcepub fn carrier_service(&self) -> &str
pub fn carrier_service(&self) -> &str
Returns the value of carrier_service
, or the default value if carrier_service
is unset.
sourcepub fn origin_postal_code(&self) -> &str
pub fn origin_postal_code(&self) -> &str
Returns the value of origin_postal_code
, or the default value if origin_postal_code
is unset.
sourcepub fn percentage_adjustment(&self) -> &str
pub fn percentage_adjustment(&self) -> &str
Returns the value of percentage_adjustment
, or the default value if percentage_adjustment
is unset.
Trait Implementations§
source§impl Clone for CarrierRate
impl Clone for CarrierRate
source§fn clone(&self) -> CarrierRate
fn clone(&self) -> CarrierRate
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CarrierRate
impl Debug for CarrierRate
source§impl Default for CarrierRate
impl Default for CarrierRate
source§impl Message for CarrierRate
impl Message for CarrierRate
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 CarrierRate
impl PartialEq for CarrierRate
source§fn eq(&self, other: &CarrierRate) -> bool
fn eq(&self, other: &CarrierRate) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CarrierRate
Auto Trait Implementations§
impl Freeze for CarrierRate
impl RefUnwindSafe for CarrierRate
impl Send for CarrierRate
impl Sync for CarrierRate
impl Unpin for CarrierRate
impl UnwindSafe for CarrierRate
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