-
Notifications
You must be signed in to change notification settings - Fork 26
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 #132 from alexanderjordanbaker/ASSAv1.11
Add support for App Store Server API v1.11 and App Store Server Notif…
- Loading branch information
Showing
8 changed files
with
104 additions
and
1 deletion.
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
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,18 @@ | ||
// Copyright (c) 2024 Apple Inc. Licensed under MIT License. | ||
|
||
import { StringValidator } from "./Validator"; | ||
|
||
/** | ||
* The customer-provided reason for a refund request. | ||
* | ||
* {@link https://developer.apple.com/documentation/appstoreservernotifications/consumptionrequestreason consumptionRequestReason} | ||
*/ | ||
export enum ConsumptionRequestReason { | ||
UNINTENDED_PURCHASE = "UNINTENDED_PURCHASE", | ||
FULFILLMENT_ISSUE = "FULFILLMENT_ISSUE", | ||
UNSATISFIED_WITH_PURCHASE = "UNSATISFIED_WITH_PURCHASE", | ||
LEGAL = "LEGAL", | ||
OTHER = "OTHER", | ||
} | ||
|
||
export class ConsumptionRequestReasonValidator extends StringValidator {} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2024 Apple Inc. Licensed under MIT License. | ||
|
||
/** | ||
* A value that indicates your preferred outcome for the refund request. | ||
* | ||
* {@link https://developer.apple.com/documentation/appstoreserverapi/refundpreference refundPreference} | ||
*/ | ||
export enum RefundPreference { | ||
UNDECLARED = 0, | ||
PREFER_GRANT = 1, | ||
PREFER_DECLINE = 2, | ||
NO_PREFERENCE = 3, | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/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 | ||
} |
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