quickbooks-ruby
quickbooks-ruby copied to clipboard
Is there a way to assign multiple attributes after object been initialized?
Hi, is there a way to assign multiple attributes into model after initialized? For example:
incoive = Quickbooks::Model::Invoice.new
invoice.assign_attributes(attributes)
In this way, we don't need to manually assign attribute by using setter respectively.
I think it's useful and nice to have, in ActiveModel
there is a module called AttributeAssignment, maybe we can consider adding it into BaseModel
since we already have ActiveModel
dependency?
I can see how this could be useful. Want to create a PR?
My pleasure, PR: https://github.com/ruckus/quickbooks-ruby/pull/453