/** * Creates a new Receipt from an array * * @param array $array * * @return self */ public static function create(array $array) { Assertion::choicesIsset($array, ['price', 'charset', 'split', 'length']); return new self($array['price'], $array['charset'], $array['split'], $array['length']); }
/** * Creates a new Balance from an array * * @param array $array * * @return self */ public static function create(array $array) { Assertion::choicesIsset($array, ['balance', 'currency', 'balance-currency', 'custom-services', 'monthlySpentBalance']); return new self($array['balance'], $array['currency'], $array['balance-currency'], $array['custom-services'], $array['monthlySpentBalance']); }