Sha256: 170f57d701982066e1e6be75a92aaaf48fcc916f39f1ecd5f536ff64727297f5

Contents?: true

Size: 827 Bytes

Versions: 5

Compression:

Stored size: 827 Bytes

Contents

module EventbriteSDK
  class User < Resource
    # Defines user#verify and user#unverify
    #
    # An user logged using Eventbrite we should generate a verification action
    # NOTE: only selected users can verify/unverify other users.
    # POSTS to users/:id/(verify|unverify)
    define_api_actions :verify, :unverify

    resource_path 'users/:id'

    has_many :organizers, object_class: 'Organizer', key: :organizers
    has_many :owned_event_orders, object_class: 'Order', key: :orders
    has_many :owned_events, object_class: 'Event', key: :events
    has_many :ticket_groups, object_class: 'TicketGroup'

    schema_definition do
      string 'name'
      string 'first_name'
      string 'last_name'
      string 'emails'
      string 'image_id'
    end

    def self.me
      new('id' => 'me')
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
eventbrite_sdk-3.4.0 lib/eventbrite_sdk/user.rb
eventbrite_sdk-3.3.1 lib/eventbrite_sdk/user.rb
eventbrite_sdk-3.3.0 lib/eventbrite_sdk/user.rb
eventbrite_sdk-3.2.0 lib/eventbrite_sdk/user.rb
eventbrite_sdk-3.1.6 lib/eventbrite_sdk/user.rb