-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
9 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,3 @@ class CustomerCenterConfigAPI { | |
} | ||
|
||
} | ||
|
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 |
---|---|---|
|
@@ -88,96 +88,6 @@ struct CustomerCenterConfigResponse { | |
|
||
} | ||
|
||
enum TestData { | ||
|
||
static let customerCenterConfigResponse: CustomerCenterConfigResponse? = { | ||
let jsonData = | ||
""" | ||
{ | ||
"id": "ccenter_lasdlfalaowpwp", | ||
"locale": "en_US", | ||
"paths": [ | ||
{ | ||
"id": "ownmsldfow", | ||
"title": "Didn't receive purchase", | ||
"type": "MISSING_PURCHASE" | ||
}, | ||
{ | ||
"id": "nwodkdnfaoeb", | ||
"title": "Request a refund", | ||
"type": "REFUND_REQUEST", | ||
"promotionalOffer": { | ||
"iosOfferId": "rc-refund-offer", | ||
"eligibility": { | ||
"first_seen": "> 30" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "nfoaiodifj9", | ||
"title": "Change plans", | ||
"type": "CHANGE_PLANS" | ||
}, | ||
{ | ||
"id": "jnkasldfhas", | ||
"title": "Cancel subscription", | ||
"type": "CANCEL", | ||
"feedbackSurvey": { | ||
"title": "Why are you cancelling?", | ||
"options": [ | ||
{ | ||
"id": "iewrthals", | ||
"title": "Too expensive", | ||
"promotionalOffer": { | ||
"iosOfferId": "rc-cancel-offer", | ||
"eligibility": { | ||
"first_seen": "> 14" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "qklpadsfj", | ||
"title": "Don't use the app", | ||
"promotionalOffer": { | ||
"iosOfferId": "rc-cancel-offer", | ||
"eligibility": { | ||
"first_seen": "> 7" | ||
} | ||
} | ||
}, | ||
{ | ||
"id": "jargnapocps", | ||
"title": "Bought by mistake" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"title": "How can we help?", | ||
"supportEmail": "[email protected]", | ||
"appearance": { | ||
"mode": "SYSTEM", | ||
"light": { | ||
"accentColor": "#000000" | ||
}, | ||
"dark": { | ||
"accentColor": "#ffffff" | ||
} | ||
} | ||
} | ||
""" | ||
|
||
do { | ||
guard let data = jsonData.data(using: .utf8, allowLossyConversion: false) else { return nil } | ||
return try JSONDecoder().decode(CustomerCenterConfigResponse.self, from: data) | ||
} catch { | ||
print(error) | ||
return nil | ||
} | ||
}() | ||
|
||
} | ||
|
||
} | ||
|
||
extension CustomerCenterConfigResponse: Codable, Equatable {} | ||
|