Module: HelloSign::Api::Team
- Included in:
- Client
- Defined in:
- lib/hello_sign/api/team.rb
Overview
Contains all the api calls for the Team resource. Take a look at our team api document for more information about this.
Instance Method Summary collapse
-
#add_member_to_team(opts) ⇒ HelloSign::Resource::Team
Adds or invites a user (specified using the email_address parameter) to your Team.
-
#create_team(opts) ⇒ HelloSign::Resource::Team
Creates a new Team and makes you a member.
-
#destroy_team ⇒ Object
Deletes your Team.
-
#get_team ⇒ HelloSign::Resource::Team
Returns information about your Team as well as a list of its members.
-
#remove_member_from_team(opts) ⇒ HelloSign::Resource::Team
Removes a user from your Team.
-
#update_team(opts) ⇒ HelloSign::Resource::Team
Updates the name of your Team.
Instance Method Details
#add_member_to_team(opts) ⇒ HelloSign::Resource::Team
Adds or invites a user (specified using the email_address parameter) to your Team. If the user does not currently have a HelloSign Account, a new one will be created for them. If the user currently has a paid subscription, they will not automatically join the Team but instead will be sent an invitation to join. If a user is already a part of another Team, a “team_invite_failed” error will be returned.
94 95 96 |
# File 'lib/hello_sign/api/team.rb', line 94 def add_member_to_team(opts) HelloSign::Resource::Team.new post('/team/add_member', :body => opts) end |
#create_team(opts) ⇒ HelloSign::Resource::Team
Creates a new Team and makes you a member. You must not currently belong to a Team to invoke.
57 58 59 |
# File 'lib/hello_sign/api/team.rb', line 57 def create_team(opts) HelloSign::Resource::Team.new post('/team/create', :body => opts) end |
#destroy_team ⇒ Object
Deletes your Team. Can only be invoked when you have a Team with only one member (yourself).
78 79 80 |
# File 'lib/hello_sign/api/team.rb', line 78 def destroy_team post('/team/destroy') end |
#get_team ⇒ HelloSign::Resource::Team
Returns information about your Team as well as a list of its members. If you do not belong to a Team, HelloSign::Error::NotFound will be raised
45 46 47 |
# File 'lib/hello_sign/api/team.rb', line 45 def get_team HelloSign::Resource::Team.new get('/team') end |
#remove_member_from_team(opts) ⇒ HelloSign::Resource::Team
Removes a user from your Team. If the user had an outstanding invitation to your Team the invitation will be expired.
107 108 109 |
# File 'lib/hello_sign/api/team.rb', line 107 def remove_member_from_team(opts) HelloSign::Resource::Team.new post('/team/remove_member', :body => opts) end |
#update_team(opts) ⇒ HelloSign::Resource::Team
Updates the name of your Team.
69 70 71 |
# File 'lib/hello_sign/api/team.rb', line 69 def update_team(opts) HelloSign::Resource::Team.new post('/team', :body => opts) end |