Improving bunq import.

This commit is contained in:
James Cole
2017-08-27 08:54:58 +02:00
parent 1ecf3d04d9
commit 1319cb2e4e
16 changed files with 195 additions and 87 deletions

View File

@@ -65,5 +65,4 @@ class Alias extends BunqObject
}
}

View File

@@ -54,5 +54,4 @@ class Amount extends BunqObject
}
}

View File

@@ -62,56 +62,6 @@ class MonetaryAccountBank extends BunqObject
/** @var int */
private $userId = 0;
/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @return array
*/
public function getAliases(): array
{
return $this->aliases;
}
/**
* @return string
*/
public function getCurrency(): string
{
return $this->currency;
}
/**
* @return Amount
*/
public function getBalance(): Amount
{
return $this->balance;
}
/**
* @return MonetaryAccountSetting
*/
public function getSetting(): MonetaryAccountSetting
{
return $this->setting;
}
/**
* MonetaryAccountBank constructor.
*
@@ -150,4 +100,52 @@ class MonetaryAccountBank extends BunqObject
return;
}
/**
* @return array
*/
public function getAliases(): array
{
return $this->aliases;
}
/**
* @return Amount
*/
public function getBalance(): Amount
{
return $this->balance;
}
/**
* @return string
*/
public function getCurrency(): string
{
return $this->currency;
}
/**
* @return string
*/
public function getDescription(): string
{
return $this->description;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @return MonetaryAccountSetting
*/
public function getSetting(): MonetaryAccountSetting
{
return $this->setting;
}
}

View File

@@ -37,6 +37,7 @@ class MonetaryAccountProfile extends BunqObject
$this->profileFill = null;
$this->profileActionRequired = $data['profile_action_required'];
$this->profileAmountRequired = new Amount($data['profile_amount_required']);
return;
}

View File

@@ -36,6 +36,7 @@ class MonetaryAccountSetting extends BunqObject
$this->color = $data['color'];
$this->defaultAvatarStatus = $data['default_avatar_status'];
$this->restrictionChat = $data['restriction_chat'];
return;
}

View File

@@ -24,7 +24,8 @@ class NotificationFilter extends BunqObject
*
* @param array $data
*/
public function __construct(array $data) {
public function __construct(array $data)
{
var_dump($data);
exit;
}

View File

@@ -27,16 +27,9 @@ class ServerPublicKey extends BunqObject
*
* @param array $response
*/
public function __construct(array $response) {
$this->publicKey = $response['server_public_key'];
}
/**
* @param string $publicKey
*/
public function setPublicKey(string $publicKey)
public function __construct(array $response)
{
$this->publicKey = $publicKey;
$this->publicKey = $response['server_public_key'];
}
/**
@@ -47,5 +40,13 @@ class ServerPublicKey extends BunqObject
return $this->publicKey;
}
/**
* @param string $publicKey
*/
public function setPublicKey(string $publicKey)
{
$this->publicKey = $publicKey;
}
}

View File

@@ -103,5 +103,4 @@ class UserCompany extends BunqObject
}
}

View File

@@ -51,7 +51,7 @@ class UserLight extends BunqObject
*/
public function __construct(array $data)
{
if(count($data) === 0) {
if (count($data) === 0) {
return;
}
$this->id = intval($data['id']);

View File

@@ -45,6 +45,7 @@ abstract class BunqRequest
*/
public function __construct()
{
$this->server = config('firefly.bunq.server');
}
/**
@@ -60,14 +61,6 @@ abstract class BunqRequest
return $this->server;
}
/**
* @param string $server
*/
public function setServer(string $server)
{
$this->server = $server;
}
/**
* @param string $privateKey
*/