pub struct Discount { /* private fields */ }Implementations§
Source§impl Discount
impl Discount
pub fn new( shop_url: Arc<String>, version: Arc<String>, access_token: Arc<String>, callbacks: Arc<RequestCallbacks>, ) -> Self
Sourcepub fn with_ctx(ctx: ServiceContext) -> Self
pub fn with_ctx(ctx: ServiceContext) -> Self
Build the service from a shared ServiceContext. Cheaper than new at
construction sites that already hold a context (one Arc clone per service).
pub async fn create_automatic_app_discount( &self, input: &DiscountAutomaticAppInput, ) -> Result<DiscountAutomaticAppCreateResp, APIError>
pub async fn update_automatic_app_discount( &self, input: &DiscountAutomaticAppUpdateInput, ) -> Result<DiscountAutomaticAppUpdateResp, APIError>
pub async fn list_discounts( &self, first: Option<i32>, after: Option<String>, query: Option<String>, ) -> Result<DiscountNodesResp, APIError>
pub async fn get_discount_by_id( &self, id: &str, first: Option<i32>, after: Option<String>, ) -> Result<GetDiscountNodeResp, APIError>
pub async fn get_discount_metafield( &self, id: &str, namespace: &str, key: &str, ) -> Result<GetDiscountMetafieldResp, APIError>
Auto Trait Implementations§
impl !RefUnwindSafe for Discount
impl !UnwindSafe for Discount
impl Freeze for Discount
impl Send for Discount
impl Sync for Discount
impl Unpin for Discount
impl UnsafeUnpin for Discount
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