Module: Dnsimple::Client::DomainsCollaborators
- Included in:
- DomainsService
- Defined in:
- lib/dnsimple/client/domains_collaborators.rb
Instance Method Summary collapse
-
#add_collaborator(account_id, domain_id, attributes, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>
deprecated
Deprecated.
‘DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
-
#collaborators(account_id, domain_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>
deprecated
Deprecated.
‘DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
-
#remove_collaborator(account_id, domain_id, contact_id, options = {}) ⇒ Dnsimple::Response<nil>
deprecated
Deprecated.
‘DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
Instance Method Details
#add_collaborator(account_id, domain_id, attributes, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>
‘DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
Add a collaborator to the domain.
50 51 52 53 54 55 56 57 |
# File 'lib/dnsimple/client/domains_collaborators.rb', line 50 def add_collaborator(account_id, domain_id, attributes, = {}) Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.') Extra.validate_mandatory_attributes(attributes, [:email]) response = client.post(Client.versioned("/%s/domains/%s/collaborators" % [account_id, domain_id]), attributes, ) Dnsimple::Response.new(response, Struct::Collaborator.new(response["data"])) end |
#collaborators(account_id, domain_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Dnsimple::Struct::Collaborator>
‘DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
Lists the collaborators for a domain.
26 27 28 29 30 31 32 |
# File 'lib/dnsimple/client/domains_collaborators.rb', line 26 def collaborators(account_id, domain_id, = {}) Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.') response = client.get(Client.versioned("/%s/domains/%s/collaborators" % [account_id, domain_id]), Options::ListOptions.new()) Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Collaborator.new(r) }) end |
#remove_collaborator(account_id, domain_id, contact_id, options = {}) ⇒ Dnsimple::Response<nil>
‘DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.
Removes a collaborator from the domain.
WARNING: this cannot be undone.
77 78 79 80 81 82 83 |
# File 'lib/dnsimple/client/domains_collaborators.rb', line 77 def remove_collaborator(account_id, domain_id, contact_id, = {}) Dnsimple.deprecate('`DomainCollaborators` have been deprecated and will be removed in the next major version. Please use our Domain Access Control feature.') response = client.delete(Client.versioned("/%s/domains/%s/collaborators/%s" % [account_id, domain_id, contact_id]), ) Dnsimple::Response.new(response, nil) end |