Repository navigation
fix: align the SDK with the current API and docs (v0.1.1) - #1
Merged
Merged
Conversation
- Resources and list items come straight in data (no props wrapper): invoices().create/get no longer return null and the lists no longer return empty items - Types follow the API: optional customer, service code and description, discount, scheduling, sendMunicipalReg, defaultServiceCode, scheduledFor, real credit transaction and plan fields, reason on QuotaStatus - Add invoices().calculate and the public plans() catalog - Webhook events: add fiscal_discrepancy, drop webhook.test from subscribable events - README rewritten (drop internal notes and misleading claims) - Version 0.1.1 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
O SDK foi escrito contra um contrato antigo da API e desembrulhava
data.props, que a API não envia (as entidades são serializadas planas). Contra a API atual,invoices().create/getdevolviamResult.Ok(null)e as listas (invoices,events,plans,history) devolviam itensnull. Os testes antigos validavam o contrato errado (createUnwrapsDataProps...).Outras divergências com a API e a documentação:
customereservice.codetratados como obrigatórios;correlationId(inexistente, a API rejeita campos desconhecidos);emailtipado como string.invoices().calculatee o catálogo públicoplans().Webhook.WEBHOOK_EVENTSincluíawebhook.test(não pode ser inscrito) e não tinhanfse.invoice.fiscal_discrepancy.CompanyCreateParamssemmunicipalityCodeobrigatório,sendMunicipalRegedefaultServiceCode;InvoicesemscheduledFor;CreditPlansemmonthlyCreditAllowance;CreditTransactioncomcreditDelta/balanceAfterinexistentes;QuotaStatussemreason.O que muda
props(UnwrapMode.DATA_PROPSdeixa de existir); tipos alinhados à API e à documentação.invoices().calculateeplans().list/get/quote.CompanyCreateParams.of(...)agora recebemunicipalityCode;Customerpassou a(taxId, name, email, address)(os factoriesCustomer.of(name, taxId)continuam);Optionsganhoutype.Verificado
mvn test(61 testes, 1 skip do contract test), em JDK 27.Não verificado
Nenhuma chamada contra uma API real (o contract test depende de
CORVO_API_KEY/CORVO_BASE_URL). Java 17 não rodado localmente (a CI cobre).Para publicar
Maven Central exige configuração que o
pom.xmlainda não tem (plugins de sources/javadoc, assinatura GPG ecentral-publishing) e um namespace verificado paratechnology.corvo. Isso não está neste PR.🤖 Generated with Claude Code