Scrip v1.0.0 Scrip.Response View Source
Handles the JSON data returned in the response from the App Store.
Link to this section Summary
Types
The environment for which the receipt was generated.
An array that contains all in-app purchase transactions.
The status of the app receipt.
The JSON data returned in the response from the App Store.
Functions
The Elixir.Scrip.Response struct
Converts response map to Elixir.Scrip.Response orElixir.Scrip.Response.Error struct
Link to this section Types
Specs
environment() :: :sandbox | :production
The environment for which the receipt was generated.
Possible values:
:sandbox:production
Specs
latest_receipt_info() :: [Scrip.IAPReceipt.t()]
An array that contains all in-app purchase transactions.
Only returned for receipts that contain auto-renewable subscriptions.
https://developer.apple.com/documentation/appstorereceipts/responsebody/latest_receipt_info
Specs
status() :: 0 | 21000..21010
The status of the app receipt.
Possible values:
0- The request is valid21000- The request to the App Store was not made using the HTTP POST request method.21001- This status code is no longer sent by the App Store.21002- The data in the receipt-data property was malformed or the service experienced a temporary issue. Try again.21003- The receipt could not be authenticated.21004- The shared secret you provided does not match the shared secret on file for your account.21005- The receipt server was temporarily unable to provide the receipt. Try again.21006- This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response. Only returned for iOS 6-style transaction receipts for auto-renewable subscriptions.21007- This receipt is from the test environment, but it was sent to the production environment for verification.21008- This receipt is from the production environment, but it was sent to the test environment for verification.21009- Internal data access error. Try again later.21010- The user account cannot be found or has been deleted.
See: https://developer.apple.com/documentation/appstorereceipts/status
Specs
t() :: %Scrip.Response{
environment: environment(),
latest_receipt: String.t(),
latest_receipt_info: latest_receipt_info() | nil,
message: String.t(),
pending_renewal_info: [Scrip.PendingRenewalInfo.t()] | nil,
receipt: Scrip.Receipt.t(),
status: status()
}
The JSON data returned in the response from the App Store.
See: https://developer.apple.com/documentation/appstorereceipts/responsebody
Link to this section Functions
The Elixir.Scrip.Response struct
Specs
new(response :: map()) :: t() | Scrip.Response.Error.t()
Converts response map to Elixir.Scrip.Response orElixir.Scrip.Response.Error struct