PurchaseClient class Null safety
A class used for creating and controlling in-app purchases. PurchaseClient is the main class of Appmate. Appmate helps developers to manage in-application purchases easily. Thanks to Appmate, it is much easier to create and consume IAP products, manage purchases, user relations and vice versa. For further information you can view the detailed
See also:
- For web documentation appmate
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
consumePurchase(
String purchaseToken) → Future< BaseResponse> - Consume the purchased product specified with purchaseToken.
-
consumePurchases(
List< String> purchaseTokens) → Future<BaseResponse> - Consume a list of purchased product specified with purchaseToken list.
-
createUserIdRelation(
String masterUserId) → Future< CreateUserRelationResponse> - Creates a relation between current user and another user.
-
deleteMasterUserIdRelation(
String masterUserId) → Future< BaseResponse> - Removes all the existing relations of a master.
-
deleteSubUserIdRelation(
String subUserId) → Future< BaseResponse> - Removes the existing relation of a sub-user.
-
enableDebugLogs(
bool enable) → void - Use this method to enable/disable the debug logs of the Appmate framework. The default parameter is false.
-
getAllPurchases(
) → Future< PurchasesResponse> - Fetches all the purchases made so far from appmate server.
-
getCurrentPurchases(
) → Future< PurchasesResponse> - Fetches all the purchases made so far from appmate server.
-
getEntitlements(
) → Future< EntitlementResponse> - getEntitlements method
-
getOfferwall(
String? offeringId) → Future< OfferwallResponse> -
getPlatformType(
) → Future< String> - By default appmate SDK return platform type depending on which environment is supported
-
getProducts(
) → Future< ProductsResponse> - Fetches all the products created on appmate server. If sandbox parameter value is false, non-synched products will not be fetched.
-
getProductsWithIdList(
List< String> ids) → Future<ProductsResponse> - Fetches the filtered products with specified id list from appmate server. If sandbox parameter value is false, non-synched products will not be fetched
-
getProductsWithType(
String type) → Future< ProductsResponse> - Fetches the filtered products with specified type from appmate server. If sandbox parameter value is false, non-synched products will not be fetched
-
getUserId(
) → Future< String> - Returns device user id.
-
isProductPurchased(
String productId) → Future< BaseResponse> - Checks whether a product is actively purchased or not.
-
makePurchase(
Product product) → Future< MakePurchaseResponse> - Launches a new purchase transaction using Apple interface.
-
restorePurchases(
) → Future< PurchasesResponse> - Restores all the previous purchases of current user.
-
setAdvertiseId(
String ADID) → Future< BaseResponse> - set the Identifier for Advertisers assigned by Apple to a user’s device. If users of Appmate has integration of the AppsFlyer, they can set the AppsFlyerId value via this method.
-
setApiKey(
String apiKey) → Future< BaseResponse> - Sets Appmate apiKey
-
setAppmateEvent(
String productId, UserEventType userEventType) → Future< BaseResponse> - setAppmateEvent method
-
setAppsFlyerId(
String appsFlyerId) → Future< BaseResponse> - Modifies AppsFlyer identification. If users of Appmate has integration of the AppsFlyer, they can set the AppsFlyerId value via this method
-
setOneSignalId(
String oneSignalId) → Future< BaseResponse> - If users of Appmate use One Signal services to receive push notifications, they must be able to set their One Signal ids via setOneSignalId. So, they will be able to receive push notifications relating to appmate.
-
setPlatformType(
String platformType) → Future< BaseResponse> - Huawei devices supports Huawei Mobile Services (HMS) and other Android devices supports Google Mobile Services (GMS). Some Huawei devices supports both of HMS and GMS. In this situation appmate SDK works over GMS. But developers can set running platform type by calling setPlatformType method. If the device is not supporting the passed platform type, onError will be triggered.
-
setRuntimeEnvironment(
String environment) → Future< BaseResponse> -
setSandboxActive(
bool isActive) → Future< BaseResponse> - For iOS platform only:
-
setUserAttributes(
Map< String, Object> userAttributes) → Future<BaseResponse> - allows user to add a set of dynamic User Specific Attributes.
-
setUserId(
String userId) → Future< BaseResponse> - Modifies device user id. The default user id is set by device automatically.
-
unsubscribe(
String purchaseToken) → Future< BaseResponse> - For iOS platform: