Skip to content

Commit

Permalink
fix(tax): Tax rates are exposed as number not as string (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet authored Jul 11, 2023
1 parent c78033c commit 16dd3b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions credit_note.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type CreditNoteAppliedTax struct {
LagoTaxId uuid.UUID `json:"lago_tax_id,omitempty"`
TaxName string `json:"tax_name,omitempty"`
TaxCode string `json:"tax_code,omitempty"`
TaxRate float32 `json:"tax_rate,omitempty,string"`
TaxRate float32 `json:"tax_rate,omitempty"`
TaxDescription string `json:"tax_description,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
Expand All @@ -90,7 +90,7 @@ type CreditNote struct {
BalanceAmountCents int `json:"balance_amount_cents,omitempty"`
RefundAmountCents int `json:"refund_amount_cents,omitempty"`
TaxesAmountCents int `json:"taxes_amount_cents,omitempty"`
TaxesRate float32 `json:"taxes_rate,omitempty,string"`
TaxesRate float32 `json:"taxes_rate,omitempty"`
SubTotalExcludingTaxesAmountCents int `json:"sub_total_excluding_taxes_amount_cents,omitempty"`
CouponsAdjustementAmountCents int `json:"coupons_adjustement_amount_cents,omitempty"`

Expand Down
4 changes: 2 additions & 2 deletions fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ type FeeAppliedTax struct {
LagoTaxId uuid.UUID `json:"lago_tax_id,omitempty"`
TaxName string `json:"tax_name,omitempty"`
TaxCode string `json:"tax_code,omitempty"`
TaxRate float32 `json:"tax_rate,omitempty,string"`
TaxRate float32 `json:"tax_rate,omitempty"`
TaxDescription string `json:"tax_description,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
Expand All @@ -109,7 +109,7 @@ type Fee struct {
UnitAmountCents int `json:"unit_amount_cents,omitempty"`
AmountCurrency string `json:"amount_currency,omitempty"`
TaxesAmountCents int `json:"taxes_amount_cents,omitempty"`
TaxesRate float32 `json:"taxes_rate,omitempty,string"`
TaxesRate float32 `json:"taxes_rate,omitempty"`
TotalAmountCents int `json:"total_amount_cents,omitempty"`
TotalAmountCurrency string `json:"total_amount_currency,omitempty"`
PayInAdvance bool `json:"pay_in_advance,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ type InvoiceAppliedTax struct {
LagoTaxId uuid.UUID `json:"lago_tax_id,omitempty"`
TaxName string `json:"tax_name,omitempty"`
TaxCode string `json:"tax_code,omitempty"`
TaxRate float32 `json:"tax_rate,omitempty,string"`
TaxRate float32 `json:"tax_rate,omitempty"`
TaxDescription string `json:"tax_description,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
Expand Down

0 comments on commit 16dd3b0

Please sign in to comment.