Module: Dnsimple::Client::RegistrarRegistrantChanges
- Included in:
- RegistrarService
- Defined in:
- lib/dnsimple/client/registrar_registrant_changes.rb
Instance Method Summary collapse
-
#check_registrant_change(account_id, attributes, options = {}) ⇒ Struct::RegistrantChangeCheck
Retrieves the requirements of a registrant change.
-
#create_registrant_change(account_id, attributes, options = {}) ⇒ Struct::RegistrantChange
Start registrant change.
-
#delete_registrant_change(account_id, registrant_change_id, options = {}) ⇒ Dnsimple::Response<nil>
Cancel an ongoing registrant change from the account.
-
#get_registrant_change(account_id, registrant_change_id, options = {}) ⇒ Struct::RegistrantChange
Retrieves the details of an existing registrant change.
-
#list_registrant_changes(account_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Struct::DomainRegistration>
List registrant changes in the account.
Instance Method Details
#check_registrant_change(account_id, attributes, options = {}) ⇒ Struct::RegistrantChangeCheck
Retrieves the requirements of a registrant change
20 21 22 23 24 25 26 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 20 def check_registrant_change(account_id, attributes, = {}) Extra.validate_mandatory_attributes(attributes, [:domain_id, :contact_id]) endpoint = Client.versioned("/%s/registrar/registrant_changes/check" % [account_id]) response = client.post(endpoint, attributes, ) Dnsimple::Response.new(response, Struct::RegistrantChangeCheck.new(response["data"])) end |
#create_registrant_change(account_id, attributes, options = {}) ⇒ Struct::RegistrantChange
Start registrant change.
63 64 65 66 67 68 69 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 63 def create_registrant_change(account_id, attributes, = {}) Extra.validate_mandatory_attributes(attributes, [:domain_id, :contact_id]) endpoint = Client.versioned("/%s/registrar/registrant_changes" % [account_id]) response = client.post(endpoint, attributes, ) Dnsimple::Response.new(response, Struct::RegistrantChange.new(response["data"])) end |
#delete_registrant_change(account_id, registrant_change_id, options = {}) ⇒ Dnsimple::Response<nil>
Cancel an ongoing registrant change from the account.
101 102 103 104 105 106 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 101 def delete_registrant_change(account_id, registrant_change_id, = {}) endpoint = Client.versioned("/%s/registrar/registrant_changes/%s" % [account_id, registrant_change_id]) response = client.delete(endpoint, nil, ) Dnsimple::Response.new(response, nil) end |
#get_registrant_change(account_id, registrant_change_id, options = {}) ⇒ Struct::RegistrantChange
Retrieves the details of an existing registrant change.
41 42 43 44 45 46 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 41 def get_registrant_change(account_id, registrant_change_id, = {}) endpoint = Client.versioned("/%s/registrar/registrant_changes/%s" % [account_id, registrant_change_id]) response = client.get(endpoint, ) Dnsimple::Response.new(response, Struct::RegistrantChange.new(response["data"])) end |
#list_registrant_changes(account_id, options = {}) ⇒ Dnsimple::PaginatedResponse<Struct::DomainRegistration>
List registrant changes in the account.
82 83 84 85 86 87 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 82 def list_registrant_changes(account_id, = {}) endpoint = Client.versioned("/%s/registrar/registrant_changes" % [account_id]) response = client.get(endpoint, ) Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::RegistrantChange.new(r) }) end |