pub struct TMF663 { /* private fields */ }Expand description
Operations trait implementation for TMF663ShoppingCart
Implementations§
Source§impl TMF663
impl TMF663
Sourcepub fn shopping_cart(&self) -> TMF663ShoppingCart
pub fn shopping_cart(&self) -> TMF663ShoppingCart
Provide a ShoppingCart API object This method returns an instance of TMF663ShoppingCart, which can be used to perform operations related to shopping carts.
let shopping_cart = TMFClient::new("http://localhost",None)
.tmf663()
.shopping_cart();Examples found in repository?
examples/create_shoppingcart.rs (line 19)
6fn main() -> Result<(), TMFError> {
7 // This example demonstrates how to create a shopping cart using the TMF663 API.
8 // Ensure you have the necessary dependencies and the TMFClient set up in your project.
9
10 use tmf_client::{BlockingOperations, TMFClient};
11 #[cfg(feature = "tmf663")]
12 use tmflib::tmf663::shopping_cart::ShoppingCart;
13
14 // Initialize the TMF client with the base URI of your TMF server
15 let mut client = TMFClient::new("https://localhost", None);
16
17 let cart = ShoppingCart::new();
18
19 let out = client.tmf663().shopping_cart().create(cart)?;
20
21 dbg!(out);
22
23 Ok(())
24}More examples
examples/get_shoppingcart.rs (line 21)
8fn main() -> Result<(), TMFError> {
9 // This example demonstrates how to create a shopping cart using the TMF663 API.
10 // Ensure you have the necessary dependencies and the TMFClient set up in your project.
11
12 #[cfg(feature = "blocking")]
13 {
14 use tmflib::HasId;
15
16 use tmf_client::{BlockingOperations, TMFClient};
17
18 // Initialize the TMF client with the base URI of your TMF server
19 let mut client = TMFClient::new("https://localhost", None);
20
21 let out = client.tmf663().shopping_cart().list(None)?;
22
23 for cart in out {
24 println!("Id: {}", cart.get_id());
25 }
26 }
27 Ok(())
28}Trait Implementations§
Auto Trait Implementations§
impl Freeze for TMF663
impl RefUnwindSafe for TMF663
impl Send for TMF663
impl Sync for TMF663
impl Unpin for TMF663
impl UnsafeUnpin for TMF663
impl UnwindSafe for TMF663
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