-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMerchant.php
36 lines (32 loc) · 952 Bytes
/
Merchant.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace Braintree;
class Merchant extends Base
{
protected function _initialize($attribs)
{
$this->_attributes = $attribs;
$merchantAccountArray = [];
if (isset($attribs['merchantAccounts'])) {
foreach ($attribs['merchantAccounts'] AS $merchantAccount) {
$merchantAccountArray[] = MerchantAccount::factory($merchantAccount);
}
}
$this->_set('merchantAccounts', $merchantAccountArray);
}
public static function factory($attributes)
{
$instance = new self();
$instance->_initialize($attributes);
return $instance;
}
/**
* returns a string representation of the merchant
* @return string
*/
public function __toString()
{
return __CLASS__ . '[' .
Util::attributesToString($this->_attributes) .']';
}
}
class_alias('Braintree\Merchant', 'Braintree_Merchant');