-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Wallet credit WS ops: reportInfo support
- Loading branch information
Showing
4 changed files
with
127 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
/** | ||
* Created by PhpStorm. | ||
* User: wvdhaute | ||
* Date: 05/01/16 | ||
* Time: 16:34 | ||
*/ | ||
class LinkIDWalletReportInfo | ||
{ | ||
|
||
public $reference; | ||
public $description; | ||
|
||
/** | ||
* LinkIDWalletReportInfo constructor. | ||
* @param $reference | ||
* @param $description | ||
*/ | ||
public function __construct($reference, $description) | ||
{ | ||
$this->reference = $reference; | ||
$this->description = $description; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
abstract class LinkIDWalletReportType | ||
{ | ||
|
||
const USER_TRANSACTION = 1; | ||
const WALLET_ADD = 2; | ||
const WALLET_REMOVE = 2; | ||
const WALLET_UNREMOVE = 2; | ||
const APPLICATION_ADD_CREDIT_INITIAL = 2; | ||
const APPLICATION_ADD_CREDIT = 2; | ||
const APPLICATION_REMOVE_CREDIT = 2; | ||
const APPLICATION_REFUND = 2; | ||
|
||
} | ||
|
||
function parseLinkIDWalletReportType($type) | ||
{ | ||
|
||
if (null == $type) return null; | ||
|
||
if ($type == "USER_TRANSACTION") { | ||
return LinkIDWalletReportType::USER_TRANSACTION; | ||
} else if ($type == "WALLET_ADD") { | ||
return LinkIDWalletReportType::WALLET_ADD; | ||
} else if ($type == "WALLET_REMOVE") { | ||
return LinkIDWalletReportType::WALLET_REMOVE; | ||
} else if ($type == "WALLET_UNREMOVE") { | ||
return LinkIDWalletReportType::WALLET_UNREMOVE; | ||
} else if ($type == "APPLICATION_ADD_CREDIT_INITIAL") { | ||
return LinkIDWalletReportType::APPLICATION_ADD_CREDIT_INITIAL; | ||
} else if ($type == "APPLICATION_ADD_CREDIT") { | ||
return LinkIDWalletReportType::APPLICATION_ADD_CREDIT; | ||
} else if ($type == "APPLICATION_REMOVE_CREDIT") { | ||
return LinkIDWalletReportType::APPLICATION_REMOVE_CREDIT; | ||
} else if ($type == "APPLICATION_REFUND") { | ||
return LinkIDWalletReportType::APPLICATION_REFUND; | ||
} | ||
|
||
throw new Exception("Unexpected wallet report type: " . $type); | ||
|
||
} |