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
19 20 21 22 23 24 25 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 19 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.
62 63 64 65 66 67 68 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 62 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.
100 101 102 103 104 105 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 100 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.
40 41 42 43 44 45 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 40 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.
81 82 83 84 85 86 |
# File 'lib/dnsimple/client/registrar_registrant_changes.rb', line 81 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 |