Skip to content

Commit

Permalink
added @throws and description to getPackage (#333)
Browse files Browse the repository at this point in the history
  • Loading branch information
aboedo authored Jun 28, 2021
1 parent f6554bb commit 8e6c6db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/src/main/java/com/revenuecat/purchases/Offering.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ data class Offering constructor(

/**
* Retrieves a specific package by identifier, use this to access custom package types configured
* in the RevenueCat dashboard.
* in the RevenueCat dashboard
* @throws NoSuchElementException if there's no package with the specified identifier in the Offering.
*/
@Throws(NoSuchElementException::class)
@Suppress("MemberVisibilityCanBePrivate")
fun getPackage(identifier: String) =
availablePackages.first { it.identifier == identifier }
Expand Down

0 comments on commit 8e6c6db

Please sign in to comment.