// ReSharper disable once UnusedMember.Local private void _getEntitlements(string entitlementsJson) { Debug.Log("_getEntitlements " + entitlementsJson); if (GetEntitlementsCallback == null) { return; } var response = JsonUtility.FromJson <EntitlementsResponse>(entitlementsJson); var error = response.error.message != null ? response.error : null; if (error != null) { GetEntitlementsCallback(null, error); } else { var entitlements = new Dictionary <string, Entitlement>(); foreach (var entitlementResponse in response.entitlements) { Debug.Log(entitlementResponse.entitlementId); entitlements.Add(entitlementResponse.entitlementId, new Entitlement(entitlementResponse)); } GetEntitlementsCallback(entitlements, null); } GetEntitlementsCallback = null; }
public void GetEntitlements(GetEntitlementsFunc callback) { }
public void GetEntitlements(GetEntitlementsFunc callback) { GetEntitlementsCallback = callback; _wrapper.GetEntitlements(); }