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::Delivery, Bill::Discount, Bill::Invoice, Bill::Line, Bill::LineCharge, Bill::LineDiscount, Bill::Ordering, Bill::Outlay, Bill::Payment, Bill::Preceding, Bill::Tax, Bill::Totals, CBC::Note, CBC::Stamp, Cal::Period, Currency::ExchangeRate, DSig::Digest, Envelope, Header, Note::Message, GOBL::Org::Address, GOBL::Org::Coordinates, GOBL::Org::Email, GOBL::Org::Inbox, GOBL::Org::Item, GOBL::Org::ItemCode, GOBL::Org::Name, GOBL::Org::Party, GOBL::Org::Person, GOBL::Org::Registration, GOBL::Org::Telephone, Pay::Advance, Pay::Card, Pay::CreditTransfer, Pay::DirectDebit, Pay::DueDate, Pay::Instructions, Pay::Online, Pay::Terms, Tax::Category, Tax::CategoryTotal, Tax::Combo, Tax::Identity, Tax::Rate, Tax::RateTotal, Tax::RateTotalSurcharge, Tax::RateValue, Tax::Regime, Tax::Scheme, Tax::Total, Tax::Zone
Constant Summary
Constants included from Hashme
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
|