-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from alexanderjordanbaker/ASSAv1.11
Add support for App Store Server API v1.11 and App Store Server Notif…
- Loading branch information
Showing
9 changed files
with
123 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
Sources/AppStoreServerLibrary/Models/ConsumptionRequestReason.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) 2024 Apple Inc. Licensed under MIT License. | ||
|
||
///The customer-provided reason for a refund request. | ||
/// | ||
///[consumptionRequestReason](https://developer.apple.com/documentation/appstoreservernotifications/consumptionrequestreason) | ||
public enum ConsumptionRequestReason: String, Decodable, Encodable, Hashable { | ||
case unintendedPurchase = "UNINTENDED_PURCHASE" | ||
case fulfillmentIssue = "FULFILLMENT_ISSUE" | ||
case unsatisfiedWithPurchase = "UNSATISFIED_WITH_PURCHASE" | ||
case legal = "LEGAL" | ||
case other = "OTHER" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Sources/AppStoreServerLibrary/Models/RefundPreference.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) 2024 Apple Inc. Licensed under MIT License. | ||
|
||
///A value that indicates your preferred outcome for the refund request. | ||
/// | ||
///[refundPreference](https://developer.apple.com/documentation/appstoreserverapi/refundpreference) | ||
public enum RefundPreference: Int32, Decodable, Encodable, Hashable { | ||
case undeclared = 0 | ||
case preferGrant = 1 | ||
case preferDecline = 2 | ||
case noPreference = 3 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
Tests/AppStoreServerLibraryTests/resources/models/signedConsumptionRequestNotification.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"notificationType": "CONSUMPTION_REQUEST", | ||
"notificationUUID": "002e14d5-51f5-4503-b5a8-c3a1af68eb20", | ||
"data": { | ||
"environment": "LocalTesting", | ||
"appAppleId": 41234, | ||
"bundleId": "com.example", | ||
"bundleVersion": "1.2.3", | ||
"signedTransactionInfo": "signed_transaction_info_value", | ||
"signedRenewalInfo": "signed_renewal_info_value", | ||
"status": 1, | ||
"consumptionRequestReason": "UNINTENDED_PURCHASE" | ||
}, | ||
"version": "2.0", | ||
"signedDate": 1698148900000 | ||
} |