pub struct ShippingZoneMethod {
pub id: i64,
pub instance_id: i32,
pub title: String,
pub order: i32,
pub enabled: bool,
pub method_id: String,
pub method_title: String,
pub method_description: String,
pub settings: ShippingSettings,
}Expand description
#[cfg(test)]
mod tests {
use crate::{shipping_zone_methods::ShippingZoneMethod, ApiClient, Entity, SubEntity};
#[tokio::test]
async fn test_list_all_retrieve_shipping_zone_methods() {
let client = ApiClient::from_env().unwrap();
let result = client
.list_all_subentities::<ShippingZoneMethod>(
Entity::ShippingZone,
1,
SubEntity::ShippingZoneMethod,
)
.await
.unwrap();
assert!(!result.is_empty());
let first = result.first().unwrap();
let retrieve_result = client
.retrieve_subentity::<ShippingZoneMethod>(
Entity::ShippingZone,
1,
SubEntity::ShippingZoneMethod,
first.instance_id,
)
.await
.unwrap();
assert_eq!(first.title, retrieve_result.title);
}
}Fields§
§id: i64§instance_id: i32Shipping method instance ID.
title: StringShipping method customer facing title.
order: i32Shipping method sort order.
enabled: boolShipping method enabled status.
method_id: StringShipping method ID.
method_title: StringShipping method title.
method_description: StringShipping method description.
settings: ShippingSettingsShipping method settings.
Trait Implementations§
source§impl Clone for ShippingZoneMethod
impl Clone for ShippingZoneMethod
source§fn clone(&self) -> ShippingZoneMethod
fn clone(&self) -> ShippingZoneMethod
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ShippingZoneMethod
impl Debug for ShippingZoneMethod
source§impl<'de> Deserialize<'de> for ShippingZoneMethod
impl<'de> Deserialize<'de> for ShippingZoneMethod
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 ShippingZoneMethod
impl RefUnwindSafe for ShippingZoneMethod
impl Send for ShippingZoneMethod
impl Sync for ShippingZoneMethod
impl Unpin for ShippingZoneMethod
impl UnwindSafe for ShippingZoneMethod
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