Class: Mavenlink::Workspace

Inherits:
Base
  • Object
show all
Defined in:
lib/mavenlink/client.rb

Instance Attribute Summary

Attributes inherited from Base

#basic_auth, #errors, #json, #path_params

Instance Method Summary collapse

Methods inherited from Base

#as_json, #delete_request, #destroy, #get_request, #id, #initialize, #join_paths, #post_request, #put_request, #reload, #request_path, #update

Constructor Details

This class inherits a constructor from Mavenlink::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mavenlink::Base

Instance Method Details

#create_expense(options) ⇒ Object



127
128
129
# File 'lib/mavenlink/client.rb', line 127

def create_expense(options)
  build("expenses", Expense, options, :workspace_id => id)
end

#create_invitation(options) ⇒ Object



101
102
103
# File 'lib/mavenlink/client.rb', line 101

def create_invitation(options)
  build("invite", WorkspaceInvitation, options, :workspace_id => id)
end

#create_post(options) ⇒ Object



96
97
98
# File 'lib/mavenlink/client.rb', line 96

def create_post(options)
  build("posts", Post, options, :workspace_id => id)
end

#create_story(options) ⇒ Object



149
150
151
# File 'lib/mavenlink/client.rb', line 149

def create_story(options)
  build("stories", Story, options, :workspace_id => id)
end

#create_time_entry(options) ⇒ Object



114
115
116
# File 'lib/mavenlink/client.rb', line 114

def create_time_entry(options)
  build("time_entries", TimeEntry, options, :workspace_id => id)
end

#expense(expense_id, options = {}) ⇒ Object



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

def expense(expense_id, options = {})
  fetch("expenses/#{expense_id}", Expense, options, :workspace_id => id)
end

#expenses(options = {}) ⇒ Object



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

def expenses(options = {})
  fetch("expenses", Expense, options, :workspace_id => id)
end

#invoice(invoice_id, options = {}) ⇒ Object



136
137
138
# File 'lib/mavenlink/client.rb', line 136

def invoice(invoice_id, options = {})
  fetch("invoice/#{invoice_id}", Invoice, options, :workspace_id => id)
end

#invoices(options = {}) ⇒ Object



132
133
134
# File 'lib/mavenlink/client.rb', line 132

def invoices(options = {})
  fetch("invoices", Invoice, options, :workspace_id => id)
end

#participants(options = {}) ⇒ Object



154
155
156
# File 'lib/mavenlink/client.rb', line 154

def participants(options = {})
  fetch("participants", Participant, options, :workspace_id => id)
end

#post(post_id, options = {}) ⇒ Object



92
93
94
# File 'lib/mavenlink/client.rb', line 92

def post(post_id, options = {})
  fetch("posts/#{post_id}", Post, options, :workspace_id => id)
end

#posts(options = {}) ⇒ Object



88
89
90
# File 'lib/mavenlink/client.rb', line 88

def posts(options = {})
  fetch('posts', Post, options, :workspace_id => id)
end

#stories(options = {}) ⇒ Object



141
142
143
# File 'lib/mavenlink/client.rb', line 141

def stories(options = {})
  fetch("stories", Story, options, :workspace_id => id)
end

#story(story_id, options = {}) ⇒ Object



145
146
147
# File 'lib/mavenlink/client.rb', line 145

def story(story_id, options = {})
  fetch("stories/#{story_id}", Story, options, :workspace_id => id)
end

#time_entries(options = {}) ⇒ Object



106
107
108
# File 'lib/mavenlink/client.rb', line 106

def time_entries(options = {})
  fetch("time_entries", TimeEntry, options, :workspace_id => id)
end

#time_entry(time_entry_id, options = {}) ⇒ Object



110
111
112
# File 'lib/mavenlink/client.rb', line 110

def time_entry(time_entry_id, options = {})
  fetch("time_entries/#{time_entry_id}", TimeEntry, options, :workspace_id => id)
end