-
Notifications
You must be signed in to change notification settings - Fork 64
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
Bulk credit endpoint spec #703
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,3 +124,28 @@ Feature: Credits | |
"category_code": "no-funding-destination" | ||
} | ||
""" | ||
|
||
Scenario: Bulk credit a bank account | ||
Given I have more than two orders with debits | ||
When I have tokenized a bank account and associated with the merchant | ||
When I POST to /bank_accounts/:bank_account_id/bulk_credits with the body: | ||
""" | ||
{ | ||
"credits": [ | ||
{ | ||
"amount": 1234, | ||
"order": ":order_id_1" | ||
}, | ||
{ | ||
"amount": 1234, | ||
"order": ":order_id_2" | ||
}, | ||
{ | ||
"amount": 1234, | ||
"order": ":order_id_3" | ||
} | ||
] | ||
} | ||
""" | ||
Then I should get a 201 Created status code | ||
And there should be no response body | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there should be a response body There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What would the response body consist of? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a collection of credits! ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then we're expecting the client to wait around while the credits are created, right? Or should this be a fire-and-forget endpoint and API consumers are responsible for watching for these credits via events? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in that case it should give a 202 HTTP status code http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 202 Accepted
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should create with two different sets of descriptors so two different bulk credits are created