class Easybill::Api::Client

This class represents the client object. Use this class to initialize you api client

Constants

ENTITIES

Public Class Methods

new(api_key) click to toggle source

Create a new client instance with an api_key

Create or use your generated easybill api_key here @api = Easybill::Api::Client.new(“api_key”)

# File lib/easybill/api/client.rb, line 18
def initialize(api_key)
  ENTITIES.each do |entity|
    eval("Easybill::Api::#{entity}").authenticate api_key
  end
  self
end

Public Instance Methods

attachments() click to toggle source

Returns a Easybill::Api::Attachments class

# File lib/easybill/api/client.rb, line 28
def attachments
  Easybill::Api::Attachments
end
contacts() click to toggle source

Returns a Easybill::Api::Contacts class

# File lib/easybill/api/client.rb, line 35
def contacts
  Easybill::Api::Contacts
end
customer_groups() click to toggle source

Returns a Easybill::Api::CustomerGroups class

# File lib/easybill/api/client.rb, line 42
def customer_groups
  Easybill::Api::CustomerGroups
end
customers() click to toggle source

Returns a Easybill::Api::Customers class

# File lib/easybill/api/client.rb, line 49
def customers
  Easybill::Api::Customers
end
document_payments() click to toggle source

Returns a Easybill::Api::DocumentPayments class

# File lib/easybill/api/client.rb, line 56
def document_payments
  Easybill::Api::DocumentPayments
end
documents() click to toggle source

Returns a Easybill::Api::Documents class

# File lib/easybill/api/client.rb, line 63
def documents
  Easybill::Api::Documents
end
position_groups() click to toggle source

Returns a Easybill::Api::PositionGroups class

# File lib/easybill/api/client.rb, line 70
def position_groups
  Easybill::Api::PositionGroups
end
positions() click to toggle source

Returns a Easybill::Api::Positions class

# File lib/easybill/api/client.rb, line 77
def positions
  Easybill::Api::Positions
end
post_boxes() click to toggle source

Returns a Easybill::Api::PostBoxes class

# File lib/easybill/api/client.rb, line 84
def post_boxes
  Easybill::Api::PostBoxes
end
projects() click to toggle source

Returns a Easybill::Api::Projects class

# File lib/easybill/api/client.rb, line 91
def projects
  Easybill::Api::Projects
end
tasks() click to toggle source

Returns a Easybill::Api::Tasks class

# File lib/easybill/api/client.rb, line 98
def tasks
  Easybill::Api::Tasks
end
text_templates() click to toggle source

Returns a Easybill::Api::TextTemplates class

# File lib/easybill/api/client.rb, line 105
def text_templates
  Easybill::Api::TextTemplates
end
time_trackings() click to toggle source

Returns a Easybill::Api::TimeTrackings class

# File lib/easybill/api/client.rb, line 112
def time_trackings
  Easybill::Api::TimeTrackings
end