Sha256: 143c67708bfbe5e47c89325ef628482852e9a4e8da20cd62d1db74450bd71058
Contents?: true
Size: 1.08 KB
Versions: 16
Compression:
Stored size: 1.08 KB
Contents
module Paid class Event < APIResource attr_reader :id attr_reader :object attr_reader :created_at attr_reader :type attr_reader :data def self.all(params={}, headers={}) method = APIMethod.new(:get, "/events", params, headers, self) APIList.new(self, method.execute, method) end def self.retrieve(id, params={}, headers={}) params = ParamsBuilder.merge(params, { :id => id }) method = APIMethod.new(:get, "/events/:id", params, headers, self) self.new(method.execute, method) end def refresh(params={}, headers={}) method = APIMethod.new(:get, "/events/:id", params, headers, self) self.refresh_from(method.execute, method) end # Everything below here is used behind the scenes. APIResource.register_api_subclass(self, "event") @api_attributes = { :id => { :readonly => true }, :object => { :readonly => true }, :created_at => { :readonly => true }, :type => { :readonly => true }, :data => { :constructor => :EventData, :readonly => true }, } end end
Version data entries
16 entries across 16 versions & 1 rubygems