module Quickbooks::Service::ServiceCrudJSON
def create(entity, options = {})
def create(entity, options = {}) raise Quickbooks::InvalidModelException.new(entity.errors.full_messages.join(',')) unless entity.valid? response = do_http_post(url_for_resource(model.resource_for_singular), entity.to_json, options) if response.code.to_i == 200 JSON.parse(response.plain_body) else nil end end