AdaptySDK 4.4.0
Loading...
Searching...
No Matches
AdaptySDK.AdaptySubscriptionBillingPlan Class Referencesealed

How a subscription is paid for: all at once, or in installments over a commitment. More...

Inheritance diagram for AdaptySDK.AdaptySubscriptionBillingPlan:

Public Member Functions

 AdaptySubscriptionBillingPlan (string rawValue)
 Creates a plan from its identifier — for a plan added after the shared instances were snapshotted.
bool Equals (AdaptySubscriptionBillingPlan other)
 Whether the other plan carries the same identifier.
override bool Equals (object obj)
 Whether the other object is a plan carrying the same identifier.
override int GetHashCode ()
 The hash code of the identifier.
override string ToString ()
 The identifier itself.

Static Public Member Functions

static bool operator== (AdaptySubscriptionBillingPlan a, AdaptySubscriptionBillingPlan b)
 Whether both plans carry the same identifier, or both are null.
static bool operator!= (AdaptySubscriptionBillingPlan a, AdaptySubscriptionBillingPlan b)
 Whether the plans carry different identifiers, or exactly one is null.

Public Attributes

readonly string RawValue
 The identifier the native SDK reports the plan by.

Static Public Attributes

static readonly AdaptySubscriptionBillingPlan UpFront = new("up_front")
 The whole subscription period is charged at once.
static readonly AdaptySubscriptionBillingPlan Monthly = new("monthly")
 The commitment is charged in monthly installments. iOS 26.4+ only.

Detailed Description

How a subscription is paid for: all at once, or in installments over a commitment.

The shared instances are the plans known when this SDK version was released, not the limit: a plan StoreKit or the native SDK adds later arrives with its own RawValue rather than being mapped to one of them.

Constructor & Destructor Documentation

◆ AdaptySubscriptionBillingPlan()

AdaptySDK.AdaptySubscriptionBillingPlan.AdaptySubscriptionBillingPlan ( string rawValue)

Creates a plan from its identifier — for a plan added after the shared instances were snapshotted.

Parameters
rawValueThe identifier the native SDK reports the plan by.
Exceptions
ArgumentNullExceptionThe identifier is null.

Member Function Documentation

◆ Equals() [1/2]

bool AdaptySDK.AdaptySubscriptionBillingPlan.Equals ( AdaptySubscriptionBillingPlan other)

Whether the other plan carries the same identifier.

Parameters
otherThe plan to compare with.

◆ Equals() [2/2]

override bool AdaptySDK.AdaptySubscriptionBillingPlan.Equals ( object obj)

Whether the other object is a plan carrying the same identifier.

Parameters
objThe object to compare with.

◆ GetHashCode()

override int AdaptySDK.AdaptySubscriptionBillingPlan.GetHashCode ( )

The hash code of the identifier.

◆ operator!=()

bool AdaptySDK.AdaptySubscriptionBillingPlan.operator!= ( AdaptySubscriptionBillingPlan a,
AdaptySubscriptionBillingPlan b )
static

Whether the plans carry different identifiers, or exactly one is null.

Parameters
aThe left plan.
bThe right plan.

◆ operator==()

bool AdaptySDK.AdaptySubscriptionBillingPlan.operator== ( AdaptySubscriptionBillingPlan a,
AdaptySubscriptionBillingPlan b )
static

Whether both plans carry the same identifier, or both are null.

Parameters
aThe left plan.
bThe right plan.

◆ ToString()

override string AdaptySDK.AdaptySubscriptionBillingPlan.ToString ( )

The identifier itself.

Member Data Documentation

◆ Monthly

readonly AdaptySubscriptionBillingPlan AdaptySDK.AdaptySubscriptionBillingPlan.Monthly = new("monthly")
static

The commitment is charged in monthly installments. iOS 26.4+ only.

◆ RawValue

readonly string AdaptySDK.AdaptySubscriptionBillingPlan.RawValue

The identifier the native SDK reports the plan by.

◆ UpFront

readonly AdaptySubscriptionBillingPlan AdaptySDK.AdaptySubscriptionBillingPlan.UpFront = new("up_front")
static

The whole subscription period is charged at once.


The documentation for this class was generated from the following file:
  • Packages/com.adapty.unity-sdk/Runtime/Models/AdaptySubscriptionBillingPlan.cs