-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b0477e
commit d18848e
Showing
5 changed files
with
92 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
namespace GoAPI\IO\Resources; | ||
|
||
class Broker { | ||
public $code; | ||
public $name; | ||
|
||
public function __construct($code, $name) | ||
{ | ||
$this->code = $code; | ||
$this->name = $name; | ||
} | ||
} |
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,46 @@ | ||
<?php | ||
namespace GOAPI\IO\Resources; | ||
|
||
class BrokerSummary | ||
{ | ||
public Broker $broker; | ||
public $code; | ||
public $date; | ||
public $side; | ||
public $lot; | ||
public $value; | ||
public $transaction_type; | ||
public $investor; | ||
public $avg; | ||
public $symbol; | ||
|
||
public function __construct($code, $broker, $date, $side, $lot, $value, $transaction_type, $investor, $avg, $symbol) | ||
{ | ||
$this->broker = new Broker($broker['code'], $broker['name']); | ||
$this->code = $code; | ||
$this->date = $date; | ||
$this->side = $side; | ||
$this->lot = $lot; | ||
$this->value = $value; | ||
$this->transaction_type = $transaction_type; | ||
$this->investor = $investor; | ||
$this->avg = $avg; | ||
$this->symbol = $symbol; | ||
} | ||
|
||
static function fromArray($array) { | ||
|
||
return new BrokerSummary( | ||
$array['code'], | ||
$array['broker'], | ||
$array['date'], | ||
$array['side'], | ||
$array['lot'], | ||
$array['value'], | ||
$array['transaction_type'], | ||
$array['investor'], | ||
$array['avg'], | ||
$array['symbol'] | ||
); | ||
} | ||
} |
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
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