mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 21:16:47 +00:00
Improving bunq import.
This commit is contained in:
@@ -65,5 +65,4 @@ class Alias extends BunqObject
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -54,5 +54,4 @@ class Amount extends BunqObject
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ class MonetaryAccountSetting extends BunqObject
|
||||
$this->color = $data['color'];
|
||||
$this->defaultAvatarStatus = $data['default_avatar_status'];
|
||||
$this->restrictionChat = $data['restriction_chat'];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -103,5 +103,4 @@ class UserCompany extends BunqObject
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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']);
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user