pub struct Transaction { /* private fields */ }Expand description
Wraps a live StoreKit.Transaction handle plus decoded payload data.
Implementations§
Source§impl Transaction
impl Transaction
Sourcepub fn current_entitlements() -> Result<TransactionStream, StoreKitError>
pub fn current_entitlements() -> Result<TransactionStream, StoreKitError>
Creates a stream backed by StoreKit.Transaction.currentEntitlements.
Sourcepub fn all() -> Result<TransactionStream, StoreKitError>
pub fn all() -> Result<TransactionStream, StoreKitError>
Creates a stream backed by StoreKit.Transaction.all.
Sourcepub fn updates() -> Result<TransactionStream, StoreKitError>
pub fn updates() -> Result<TransactionStream, StoreKitError>
Creates a stream backed by StoreKit.Transaction.updates.
Sourcepub fn unfinished() -> Result<TransactionStream, StoreKitError>
pub fn unfinished() -> Result<TransactionStream, StoreKitError>
Creates a stream backed by StoreKit.Transaction.unfinished.
Sourcepub fn all_for(product_id: &str) -> Result<TransactionStream, StoreKitError>
pub fn all_for(product_id: &str) -> Result<TransactionStream, StoreKitError>
Creates a stream of all StoreKit transactions for the supplied product identifier.
Sourcepub fn current_entitlements_for(
product_id: &str,
) -> Result<TransactionStream, StoreKitError>
pub fn current_entitlements_for( product_id: &str, ) -> Result<TransactionStream, StoreKitError>
Creates a stream of current StoreKit entitlements for the supplied product identifier.
Sourcepub fn latest_for(
product_id: &str,
) -> Result<Option<VerificationResult<Self>>, StoreKitError>
pub fn latest_for( product_id: &str, ) -> Result<Option<VerificationResult<Self>>, StoreKitError>
Fetches the latest StoreKit transaction for the supplied product identifier.
Sourcepub fn current_entitlement_for(
product_id: &str,
) -> Result<Option<VerificationResult<Self>>, StoreKitError>
pub fn current_entitlement_for( product_id: &str, ) -> Result<Option<VerificationResult<Self>>, StoreKitError>
Fetches the current StoreKit entitlement transaction for the supplied product identifier.
Sourcepub const fn data(&self) -> &TransactionData
pub const fn data(&self) -> &TransactionData
Returns the decoded StoreKit.Transaction payload data.
Sourcepub const fn advanced_commerce_info(
&self,
) -> Option<&TransactionAdvancedCommerceInfo>
pub const fn advanced_commerce_info( &self, ) -> Option<&TransactionAdvancedCommerceInfo>
Returns advanced-commerce metadata attached to this StoreKit transaction.
Sourcepub const fn has_live_handle(&self) -> bool
pub const fn has_live_handle(&self) -> bool
Returns whether this wrapper still owns a live StoreKit handle.
Sourcepub fn verify(&self) -> Result<(), StoreKitError>
pub fn verify(&self) -> Result<(), StoreKitError>
Asks StoreKit to verify this transaction again.
Sourcepub fn finish(&self) -> Result<(), StoreKitError>
pub fn finish(&self) -> Result<(), StoreKitError>
Calls StoreKit.Transaction.finish().
Sourcepub fn begin_refund_request(&self) -> Result<RefundRequestStatus, StoreKitError>
pub fn begin_refund_request(&self) -> Result<RefundRequestStatus, StoreKitError>
Begins a StoreKit refund request for this transaction.