MagifyManager․Aghanim

Overview

This part of the MagifyManager provides access to operations with Aghanim.

Properties

VerificationRetryInterval

IReactiveProperty<float> VerificationRetryInterval { get; }

Allows you to set a value for the AghanimOrderStatus check retry interval.

OnOrderStatusChanged

IObservable<(string OrderId, AghanimOrderStatus Status)> OnOrderStatusChanged { get; }

Notifies about change of AghanimOrderStatus.

Methods

IssueOrder

UniTask<AghanimOrder> IssueOrder([NotNull] string productId, bool isSandbox, CancellationToken cancellationToken)

Creates a request to issue a new order to purchase a product of productId.

IterateAllOrders

IEnumerable<AghanimOrderInfo> IterateAllOrders()

Iterates all previously issued orders and information related to them.

LoadPurchasedProductsAsync

UniTask<IReadOnlyList<AghanimProductCounting>> LoadPurchasedProductsAsync(CancellationToken cancellationToken)

Loads information from the backend about which products and how many times have been purchased, and returns a list of AghanimProductCounting.

TryGetProductsOfOrder

bool TryGetProductsOfOrder([NotNull] string orderId, [CanBeNull] out string productId)

Returns the product for which this order was issued, if indeed there was one.

TryGetOrderWithStatus

bool TryGetOrderWithStatus([NotNull] string orderId, out AghanimOrderStatus status)

Returns:

  • true with filled out status parameter if there is a status for provided orderId.
  • false with defatul value for out status parameter if there is no status data for provided orderId.

WaitForFinalOrderStatusAsync

UniTask<AghanimOrderStatus> WaitForFinalOrderStatusAsync([NotNull] string orderId, CancellationToken cancellationToken)

Waits for the order status to change so that AghanimOrderStatus.IsFinal() returns true.

Related articles

Magify Manager

NetworkStatus

ExternalLinkProduct

External validation

Request config by scopes

LimitedTimeOfferProvider