AdaptySDK 4.1.1
Loading...
Searching...
No Matches
AdaptySDK.AdaptyProductIdentifier Class Referencesealed

A lightweight identifier used when addressing a specific product across platforms. More...

Public Member Functions

 AdaptyProductIdentifier (string vendorProductId, string adaptyProductId, string basePlanId)
 Builds an identifier for a product you name yourself, rather than one taken from a flow.
override bool Equals (object obj)
 Two identifiers are equal when all three of their values are.
override int GetHashCode ()
 Hashes the three values Equals compares, so an identifier works as a dictionary key.
override string ToString ()
 A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Public Attributes

readonly string VendorProductId
 The product id in App Store Connect or the Google Play Console.
readonly string BasePlanId
 Android only. The Google Play base plan. Null on iOS.

Package Attributes

readonly string _AdaptyProductId
 The product's id in Adapty, which is also the key a request addresses it by.

Private Member Functions

 AdaptyProductIdentifier ()

Detailed Description

A lightweight identifier used when addressing a specific product across platforms.

Constructor & Destructor Documentation

◆ AdaptyProductIdentifier() [1/2]

AdaptySDK.AdaptyProductIdentifier.AdaptyProductIdentifier ( )
private

◆ AdaptyProductIdentifier() [2/2]

AdaptySDK.AdaptyProductIdentifier.AdaptyProductIdentifier ( string vendorProductId,
string adaptyProductId,
string basePlanId )

Builds an identifier for a product you name yourself, rather than one taken from a flow.

Parameters
vendorProductIdThe product id in App Store Connect or the Google Play Console.
adaptyProductIdThe product's id in Adapty, as AdaptyPaywallProduct.AdaptyProductId carries it.
basePlanIdAndroid only. The Google Play base plan, or null for none.

Member Function Documentation

◆ Equals()

override bool AdaptySDK.AdaptyProductIdentifier.Equals ( object obj)

Two identifiers are equal when all three of their values are.

Value equality, so an identifier can be used as a dictionary key — for example in AdaptyUICreateFlowViewParameters.SetProductPurchaseParameters(System.Collections.Generic.IReadOnlyDictionary<AdaptyProductIdentifier, AdaptyPurchaseParameters>), where the caller builds the keys from a flow rather than reusing the SDK's instances.

◆ GetHashCode()

override int AdaptySDK.AdaptyProductIdentifier.GetHashCode ( )

Hashes the three values Equals compares, so an identifier works as a dictionary key.

◆ ToString()

override string AdaptySDK.AdaptyProductIdentifier.ToString ( )

A description for logs and the debugger. The format is not part of the contract — read the members rather than parsing it.

Member Data Documentation

◆ _AdaptyProductId

readonly string AdaptySDK.AdaptyProductIdentifier._AdaptyProductId
package

The product's id in Adapty, which is also the key a request addresses it by.

◆ BasePlanId

readonly string AdaptySDK.AdaptyProductIdentifier.BasePlanId

Android only. The Google Play base plan. Null on iOS.

Empty is the same as none: the contract leaves the key out rather than sending it empty, so the constructor normalizes it and NullValueHandling drops it.

◆ VendorProductId

readonly string AdaptySDK.AdaptyProductIdentifier.VendorProductId

The product id in App Store Connect or the Google Play Console.


The documentation for this class was generated from the following file: