-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add subs info in settings screen (#3962)
Task/Issue URL: https://app.asana.com/0/0/1206024785662125/f ### Description See task ### Steps to test this PR See task
- Loading branch information
1 parent
6b6dbcd
commit ac941b1
Showing
10 changed files
with
323 additions
and
24 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
36 changes: 36 additions & 0 deletions
36
...ons-impl/src/main/java/com/duckduckgo/subscriptions/impl/services/SubscriptionsService.kt
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,36 @@ | ||
/* | ||
* Copyright (c) 2023 DuckDuckGo | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package com.duckduckgo.subscriptions.impl.services | ||
|
||
import com.duckduckgo.anvil.annotations.ContributesNonCachingServiceApi | ||
import com.duckduckgo.di.scopes.AppScope | ||
import retrofit2.http.GET | ||
import retrofit2.http.Header | ||
|
||
@ContributesNonCachingServiceApi(AppScope::class) | ||
interface SubscriptionsService { | ||
@GET("https://subscriptions-dev.duckduckgo.com/api/subscription") | ||
suspend fun subscription(@Header("Authorization") authorization: String?): SubscriptionResponse | ||
} | ||
|
||
data class SubscriptionResponse( | ||
val productId: String, | ||
val startedAt: Long, | ||
val expiresOrRenewsAt: Long, | ||
val platform: String, | ||
val status: String, | ||
) |
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
Oops, something went wrong.