Skip to content

Introduce Update Order Functionality #21

Open
imRohan wants to merge 3 commits into
mainfrom
rl-patch-order
Open

Introduce Update Order Functionality #21
imRohan wants to merge 3 commits into
mainfrom
rl-patch-order

Conversation

@imRohan

@imRohan imRohan commented Mar 25, 2024

Copy link
Copy Markdown
Collaborator
image

The Partner API v1 has been updated to allow users to update an orders address. Full documentation regarding this new endpoint is available here. We should update this gem to include this new functionality.

This change addresses the need by:

  • Introducing #update in the IntelligentFoods::Order resource
  • Introducing a OrderNotUpdatedError

@imRohan imRohan requested review from chriswoodford and jmazur March 25, 2024 18:50
@imRohan imRohan self-assigned this Mar 25, 2024

@jmazur jmazur left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The PR looks good, just curious about the decision to make a new method for patch.

Comment thread lib/intelligent_foods/api_client.rb Outdated
@imRohan imRohan requested a review from jmazur March 26, 2024 16:45
Comment thread lib/intelligent_foods/api_client.rb Outdated
Comment thread lib/intelligent_foods/resources/order.rb Outdated
Comment thread spec/support/helpers/api_helper.rb Outdated
parse_json_file(ERROR_API_RESPONSE)
end

def build_stubbed_order

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

you're not stubbing anything here. the naming is misleading. you should consider moving this into the factories

@imRohan imRohan requested a review from chriswoodford May 30, 2024 18:17
end
end

def request_body

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what's the difference between request_body and update_request_body now?

@chriswoodford

Copy link
Copy Markdown
Contributor

@imRohan looks like this needs a rebase

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants