Sha256: bee7012c7620f3bbb0a676c3c912804e368cd7d5fc29331e3c3fa8695db50ba7

Contents?: true

Size: 446 Bytes

Versions: 5

Compression:

Stored size: 446 Bytes

Contents

# encoding: utf-8

module BitBucket
  class Client::Invitations < API
    @version = '1.0'

    def invite(user_name, repo_name, emailaddress, perm)
      _update_user_repo_params(user_name, repo_name)
      _validate_user_repo_params(user, repo) unless user? && repo?
      _validate_presence_of emailaddress
      perm ||= "write"

      post_request("/invitations/#{user}/#{repo.downcase}/#{emailaddress}", permission: perm)
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
codenamev_bitbucket_api-0.4.1 lib/bitbucket_rest_api/client/invitations.rb
codenamev_bitbucket_api-0.4.0 lib/bitbucket_rest_api/client/invitations.rb
reenhanced_bitbucket_api-0.3.2 lib/bitbucket_rest_api/client/invitations.rb
reenhanced_bitbucket_api-0.3.1 lib/bitbucket_rest_api/client/invitations.rb
reenhanced_bitbucket_api-0.3.0 lib/bitbucket_rest_api/client/invitations.rb