pub struct PromotionalOfferV2SignatureCreator { /* private fields */ }Expand description
Creator for Promotional Offer V2 signatures
Implementations§
Source§impl PromotionalOfferV2SignatureCreator
impl PromotionalOfferV2SignatureCreator
Sourcepub fn new(
signing_key: &str,
key_id: String,
issuer_id: String,
bundle_id: String,
) -> Result<Self, JWSSignatureCreatorError>
pub fn new( signing_key: &str, key_id: String, issuer_id: String, bundle_id: String, ) -> Result<Self, JWSSignatureCreatorError>
Creates a new PromotionalOfferV2SignatureCreator instance.
§Arguments
signing_key- Your private key downloaded from App Store Connect (in PEM format)key_id- Your key ID from the Keys page in App Store Connectissuer_id- Your issuer ID from the Keys page in App Store Connectbundle_id- Your app’s bundle ID
§Returns
A Result containing the PromotionalOfferV2SignatureCreator instance or an error.
Sourcepub fn create_signature(
&self,
product_id: &str,
offer_identifier: &str,
transaction_id: Option<String>,
) -> Result<String, JWSSignatureCreatorError>
pub fn create_signature( &self, product_id: &str, offer_identifier: &str, transaction_id: Option<String>, ) -> Result<String, JWSSignatureCreatorError>
Creates a promotional offer V2 signature.
§Arguments
product_id- The unique identifier of the productoffer_identifier- The promotional offer identifier that you set up in App Store Connecttransaction_id- The unique identifier of any transaction that belongs to the customer. You can use the customer’s appTransactionId, even for customers who haven’t made any In-App Purchases in your app. This field is optional, but recommended.
§Returns
A Result containing the signed JWS string or an error.
§References
Auto Trait Implementations§
impl Freeze for PromotionalOfferV2SignatureCreator
impl RefUnwindSafe for PromotionalOfferV2SignatureCreator
impl Send for PromotionalOfferV2SignatureCreator
impl Sync for PromotionalOfferV2SignatureCreator
impl Unpin for PromotionalOfferV2SignatureCreator
impl UnwindSafe for PromotionalOfferV2SignatureCreator
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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