module Model::ClassMethods
Class Methods
Public Instance Methods
create(params)
click to toggle source
# File lib/payu_payments/model.rb, line 84 def create(params) http_call("post", "#{API_PATH}/#{@resource}", base.marshal_dump) end
find(id)
click to toggle source
# File lib/payu_payments/model.rb, line 73 def find(id) resp = self.new json = resp.http_call("get", "#{API_PATH}/#{resp.resource}/#{id}") unless json["type"] == "NOT_FOUND" self.new json else nil end end