Skip to content
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

Modify credit api to allow passing more fields #63

Merged
merged 3 commits into from Jun 6, 2019

Conversation

Projects
None yet
2 participants
@sbrossie
Copy link
Member

commented Jun 5, 2019

No description provided.

@pierre
Copy link
Member

left a comment

I'm wondering if we should use a similar format to other APIs instead. That way, it's uniform and we support bulk inserts.

public List<InvoiceItem> insertCredits(UUID accountId, LocalDate effectiveDate, Iterable<InvoiceItem> credits, boolean autoCommit, Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException;
* @param properties the plugin specific properties
* @param context the call context
* @return the credit invoice item
* @throws InvoiceApiException
*/
@RequiresPermissions(INVOICE_CAN_CREDIT)
public InvoiceItem insertCreditForInvoice(UUID accountId, UUID invoiceId, BigDecimal amount, LocalDate effectiveDate,
Currency currency, String description, String itemDetails, Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException;
public InvoiceItem insertCreditForInvoice(UUID accountId, UUID invoiceId, LocalDate effectiveDate, InvoiceItem creditItem, Iterable<PluginProperty> properties, CallContext context) throws InvoiceApiException;

This comment has been minimized.

Copy link
@pierre

pierre Jun 6, 2019

Member

Do we still need both APIs? It looks like we use the invoiceId field instead for other APIs (external charges, taxes).

sbrossie added some commits Jun 6, 2019

@sbrossie sbrossie merged commit b4ed222 into work-for-release-0.21.x Jun 6, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.