Deposits
extends Out
in package
A lightweight, read-only wrapper around a single deposit row returned by `GET /deposits` (the rows inside the `DepositsOut.deposits` array).
DepositsRepository::getDeposits() resolves one of these
per row; the {deposits: [...]} envelope itself is not modelled.
Tags
Table of Contents
Properties
- $amount : int
- $dist : int|float
- $id : int|string
- $resource : string
- $x : int
- $y : int
- $fillable : mixed
Methods
- fill() : void
- Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
- jsonSerialize() : array<string|int, mixed>
- Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.
Properties
$amount
public
int
$amount
Remaining units (always > 0 for returned rows).
$dist
public
int|float
$dist
Distance from the queried reference point.
$id
public
int|string
$id
Deposit id.
$resource
public
string
$resource
Resource type, e.g. aluminum/silicon/titanium.
$x
public
int
$x
Deposit x coordinate.
$y
public
int
$y
Deposit y coordinate.
$fillable
protected
mixed
$fillable
= ['id', 'resource', 'amount', 'x', 'y', 'dist']
Tags
Methods
fill()
Stores the full decoded payload, then applies any declared attribute mutators. Unlike the parent, keys absent from `$fillable` are preserved so the model tolerates the extra keys the NHA API is allowed to add.
public
fill(array<string|int, mixed> $attributes) : void
Parameters
- $attributes : array<string|int, mixed>
-
The decoded response body.
jsonSerialize()
Serialises back to the full raw payload (lossless), not just the declared subset, so round-tripping an NHA response never discards fields.
public
jsonSerialize() : array<string|int, mixed>