/** * @param mixed[] $arrayData input data */ public function __construct(array $arrayData) { $this->id = Utils::getValueOrNull($arrayData, 'id'); $this->name = Utils::getValueOrNull($arrayData, 'name'); $this->number = Utils::getValueOrNull($arrayData, 'number'); $this->currency = Utils::getValueOrNull($arrayData, 'currency'); }
/** * @param mixed[] $arrayData input data */ public function __construct(array $arrayData) { $this->id = Utils::getValueOrNull($arrayData, 'id'); $this->code = Utils::getValueOrNull($arrayData, 'code'); $this->name = Utils::getValueOrNull($arrayData, 'name'); $this->description = Utils::getValueOrNull($arrayData, 'description'); }
/** * @param mixed[] $arrayData input data */ public function __construct(array $arrayData) { $this->id = Utils::getValueOrNull($arrayData, 'id'); $this->name = Utils::getValueOrNull($arrayData, 'name'); $this->number = Utils::getValueOrNull($arrayData, 'number'); $this->currency = Utils::getValueOrNull($arrayData, 'currency'); $this->isdefault = Utils::getValueOrNull($arrayData, 'isdefault'); $this->initialState = Utils::getValueOrNull($arrayData, 'initial_state'); $this->visible = Utils::getValueOrNull($arrayData, 'visible'); }
public function __construct(array $dataArray = array()) { $this->variableSymbol = Utils::getValueOrNull($dataArray, 'variable_symbol'); $this->date = Utils::getValueOrNull($dataArray, 'date'); $this->dateVat = Utils::getValueOrNull($dataArray, 'date_vat'); $this->maturityDate = Utils::getValueOrNull($dataArray, 'maturity_date'); $this->currency = Utils::getValueOrNull($dataArray, 'currency'); $this->customerId = Utils::getValueOrNull($dataArray, 'customer_id'); $this->customerBankAccount = Utils::getValueOrNull($dataArray, 'customer_bank_account'); $this->paymentType = Utils::getValueOrNull($dataArray, 'payment_type'); $this->bankAccount = Utils::getValueOrNull($dataArray, 'bank_account'); $this->dateVatPrev = Utils::getValueOrNull($dataArray, 'date_vat_prev'); $this->description = Utils::getValueOrNull($dataArray, 'description'); $this->roundingType = Utils::getValueOrNull($dataArray, 'rounding_type'); if (array_key_exists('items', $dataArray)) { foreach ($dataArray['items'] as $itemData) { $this->items[] = new DocumentItem($itemData); } } }
/** * @param mixed[] $arrayData input data */ public function __construct(array $arrayData) { $this->id = Utils::getValueOrNull($arrayData, 'id'); $this->sequenceCode = Utils::getValueOrNull($arrayData, 'sequence_code'); $this->variableSymbol = Utils::getValueOrNull($arrayData, 'variable_symbol'); $this->date = Utils::getValueOrNull($arrayData, 'date'); $this->dateVat = Utils::getValueOrNull($arrayData, 'date_vat'); $this->maturityDate = Utils::getValueOrNull($arrayData, 'maturity_date'); $this->currency = Utils::getValueOrNull($arrayData, 'currency'); $this->priceIncVat = Utils::getValueOrNull($arrayData, 'price_inc_vat'); $this->toBePaid = Utils::getValueOrNull($arrayData, 'to_be_paid'); $this->customer = new CustomerOverview($arrayData['customer']); $this->accounted = Utils::getValueOrNull($arrayData, 'accounted'); $this->deleted = Utils::getValueOrNull($arrayData, 'deleted'); }
/** * @param mixed[] $arrayData input data */ public function __construct(array $arrayData) { $this->id = Utils::getValueOrNull($arrayData, 'id'); $this->sequenceCode = Utils::getValueOrNull($arrayData, 'sequence_code'); $this->variableSymbol = Utils::getValueOrNull($arrayData, 'variable_symbol'); $this->date = Utils::getDateTimeFrom($arrayData['date']); $this->dateVat = Utils::getDateTimeFrom($arrayData['date_vat']); $this->maturityDate = Utils::getDateTimeFrom($arrayData['maturity_date']); $this->currency = Utils::getValueOrNull($arrayData, 'currency'); $this->price = Utils::getValueOrNull($arrayData, 'price'); $this->priceCzk = Utils::getValueOrNull($arrayData, 'price_czk'); $this->priceIncVat = Utils::getValueOrNull($arrayData, 'price_inc_vat'); $this->priceIncVatCzk = Utils::getValueOrNull($arrayData, 'price_inc_vat_czk'); $this->toBePaid = Utils::getValueOrNull($arrayData, 'to_be_paid'); if (array_key_exists('customer', $arrayData)) { $this->customer = new Customer($arrayData['customer']); } $this->customerBankAccount = Utils::getValueOrNull($arrayData, 'customer_bank_account'); $this->paymentType = Utils::getValueOrNull($arrayData, 'payment_type'); if (array_key_exists('bank_account', $arrayData)) { $this->bankAccount = new BankAccount($arrayData['bank_account']); } $this->dateVatPrev = Utils::getDateTimeFrom($arrayData['date_vat_prev']); $this->description = Utils::getValueOrNull($arrayData, 'description'); $this->roundingType = Utils::getValueOrNull($arrayData, 'rounding_type'); if (array_key_exists('items', $arrayData)) { foreach ($arrayData['items'] as $itemData) { $this->items[] = new DocumentItem($itemData); } } $this->accounted = Utils::getValueOrNull($arrayData, 'accounted'); $this->deleted = Utils::getValueOrNull($arrayData, 'deleted'); }
/** * @param mixed[] $arrayData input data */ public function __construct(array $arrayData) { $this->id = Utils::getValueOrNull($arrayData, 'id'); $this->amount = Utils::getValueOrNull($arrayData, 'amount'); $this->unit = Utils::getValueOrNull($arrayData, 'unit'); $this->price = Utils::getValueOrNull($arrayData, 'price'); $this->text = Utils::getValueOrNull($arrayData, 'text'); $this->vat = Utils::getValueOrNull($arrayData, 'vat'); $this->accountentrytypeId = Utils::getValueOrNull($arrayData, 'accountentrytype_id'); $this->vattypeId = Utils::getValueOrNull($arrayData, 'vattype_id'); $this->chartAccountId = Utils::getValueOrNull($arrayData, 'chart_account_id'); $this->vatChartId = Utils::getValueOrNull($arrayData, 'vat_chart_id'); $this->departmentId = Utils::getValueOrNull($arrayData, 'department_id'); $this->contractId = Utils::getValueOrNull($arrayData, 'contract_id'); }