Esempio n. 1
0
        public async Task AumentEmployeeLicense(Guid LicenseID, Guid LicenseServiceID)
        {
            var licensingClient = new LicensingValidatorClient(ServiceToken,
                                                               LicensingServicesURL, LicensingValidatorURL);

            licensingClient.UpdateFeature(LicenseServiceID, EmployeesFeature, -1);
        }
Esempio n. 2
0
        public async Task ConsumeEmployeeLicense(Guid LicenseID, Guid LicenseServiceID)
        {
            var licensingClient = new LicensingValidatorClient(ServiceToken,
                                                               LicensingServicesURL, LicensingValidatorURL);

            try
            {
                licensingClient.UpdateFeature(LicenseServiceID, EmployeesFeature, 1);
            }
            catch (Exception ex)
            {
                throw new CotorraException(9991, "9991", "Haz llegado al limite máximo de colaboradores en tu licencia, te recomendamos incrementar tu plan con más colaboradores adicionales o depurar tu lista de colaboradores", ex);
            }
        }