class SimpleEventickApi::Attendee
Attributes
checked_at[RW]
code[RW]
email[RW]
event_id[RW]
id[RW]
name[RW]
ticket_type[RW]
Public Class Methods
all(token, event_id, checked_at = nil)
click to toggle source
class methods
# File lib/simple_eventick_api/attendee.rb, line 17 def self.all(token, event_id, checked_at = nil) resource "events/#{event_id}/attendees" response = get(token, {checked_at: checked_at}) attendees = response['attendees'].map { |json| self.new json } attendees.each { |a| a.event_id = event_id } end
check_in(token, event_id, code, checked_at )
click to toggle source
# File lib/simple_eventick_api/attendee.rb, line 35 def self.check_in(token, event_id, code, checked_at ) resource "events/#{event_id}/attendees/#{code}" response = get(token, {checked_at: checked_at}) attendees = response['attendees'].map { |json| self.new json } attendees.each { |a| a.event_id = event_id }.first end
find(token, event_id, id )
click to toggle source
# File lib/simple_eventick_api/attendee.rb, line 26 def self.find(token, event_id, id ) resource "events/#{event_id}/attendees/#{id}" response = get(token) attendees = response['attendees'].map { |json| self.new json } attendees.each { |a| a.event_id = event_id }.first end
new(args={})
click to toggle source
# File lib/simple_eventick_api/attendee.rb, line 10 def initialize(args={}) args.each do |key, value| self.public_send("#{key}=", value) end end