Class: GOBL::Object
- Includes:
- Hashme
- Defined in:
- lib/gobl/object.rb
Overview
Base class for object structs with properties in the GOBL Schema
Direct Known Subclasses
Bill::Charge, Bill::CorrectionOptions, Bill::Delivery, Bill::Discount, Bill::Invoice, Bill::Line, Bill::LineCharge, Bill::LineDiscount, Bill::Ordering, Bill::Outlay, Bill::Payment, Bill::Tax, Bill::Totals, CBC::KeyDefinition, CBC::Note, CBC::ValueDefinition, Cal::Period, Currency::Amount, Currency::ExchangeRate, DSig::Digest, Envelope, Head::Header, Head::Link, Head::Stamp, Note::Message, GOBL::Org::Address, GOBL::Org::Coordinates, GOBL::Org::DocumentRef, GOBL::Org::Email, GOBL::Org::Identity, GOBL::Org::Image, GOBL::Org::Inbox, GOBL::Org::Item, GOBL::Org::Name, GOBL::Org::Party, GOBL::Org::Person, GOBL::Org::Registration, GOBL::Org::Telephone, GOBL::Org::Website, Pay::Advance, Pay::Card, Pay::CreditTransfer, Pay::DirectDebit, Pay::DueDate, Pay::Instructions, Pay::Online, Pay::Terms, Regimes::Mx::FoodVouchers, Regimes::Mx::FoodVouchersEmployee, Regimes::Mx::FoodVouchersLine, Regimes::Mx::FuelAccountBalance, Regimes::Mx::FuelAccountItem, Regimes::Mx::FuelAccountLine, Regimes::Mx::FuelAccountTax, Tax::AddonDef, Tax::CategoryDef, Tax::CategoryTotal, Tax::Combo, Tax::CorrectionDefinition, Tax::Identity, Tax::RateDef, Tax::RateTotal, Tax::RateTotalSurcharge, Tax::RateValueDef, Tax::RegimeDef, Tax::Scenario, Tax::ScenarioSet, Tax::Source, Tax::TagSet, Tax::Total
Class Method Summary collapse
-
.new(attrs) ⇒ Object
Returns a GOBL object from a given hash of attributes.
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Class Method Details
.new(attrs) ⇒ Object
Returns a GOBL object from a given hash of attributes. Nested attributes are supported: the constructor will instantiate the proper GOBL objects when nested hashes or arrays are given as part of the ‘attrs` parameter.
The ‘new` method will only allow to create a new object if all attributes marked as mandatory and not calculated in the JSON schema are provided.
|
# File 'lib/gobl/object.rb', line 8
|