public async Task <TaxCertificate> CreateCertificateAsync(TaxCertificate cert, Address buyerLocation) { var companyID = _settings.CompanyID; var certificates = await _avaTax.CreateCertificatesAsync(companyID, false, new List <CertificateModel> { TaxCertificateMapper.Map(cert, buyerLocation, companyID) }); var pdf = await GetCertificateBase64String(companyID, certificates[0].id ?? 0); var mappedCertificate = TaxCertificateMapper.Map(certificates[0], pdf); return(mappedCertificate); }