Skip to content

Feature - Add put action to client#17

Open
damdl96 wants to merge 8 commits into
developfrom
feature/add-put-action-to-payee
Open

Feature - Add put action to client#17
damdl96 wants to merge 8 commits into
developfrom
feature/add-put-action-to-payee

Conversation

@damdl96
Copy link
Copy Markdown
Contributor

@damdl96 damdl96 commented Oct 10, 2022

We need to extend the client capabilities to support the updating elements. This PR covers:

  • New PUT action on the base client
  • Base client Rubocop cleanup
  • Update action on payee class
  • Add new information in ReadMe
  • Add missing information in ReadMe

@damdl96 damdl96 requested review from JGTR and Sergio-e October 10, 2022 16:37
@damdl96 damdl96 self-assigned this Oct 10, 2022
Comment thread lib/hyperwallet/api/client.rb Outdated

def update(token:, attributes_to_update: )
connector.put(resource: ENDPOINT + "/" + token, payload: JSON.generate(prepare_payload(payload_attributes: attributes_to_update)))
def update(attributes:, token: nil)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Though I like the name change, changing it from attributes_to_update to attributes means that an app using this gem would suddenly break after calling update. If we are sure that this method is not being used then it might be ok.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good point; I don't think the method is being used, though it may cause issues in the future if we need to use it. Possibly the best is to keep it as flexible as possible.

Co-authored-by: Sergio-e <33036058+Sergio-e@users.noreply.github.com>
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.

2 participants