tmf-client 0.1.13

A Rust client library for TMF conformant APIs
Documentation
//! Create Shopping Cart Example
//!

use tmf_client::common::tmf_error::TMFError;

fn main() -> Result<(), TMFError> {
    // This example demonstrates how to create a shopping cart using the TMF663 API.
    // Ensure you have the necessary dependencies and the TMFClient set up in your project.

    use tmf_client::{BlockingOperations, TMFClient};
    #[cfg(feature = "tmf663")]
    use tmflib::tmf663::shopping_cart::ShoppingCart;

    // Initialize the TMF client with the base URI of your TMF server
    let mut client = TMFClient::new("https://localhost", None);

    let cart = ShoppingCart::new();

    let out = client.tmf663().shopping_cart().create(cart)?;

    dbg!(out);

    Ok(())
}