'string', 'currency_id' => 'string', 'task_number_pattern' => 'string', 'task_number_counter' => 'int', 'expense_number_pattern' => 'string', 'expense_number_counter' => 'int', 'vendor_number_pattern' => 'string', 'vendor_number_counter' => 'int', 'ticket_number_pattern' => 'string', 'ticket_number_counter' => 'int', 'payment_number_pattern' => 'string', 'payment_number_counter' => 'int', 'company_gateway_ids' => 'string', 'address1' => 'string', 'address2' => 'string', 'city' => 'string', 'company_logo' => 'string', 'country_id' => 'string', 'currency_id' => 'string', 'custom_value1' => 'string', 'custom_value2' => 'string', 'custom_value3' => 'string', 'custom_value4' => 'string', 'inclusive_taxes' => 'bool', 'name' => 'string', 'payment_terms' => 'string', 'payment_type_id' => 'string', 'phone' => 'string', 'postal_code' => 'string', 'quote_design_id' => 'string', 'credit_design_id' => 'string', 'recurring_number_prefix' => 'string', 'state' => 'string', 'email' => 'string', 'vat_number' => 'string', 'id_number' => 'string', 'tax_name1' => 'string', 'tax_name2' => 'string', 'tax_name3' => 'string', 'tax_rate1' => 'float', 'tax_rate2' => 'float', 'tax_rate3' => 'float', 'timezone_id' => 'string', 'date_format_id' => 'string', 'military_time' => 'bool', 'language_id' => 'string', 'show_currency_code' => 'bool', 'design' => 'string', 'website' => 'string', ]; /** * Cast object values and return entire class * prevents missing properties from not being returned * and always ensure an up to date class is returned. * * @param $obj */ public function __construct($obj) { } /** * Provides class defaults on init. * @return object */ public static function defaults(): stdClass { $config = json_decode(config('ninja.settings')); $data = (object) get_class_vars(CompanySettings::class); unset($data->casts); unset($data->protected_fields); $data->timezone_id = (string) config('ninja.i18n.timezone_id'); $data->currency_id = (string) config('ninja.i18n.currency_id'); $data->language_id = (string) config('ninja.i18n.language_id'); $data->payment_terms = (int) config('ninja.i18n.payment_terms'); $data->military_time = (bool) config('ninja.i18n.military_time'); $data->date_format_id = (string) config('ninja.i18n.date_format_id'); $data->country_id = (string) config('ninja.i18n.country_id'); $data->translations = (object) []; $data->pdf_variables = (object) self::getEntityVariableDefaults(); return self::setCasts($data, self::$casts); } }