Module: PrintfulAPI::APIOperations::Save
- Included in:
- Order
- Defined in:
- lib/printful_api/api_operations/save.rb
Instance Method Summary collapse
Instance Method Details
#save(opts = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/printful_api/api_operations/save.rb', line 7 def save( opts = {} ) if self.id.present? self.class.update( self.to_h, opts ) else self.class.create( self.to_h, opts ) end end |