Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quote taxes #1635

Merged
merged 14 commits into from
Oct 17, 2023
Merged

Add quote taxes #1635

merged 14 commits into from
Oct 17, 2023

Conversation

lexerom
Copy link
Contributor

@lexerom lexerom commented Oct 11, 2023

Summary

Add taxes to Quote, rearrange tax files. So, invoice and quote will have the same tax object (with some readonly properties), CreditMemo will have tax with all writable properties.
Preview

Checklist

  • Writing style
  • API design standards

@lexerom lexerom self-assigned this Oct 11, 2023
@lexerom lexerom marked this pull request as ready for review October 11, 2023 06:46
@lexerom lexerom requested review from a team as code owners October 11, 2023 06:46
noon-dawg
noon-dawg previously approved these changes Oct 11, 2023
Copy link
Contributor

@noon-dawg noon-dawg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on the docs side

tamasvigh
tamasvigh previously approved these changes Oct 11, 2023
readOnly: true
items:
type: array
description: Taxes that are applied to this invoice and calculated based on the `taxCategoryId` of the related product.
description: Taxes applied and calculated based on the `taxCategoryId` of the related product.
items:
allOf:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why allOf?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@@ -12,11 +12,11 @@ properties:
type: integer
x-type: Money
x-sortable: true
description: Total amount of all invoice taxes.
description: Total amount of all taxes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: Total amount of all taxes.
description: Total amount of taxes.

Comment on lines 73 to 75
description: Invoice taxes.
allOf:
- $ref: ./Taxes/Taxes.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use the description from the Taxes.yaml object everywhere throughout and not try to override the description with allOf.

@lexerom lexerom dismissed stale reviews from tamasvigh and noon-dawg via b2b001b October 14, 2023 07:27
@lexerom lexerom requested a review from adamaltman October 14, 2023 07:34
noon-dawg
noon-dawg previously approved these changes Oct 16, 2023
Copy link
Member

@adamaltman adamaltman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need two schemas.

@@ -1,33 +1,33 @@
allOf:
- properties:
rate:
readOnly: true
readOnly: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allOf does not override. This is not valid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants