7 Group.sendCredits Method
asdia edited this page 2021-01-06 23:02:45 +08:00
Class: Group

Sends credits to an entity.

Parameters

Name Type Default Value Comment
Amount CreditAmount In credits
To PaymentEntity
Reason string
Auth EntityUser

Errors

Error Message Thrown when
The 'to' parameter must be a string or an object! The 'to' parameter is neither a string nor an object

Returns

Object
It returns a ReturnedTransaction.

Example

const group = new Group('g-afe31e8b-c53a-41c8-94db-69fb9c15118a')
group.sendCredits(69, 'u-02c977bb-0a6c-4eb2-bfca-5e9101025aaf', 'nice number', 'exampleEntity')