pub struct Discount {
pub shop_url: Arc<String>,
pub version: Arc<String>,
pub access_token: Arc<String>,
pub callbacks: Arc<RequestCallbacks>,
}Fields§
§shop_url: Arc<String>§version: Arc<String>§access_token: Arc<String>§callbacks: Arc<RequestCallbacks>Implementations§
Source§impl Discount
impl Discount
pub fn new( shop_url: Arc<String>, version: Arc<String>, access_token: Arc<String>, callbacks: Arc<RequestCallbacks>, ) -> Self
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 Freeze for Discount
impl !RefUnwindSafe for Discount
impl Send for Discount
impl Sync for Discount
impl Unpin for Discount
impl !UnwindSafe 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