pub struct AcpClient { /* private fields */ }Expand description
ACP Client for browser environments.
Implementations§
Source§impl AcpClient
impl AcpClient
Sourcepub fn create_checkout_session(
&self,
items: JsValue,
) -> Result<JsValue, JsValue>
pub fn create_checkout_session( &self, items: JsValue, ) -> Result<JsValue, JsValue>
Creates a new checkout session.
@param items - Array of items with id and quantity @returns Promise resolving to the created checkout session
Sourcepub fn get_checkout_session(&self, session_id: &str) -> Result<JsValue, JsValue>
pub fn get_checkout_session(&self, session_id: &str) -> Result<JsValue, JsValue>
Gets an existing checkout session.
Sourcepub fn update_checkout_session(
&self,
session_id: &str,
items: Option<JsValue>,
customer: Option<JsValue>,
) -> Result<JsValue, JsValue>
pub fn update_checkout_session( &self, session_id: &str, items: Option<JsValue>, customer: Option<JsValue>, ) -> Result<JsValue, JsValue>
Updates a checkout session.
Trait Implementations§
Source§impl FromWasmAbi for AcpClient
impl FromWasmAbi for AcpClient
Source§impl IntoWasmAbi for AcpClient
impl IntoWasmAbi for AcpClient
Source§impl LongRefFromWasmAbi for AcpClient
impl LongRefFromWasmAbi for AcpClient
Source§impl OptionFromWasmAbi for AcpClient
impl OptionFromWasmAbi for AcpClient
Source§impl OptionIntoWasmAbi for AcpClient
impl OptionIntoWasmAbi for AcpClient
Source§impl RefFromWasmAbi for AcpClient
impl RefFromWasmAbi for AcpClient
Source§impl RefMutFromWasmAbi for AcpClient
impl RefMutFromWasmAbi for AcpClient
Source§impl TryFromJsValue for AcpClient
impl TryFromJsValue for AcpClient
Source§impl VectorFromWasmAbi for AcpClient
impl VectorFromWasmAbi for AcpClient
Source§impl VectorIntoWasmAbi for AcpClient
impl VectorIntoWasmAbi for AcpClient
impl SupportsConstructor for AcpClient
impl SupportsInstanceProperty for AcpClient
impl SupportsStaticProperty for AcpClient
Auto Trait Implementations§
impl Freeze for AcpClient
impl RefUnwindSafe for AcpClient
impl Send for AcpClient
impl Sync for AcpClient
impl Unpin for AcpClient
impl UnwindSafe for AcpClient
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
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.