Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Introduction Build Status

The Ticket Evolution gem is a toolkit that provides a seamless and total wrapper around the Ticket Evolution APIs. Ticket Evolution uses the gem in-house to build consumer products.

The gem follows an instance based approach to the Restful API. This way multiple credentials can be used within the same environment, avoiding the static nature of ActiveResource. The classes allow you to access all endpoints of the API with a familiar ActiveRecord style -- convenient attribute methods, finders, etc.

All API documentation can be found at

NOTE: Known issues and missing functionality are documented in the Github Issues.

Rubies supported

  • 2.2.x
  • 1.9.x
  • 1.8.7
  • ree


Rails / Bundler

In your Gemfile, add the following line

gem 'ticketevolution-ruby', :require => 'ticket_evolution'

Ruby / IRB

In bash / terminal

gem install ticketevolution-ruby


require 'rubygems'
require 'ticket_evolution'
@connection ={
  :token => '<YOUR TOKEN>',
  :secret => '<YOUR SECRET>',
  :version => 9
@connection.brokerages.list({:per_page => 1})


There are four main object types:

Connection objects

Each set of API credentials can be combined with a mode and api version to create a unique connection to Ticket Evolution. A connection object is the basis of any call and must be created before anything else can be done. Your API credentials can be found You must have an active brokerage account with Ticket Evolution.

# Example connection configuration (defaults shown)
@connection ={
  :token => '',       # => (required) The API token, used to identify you
  :secret => '',      # => (required) The API secret, used to sign requests
                      #               More info: [](
  :version => 9,      # => (required) API version to use - the correct version
                                      at the time of this writing is 9
  :mode => :sandbox,  # => (optional) Specifies the server environment to use
                                      Valid options: :production or :sandbox
  :logger => nil      # => (optional) Object to use for logging requests and
                      #               responses. Any 'Logger' instance object
                      #               is valid. EX:'log/te_api.log')

Behind the scenes we use Faraday with the :net_http adapter to process connections. You can change this adapter by setting it on the connection class before you instantiate your connection object.

TicketEvolution::Connection.adapter = :typhoeus

Endpoint objects

These are always (except in the case of Search) pluralized class names and match the endpoints listed at To instantiate an endpoint instance, create a connection object and then call the endpoints name, underscored, as a method on the connection object.


Some endpoints are scoped to model objects from other endpoints. One example of this is the Addresses endpoint, which is based off of an instance of TicketEvolution::Client. These endpoints can be called directly off of the model instance.

@client =
@address =

Model objects

Calling a create, show or update method will result in the creation of a model object. The type of model object generated matches the endpoint called.    # => an instance of TicketEvolution::Brokerage with an id of 1

Collection objects

Calls to list and search methods will return TicketEvolution::Collection objects. These are Enumerable objects containing an array of entries. Each object in this array is an type of model object. In addition to the #entries method, #total_entries, #per_page and #current_page can all be called on collections.

Interacting with an endpoint

@connection.brokerages.list           # => builds a TicketEvolution::Collection object containing
                                      #    a collection of TicketEvolution::Brokerage model objects       # => builds a TicketEvolution::Brokerage model object # => returns a TicketEvolution::Collection object containing
                                      #    a collection of TicketEvolution::Brokerage model objects

Alias methods

To more directly match ActiveRecord style, the following aliases exist and can be called on endpoints which include thier equivalent method:

#find aliases #show

# is the same as calling

#update_attributes indirectly aliases #update - A call to #update_attributes will update the attributes on the instance as well as calling #update on the endpoint.

@brokerage = @connection.brokerages.find(1)
# is an easy way to call{:connection => @connection, :id => 1}).update(params)

#save indirectly aliases #update

@brokerage = @connection.brokerages.find(1)
@brokerage.attributes = params
# is an easy way to call{:connection => @connection, :id => 1}).update(params)

#all aliases #list - If you use this, be aware that #list maxes out at 100 results, so #all defaultly has the following defined parameter - :limit => 100

# is the same as calling

Available endpoints

Click on the links next to each endpoint for more detail.

Accounts -

@account = @connection.accounts.list(params)
@account =

Addresses -

@address = @client.addresses.create(params)
@address = @client.addresses.list(params)
@address =
@address = @address.update_attributes(params)

Brokerages -

@brokerage = @connection.brokerages.list(params)
@brokerage =
@brokerage =

Categories -

@category = @connection.categories.deleted(params)
@category = @connection.categories.list(params)
@category =

Clients -

@client = @connection.clients.create(params)
@client = @connection.clients.list(params)
@client =
@client = @client.update_attributes(params)

Companies -

@company = @connection.companies.create(params)
@company = @connection.companies.list(params)
@company =
@company = @company.update_attributes(params)

Configurations -

@configuration = @connection.configurations.list(params)
@configuration =

Credit Cards - http://

@credit_card = @client.credit_cards.create(params)
@credit_card = @client.credit_cards.list(params)

Email Addresses -

@email_address = @client.email_addresses.create(params)
@email_address = @client.email_addresses.list(params)
@email_address =
@email_address = @email_address.update_attributes(params)

Events -

@event =
@event =
@event =

Offices -

@office = @connection.offices.list(params)
@office =
@office =

Orders -

@order = @order.accept(params)
@order = @order.complete
@order = @connection.orders.create_brokerage_order(params)
@order = @connection.orders.create_client_order(params)
@order = @connection.orders.create_fulfillment_order(params)
@order = @connection.orders.list(params)
@order = @order.reject(params)
@order =
@order = @order.update_attributes(params)

Performers -

@performer = @connection.performers.deleted(params)
@performer = @connection.performers.list(params)
@performer =
@performer =

Phone Numbers -

@phone_number = @client.phone_numbers.create(params)
@phone_number = @client.phone_numbers.list(params)
@phone_number =
@phone_number = @phone_number.update_attributes(params)

Quotes -

@quote = @connection.quotes.list(params)
@quote =
@quote =

Search -

@search =
@search = @connection.searches.suggestions(params)

Shipments -

@shipment = @connection.shipments.create(params)
@shipment = @connection.shipments.create_airbill(params)
@shipment = @connection.shipments.list(params)
@shipment =
@shipment = @connection.shipments.suggestion(params)
@shipment = @shipment.update_attributes(params)

Ticket Groups -

@ticket_group = @connection.ticket_groups.list(params)
@ticket_group =

Transactions -

@transaction = @account.transactions.list(params)
@transaction =

Users -

@user = @connection.users.create(params)
@user = @connection.users.list(params)
@user =
@user =

Venues -

@venue = @connection.venues.deleted(params)
@venue = @connection.venues.list(params)
@venue =
@venue =

######ticketevolution-ruby v0.7.11


See LICENSE file for licensing information.