Class: Tripletexer

Inherits:
Object
  • Object
show all
Defined in:
lib/tripletexer.rb,
lib/tripletexer/version.rb

Defined Under Namespace

Modules: Endpoints, Errors, FormatHelpers Classes: APIClient

Constant Summary collapse

VERSION =
'0.2.0'
API_VERSION =
'2.1.2'

Instance Method Summary collapse

Constructor Details

#initialize(api_client: Tripletexer::APIClient.new, session_token: nil) ⇒ Tripletexer

Returns a new instance of Tripletexer.



50
51
52
53
# File 'lib/tripletexer.rb', line 50

def initialize(api_client: Tripletexer::APIClient.new, session_token: nil)
  @api_client = api_client
  @api_client.session_token = session_token if session_token
end

Instance Method Details

#activityObject



55
56
57
# File 'lib/tripletexer.rb', line 55

def activity
  Tripletexer::Endpoints::Activity.new(api_client)
end

#addressObject



59
60
61
# File 'lib/tripletexer.rb', line 59

def address
  Tripletexer::Endpoints::Address.new(api_client)
end

#companyObject



63
64
65
# File 'lib/tripletexer.rb', line 63

def company
  Tripletexer::Endpoints::Company.new(api_client)
end

#contactObject



67
68
69
# File 'lib/tripletexer.rb', line 67

def contact
  Tripletexer::Endpoints::Contact.new(api_client)
end

#countryObject



71
72
73
# File 'lib/tripletexer.rb', line 71

def country
  Tripletexer::Endpoints::Country.new(api_client)
end

#currencyObject



75
76
77
# File 'lib/tripletexer.rb', line 75

def currency
  Tripletexer::Endpoints::Currency.new(api_client)
end

#customerObject



79
80
81
# File 'lib/tripletexer.rb', line 79

def customer
  Tripletexer::Endpoints::Customer.new(api_client)
end

#departmentObject



83
84
85
# File 'lib/tripletexer.rb', line 83

def department
  Tripletexer::Endpoints::Department.new(api_client)
end

#employeeObject



87
88
89
# File 'lib/tripletexer.rb', line 87

def employee
  Tripletexer::Endpoints::Employee.new(api_client)
end

#inventoryObject



91
92
93
# File 'lib/tripletexer.rb', line 91

def inventory
  Tripletexer::Endpoints::Inventory.new(api_client)
end

#invoiceObject



95
96
97
# File 'lib/tripletexer.rb', line 95

def invoice
  Tripletexer::Endpoints::Invoice.new(api_client)
end

#ledgerObject



99
100
101
# File 'lib/tripletexer.rb', line 99

def ledger
  Tripletexer::Endpoints::Ledger.new(api_client)
end

#orderObject



103
104
105
# File 'lib/tripletexer.rb', line 103

def order
  Tripletexer::Endpoints::Order.new(api_client)
end

#productObject



107
108
109
# File 'lib/tripletexer.rb', line 107

def product
  Tripletexer::Endpoints::Product.new(api_client)
end

#projectObject



111
112
113
# File 'lib/tripletexer.rb', line 111

def project
  Tripletexer::Endpoints::Project.new(api_client)
end

#supplierObject



115
116
117
# File 'lib/tripletexer.rb', line 115

def supplier
  Tripletexer::Endpoints::Supplier.new(api_client)
end

#timesheetObject



119
120
121
# File 'lib/tripletexer.rb', line 119

def timesheet
  Tripletexer::Endpoints::Timesheet.new(api_client)
end

#tokenObject



123
124
125
# File 'lib/tripletexer.rb', line 123

def token
  Tripletexer::Endpoints::Token.new(api_client)
end