Class: Einvoice::Tradevan::Model::Base
- Inherits:
-
Object
- Object
- Einvoice::Tradevan::Model::Base
show all
- Includes:
- ActiveModel::Model, ActiveModel::Serialization, ActiveModel::Serializers::JSON, ActiveModel::Validations, Validator
- Defined in:
- lib/einvoice/tradevan/model/base.rb
Instance Method Summary
collapse
Instance Method Details
#attributes ⇒ Object
28
29
30
|
# File 'lib/einvoice/tradevan/model/base.rb', line 28
def attributes
instance_values
end
|
#attributes=(hash) ⇒ Object
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/einvoice/tradevan/model/base.rb', line 16
def attributes=(hash)
@itemList ||= []
hash.each do |key, value|
case key.to_sym
when :itemList
value.each { |v| @itemList << IssueItem.new(v) }
else
send("#{key}=", value)
end
end
end
|