Method: ApiResource::Resource#submit!
- Defined in:
- lib/api-resource/resource.rb
#submit!(options = {}) ⇒ Object
111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/api-resource/resource.rb', line 111 def submit!(={}) path = .fetch(:path, resource_path) type = [:type] json = submit_resource(path, false, [:id_attr]) = json && json['meta'] type ||= && ['type'] if type returned_type = self.class.load_class(type) returned_type.new(json['data'] || json, raw_result) else self end end |