Skip to content

Add 'capture' and 'cancel' to Purchase object#344

Merged
bhelx merged 1 commit into
v2from
dx-60-capture-cancel-purchase
Jan 21, 2020
Merged

Add 'capture' and 'cancel' to Purchase object#344
bhelx merged 1 commit into
v2from
dx-60-capture-cancel-purchase

Conversation

@joannasese

@joannasese joannasese commented Jan 14, 2020

Copy link
Copy Markdown
Contributor
  • Add capture function to Purchase object
  • Add cancel function to Purchase object
  • Amend existing unit tests to include capture and cancel

To capture:

authorized = purchase.authorize()
uuid = authorized.charge_invoice.transactions[0].uuid
captured_collection = purchase.capture(uuid)

To cancel:

authorized = purchase.authorize()
uuid = authorized.charge_invoice.transactions[0].uuid
canceled_collection = purchase.cancel(uuid)

@joannasese joannasese added the V2 V2 Client label Jan 14, 2020
@joannasese joannasese requested a review from bhelx January 14, 2020 00:24
@joannasese joannasese changed the title Add 'capture' and 'cancel' to Purchase endpoint Add 'capture' and 'cancel' to Purchase object Jan 14, 2020
Comment thread recurly/__init__.py Outdated
@joannasese joannasese force-pushed the dx-60-capture-cancel-purchase branch from afd6e6e to 97b83c0 Compare January 16, 2020 04:42
Comment thread recurly/__init__.py Outdated
Add 'capture' functionality to Purchase
Add 'cancel' to Purchase
Amend __invoice() to return __request_invoice(). For __request_invoice(), set default value for body to None to account for capture() and cancel(), which should not take bodies.
@joannasese joannasese force-pushed the dx-60-capture-cancel-purchase branch from 18e5084 to df2df41 Compare January 16, 2020 17:05
Comment thread recurly/__init__.py
@joannasese joannasese requested a review from bhelx January 21, 2020 21:57

@bhelx bhelx left a comment

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.

👍

@bhelx bhelx merged commit 41d398e into v2 Jan 21, 2020
@bhelx bhelx deleted the dx-60-capture-cancel-purchase branch January 21, 2020 22:49
@joannasese joannasese mentioned this pull request Feb 20, 2020
@pierre-wehbe

Copy link
Copy Markdown

Did Auth/Capture get removed in v3?

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

Labels

V2 V2 Client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants