pub struct AppleResponse {
    pub status: i32,
    pub is_retryable: Option<bool>,
    pub environment: Option<String>,
    pub latest_receipt: Option<String>,
    pub latest_receipt_info: Option<Vec<AppleLatestReceipt>>,
    pub receipt: Option<AppleReceipt>,
}
Expand description

Fields

status: i32

Either 0 if the receipt is valid, or a status code if there is an error. The status code reflects the status of the app receipt as a whole.

is_retryable: Option<bool>

An indicator that an error occurred during the request. A value of 1 indicates a temporary issue; retry validation for this receipt at a later time. A value of 0 indicates an unresolvable issue; do not retry validation for this receipt. Only applicable to status codes 21100-21199.

environment: Option<String>

The environment for which the receipt was generated. Possible values: Sandbox, Production

latest_receipt: Option<String>

The latest Base64 encoded app receipt. Only returned for receipts that contain auto-renewable subscriptions.

latest_receipt_info: Option<Vec<AppleLatestReceipt>>

An array that contains all in-app purchase transactions. This excludes transactions for consumable products that have been marked as finished by your app. Only returned for receipts that contain auto-renewable subscriptions.

receipt: Option<AppleReceipt>

A JSON representation of the receipt that was sent for verification

Implementations

Returns true if the receipt we are validating is from a subscription purchase

Get the unique identifier of the product set in App Store Connect, ie: productIdentifier property of the SKPayment object

Get the receipt from receipt.in_app by the transaction_id

Get the receipt with the latest expiration date from receipt.in_app

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more