pub struct AdvancedCommerceProduct {
pub id: String,
pub product_type: ProductType,
}Expand description
Wraps a StoreKit advanced-commerce product.
Fields§
§id: StringStoreKit identifier for this value.
product_type: ProductTypeProduct type reported by StoreKit.
Implementations§
Source§impl AdvancedCommerceProduct
impl AdvancedCommerceProduct
Sourcepub fn new(id: &str) -> Result<Self, StoreKitError>
pub fn new(id: &str) -> Result<Self, StoreKitError>
Fetches the StoreKit advanced-commerce product for the supplied identifier.
Sourcepub fn purchase_in_window(
&self,
compact_jws: &str,
window: &NSWindowHandle,
options: &[AdvancedCommercePurchaseOption],
) -> Result<PurchaseResult, StoreKitError>
pub fn purchase_in_window( &self, compact_jws: &str, window: &NSWindowHandle, options: &[AdvancedCommercePurchaseOption], ) -> Result<PurchaseResult, StoreKitError>
Calls the StoreKit advanced-commerce purchase API while presenting UI in the supplied NSWindow.
Sourcepub fn latest_transaction(
&self,
) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
pub fn latest_transaction( &self, ) -> Result<Option<VerificationResult<Transaction>>, StoreKitError>
Fetches the latest StoreKit transaction for this advanced-commerce product.
Sourcepub fn all_transactions(&self) -> Result<TransactionStream, StoreKitError>
pub fn all_transactions(&self) -> Result<TransactionStream, StoreKitError>
Creates a stream of all StoreKit transactions for this advanced-commerce product.
Sourcepub fn current_entitlements(&self) -> Result<TransactionStream, StoreKitError>
pub fn current_entitlements(&self) -> Result<TransactionStream, StoreKitError>
Creates a stream of current StoreKit entitlements for this advanced-commerce product.
Trait Implementations§
Source§impl Clone for AdvancedCommerceProduct
impl Clone for AdvancedCommerceProduct
Source§impl Debug for AdvancedCommerceProduct
impl Debug for AdvancedCommerceProduct
impl Eq for AdvancedCommerceProduct
Source§impl PartialEq for AdvancedCommerceProduct
impl PartialEq for AdvancedCommerceProduct
impl StructuralPartialEq for AdvancedCommerceProduct
Auto Trait Implementations§
impl Forget for AdvancedCommerceProduct
impl Freeze for AdvancedCommerceProduct
impl Move for AdvancedCommerceProduct
impl RefUnwindSafe for AdvancedCommerceProduct
impl Send for AdvancedCommerceProductwhere
RawVecInner: Send,
impl Sync for AdvancedCommerceProductwhere
RawVecInner: Sync,
impl Unpin for AdvancedCommerceProduct
impl UnsafeUnpin for AdvancedCommerceProduct
impl UnwindSafe for AdvancedCommerceProductwhere
RawVecInner: UnwindSafe,
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