Message-ID: <756320914.15825.1614958325687.JavaMail.confluence@wiki> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_15824_563084287.1614958325687" ------=_Part_15824_563084287.1614958325687 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html transferCreditsToUser

transferCreditsToUser

=20
=20
=20
=20

 

=20
=20
=20
=20
=20
=20

Transfer credits from one account to another account, using the username= to specify the target account.

=20
=20
=20
=20
=20
=20
Example
=20
$result =3D $tmClient->transferCreditsToUser(3, 'targetusername', '=
targetpassword');
echo "Transfered 3 credits (leaving {$result['source_credits_after']})=
, to=20
targetusername, which now has {$result['target_credits_after']} credits&quo=
t;;
=20
=20
=20
=20
=20
=20
=20

Arguments:

=20
=20
=20
=20

 

=20
=20
=20
=20
=20
=20

integer $quantity: 

=20
=20
=20
=20

The number of credits to transfer from the source account to the target = account.

=20
=20
=20
=20
=20
=20

string $target_username:

=20
=20
=20
=20

The username of the account to transfer the credits to.

=20
=20
=20
=20
=20
=20

string $target_password:

=20
=20
=20
=20

The password of the account to transfer the credits to.

=20
=20
=20
=20
=20
=20

Returns:

an array with four keys: 'source_credits_before', 'source_credits_after'= ,
'target_credits_before' and 'target_credits_after' e.g. $result['so= urce_credits_after']

=20
=20
=20
=20
Array Key Value
source_credits_before  The number of credits on the source account befo= re the transfer.
source_credits_after

The number of credits on the source account a= fter the transfer.

target_credits_before The number of credits on the target account befo= re the transfer.
target_credits_after

The number of credits on the target account a= fter the transfer.

=20
=20
=20
=20
=20
=20

Specific error codes:

=20
=20
=20
=20
Code Meaning
0

There are insufficient credits available to t= ransfer the specified quantity, or the specified quantity is not a positive= number

1

The target account number specified is not a = valid number or username/password combination does not refer to any known a= ccount

=20
=20
=20
=20
=20
=20

 

=20
=20
=20
=20
=20
=20
=20
=20
=20
=20

 

=20
=20
=20
=20

 

=20
=20
=20
=20
=20
=20
=20

You must know!

=20 =20

Our example code is an illustra= tion of how you might integrate with our systems and is not certified for p= roduction environments. You are responsible for testing and QA.

=20
=20
=20
=20
=20
------=_Part_15824_563084287.1614958325687--