Module: UniOne::Client::Domain
- Included in:
- UniOne::Client
- Defined in:
- lib/unione/client/domain.rb
Instance Method Summary collapse
- #get_dns_records(domain) ⇒ Object
- #list_domains ⇒ Object
- #validate_dkim(domain) ⇒ Object
- #validate_verification_record(domain) ⇒ Object
Instance Method Details
#get_dns_records(domain) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/unione/client/domain.rb', line 4 def get_dns_records(domain) params = { domain: domain } post 'domain/get-dns-records.json', params validate_response({ 'type' => 'object', 'required' => ['status', 'domain', 'verification-record', 'dkim'], 'properties' => { 'status' => {'type' => 'string'}, 'domain' => {'type' => 'string'}, 'verification-record' => {'type' => 'string'}, 'dkim' => {'type' => 'string'}} }) end |
#list_domains ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/unione/client/domain.rb', line 36 def list_domains post 'domain/list.json', {} validate_response({ 'type' => 'object', 'required' => ['status', 'domains'], 'properties' => { 'status' => {'type' => 'string'}, 'domains' => {'items' => {'type' => 'object', 'required' => ['domain', 'verification-record', 'dkim'], 'properties' => [ 'domain' => {'type' => 'string'}, 'verification-record' => {'type' => 'object', 'required' => ['value', 'status'], 'properties' => [ 'value' => {'type' => 'string'}, 'status' => {'type' => 'string'}]}, 'dkim' => {'type' => 'object', 'required' => ['key', 'status'], 'properties' => [ 'key' => {'type' => 'string'}, 'status' => {'type' => 'string'}]} ]}}} }) end |
#validate_dkim(domain) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/unione/client/domain.rb', line 26 def validate_dkim(domain) params = { domain: domain } post 'domain/validate-dkim.json', params validate_response({ 'type' => 'object', 'required' => ['status', 'message'], 'properties' => { 'status' => {'type' => 'string'}, 'message' => {'type' => 'string'}} }) end |
#validate_verification_record(domain) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/unione/client/domain.rb', line 16 def validate_verification_record(domain) params = { domain: domain } post 'domain/validate-verification-record.json', params validate_response({ 'type' => 'object', 'required' => ['status', 'message'], 'properties' => { 'status' => {'type' => 'string'}, 'message' => {'type' => 'string'}} }) end |