public interface PayoutRecordManager
Example groovy:
Payment records managed through this API are always associated with the current RebateRecord.def rr = rebateRecords.get("Q1") // api.currentItem() for (def i=0; i < 100000; i++) { payoutRecords.add("Accrual", "Q1-"+i, [attribute1: rr?.attribute1, attribute2: rr?.attribute2, attribute3: rr?.attribute3] ) payoutRecords.add("Summary", "Q1-"+i, [attribute1: rr?.attribute1, attribute2: rr?.attribute2, attribute3: rr?.attribute3] ) }
Modifier and Type | Method and Description |
---|---|
void |
add(String type,
String name,
Map<?,?>... attributeValues)
Add a previously non-existing PayoutRecord, identified by type & name
|
void |
addOrUpdate(String type,
String name,
Map<?,?>... attributeValues)
Convenience method, adding a PayoutRecord if one with the given type & name does not yest exist, and updating it otherwise.
|
int |
delete(Filter... filters)
Delete PayoutRecords linked to the current RebateRecord, adhering to one or more optional Filter criteria
|
Collection<PayoutRecord> |
find(Filter... filters)
Retreive PayoutRecords linked to the current RebateRecord, adhering to one or more optional Filter criteria
|
PayoutRecord |
get(String type,
String name)
Retreives the payout record, if any, with the given type and name, linked to the current RebateRecord.
|
void |
update(String type,
String name,
Map<?,?>... attributeValues)
Updates the existing PayoutRecord, if any, identified by the given type & name
|
PayoutRecord get(String type, String name)
type
- name
- void add(String type, String name, Map<?,?>... attributeValues) throws PersistenceServiceException
type
- A free-text type for the record. While it can be freely set, the usual patterns is that there are few different payment record types.name
- A free-text name for the record, unique withing the (RebateRecord,type) namespace.PersistenceServiceException
void update(String type, String name, Map<?,?>... attributeValues) throws PersistenceServiceException
type
- name
- attributeValues
- Attribute to value map (ex. {attribute1: "ABC", ...}). If an attribute is to be set to null, it needs to be included in the map as such.PersistenceServiceException
- When a PayoutRecord.attribute cannot be set to the given valuevoid addOrUpdate(String type, String name, Map<?,?>... attributeValues) throws PersistenceServiceException
type
- name
- attributeValues
- Attribute to value map (ex. {attribute1: "ABC", ...}). If an attribute is to be set to null, it needs to be included in the map as such.PersistenceServiceException
- When a PayoutRecord.attribute cannot be set to the given valueCollection<PayoutRecord> find(Filter... filters)
filters
- int delete(Filter... filters)
filters
- Copyright © 2019. All rights reserved.