Module: ErpIntegration::Resources::Persistence::ClassMethods
- Defined in:
- lib/erp_integration/resources/persistence.rb
Instance Method Summary collapse
-
#create(attributes) ⇒ ErpIntegration::Resource
Creates a new resource in the ERP.
Instance Method Details
#create(attributes) ⇒ ErpIntegration::Resource
Creates a new resource in the ERP.
14 15 16 17 18 19 20 |
# File 'lib/erp_integration/resources/persistence.rb', line 14 def create(attributes) attrs, = adapter.create(**attributes) new_resource = new(attrs) new_resource.validate_with() new_resource end |