Static methods
staticlist(filters:Query):Collection<Agreement>
Lists all agreements that match the given filters. Supported filters are:
type
owner__id
Returns:
A Collection of Agreements.
Constructor
Variables
agreements:Collection<Agreement>
Program agreements can have distribution agreements associated with them.
Methods
getVersion(version:Int):Agreement
Returns:
Agreement Returns the specified version for this
Agreement, or null
if it was not found.
listSubAgreements():Collection<Agreement>
Lists all sub agreements linked to this
Agreement.
Returns:
Collection
register():Agreement
Registers a new Agreement on Connect, based on the data of this
Agreement.
Returns:
The new Agreement, or null
if it couldn't be created
registerSubAgreement(agreement:Agreement):Agreement
Registers a new Agreement on Connect and links it to this
Agreement.
Returns:
The new Agreement, or null
if it couldn't be created
registerVersion():Agreement
Registers a new version on Connect, based on the data of this
Agreement.
Returns:
The new version, or null
if it couldn't be registered
remove():Bool
Removes this
Agreement from Connect.
Returns:
Bool If agreement could be removed, returns true
. Otherwise, returns false
.
removeVersion(version:Int):Bool
Removes the specified version from this
agreement on Connect.
Parameters:
version | The version to remove. |
---|
update():Agreement
Updates the agreement in Connect platform with the data changed in this
model.
You should reassign your agreement with the object returned by this method, so the next time
you call update
on the object, the SDK knows the fields that already got updated in a
previous call, like this:
agreement = agreement.update();
Returns:
The Agreement returned from the server, which should contain
the same data as this
Agreement, or null
if the updating fails.