Skip to content

Allow line_items update using external_price#445

Merged
acasazza merged 1 commit intomainfrom
fix/line-items-external-price
Nov 6, 2023
Merged

Allow line_items update using external_price#445
acasazza merged 1 commit intomainfrom
fix/line-items-external-price

Conversation

@gciotola
Copy link
Copy Markdown
Contributor

@gciotola gciotola commented Nov 2, 2023

Closes #

What I did

When we have a line_item we don't know if has been created with an external price, since _external_price is a trigger attribute and nothing is saved at the item level.

What happens now is that when we update a quantity with the <LineItemQuantity> component the PATCH request updates the price using the regular price list.

With this PR we are exposing a hasExternalPrice prop to <LineItemQuantity> so that the consumer app can instruct it to patch the line_item using _external_price: true.

How to test

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests).
  • Make sure to add/update documentation regarding your changes.
  • You are NOT deprecating/removing a feature.

@gciotola gciotola changed the title fix: allow line_items update using external_price Allow line_items update using external_price Nov 2, 2023
@gciotola gciotola requested a review from acasazza November 2, 2023 16:16
@gciotola gciotola added the enhancement New feature or request label Nov 2, 2023
@acasazza acasazza self-assigned this Nov 6, 2023
Copy link
Copy Markdown
Member

@acasazza acasazza left a comment

Choose a reason for hiding this comment

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

Well done!

@acasazza acasazza marked this pull request as ready for review November 6, 2023 16:30
@acasazza acasazza merged commit c9ab5f1 into main Nov 6, 2023
@acasazza acasazza deleted the fix/line-items-external-price branch November 6, 2023 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants