/// <summary> /// Get the Catalog definitions for any Virtual Purchase items. /// </summary> /// /// <param name="desc">The request description.</param> /// <param name="successCallback">The delegate which is called if the request was successful.</param> /// <param name="errorCallback">The delegate which is called if the request was unsuccessful. Provides /// a container with information on what went wrong.</param> public void GetVirtualPurchaseDefinitions(GetVirtualPurchaseDefinitionsRequestDesc desc, Action <GetVirtualPurchaseDefinitionsRequest, GetVirtualPurchaseDefinitionsResponse> successCallback, Action <GetVirtualPurchaseDefinitionsRequest, GetVirtualPurchaseDefinitionsError> errorCallback) { m_logging.LogVerboseMessage("Sending Get Virtual Purchase Definitions request."); var connectAccessToken = m_dataStore.GetString("UserAccessToken"); var request = new GetVirtualPurchaseDefinitionsRequest(desc, connectAccessToken); m_serverRequestSystem.SendImmediateRequest(request, (IImmediateServerRequest sentRequest, ServerResponse serverResponse) => { ReleaseAssert.IsTrue(request == sentRequest, "Received request is not the same as the one sent!"); if (serverResponse.Result == HttpResult.Success && serverResponse.HttpResponseCode == SuccessHttpResponseCode) { NotifyGetVirtualPurchaseDefinitionsSuccess(serverResponse, request, successCallback); } else { NotifyGetVirtualPurchaseDefinitionsError(serverResponse, request, errorCallback); } }); }