Module: Loopiator::Dns
- Included in:
- Client
- Defined in:
- lib/loopiator/dns.rb
Instance Method Summary collapse
- #add_zone_record(domain, subdomain, record_obj, customer_number: "") ⇒ Object
- #get_zone_records(domain, subdomain, customer_number: "") ⇒ Object
- #remove_zone_record(domain, subdomain, record_id, customer_number: "") ⇒ Object
Instance Method Details
#add_zone_record(domain, subdomain, record_obj, customer_number: "") ⇒ Object
15 16 17 18 |
# File 'lib/loopiator/dns.rb', line 15 def add_zone_record(domain, subdomain, record_obj, customer_number: "") response = parse_status_response(call("addZoneRecord", customer_number, encode_domain(domain), subdomain, record_obj)) return response.eql?(:ok) end |
#get_zone_records(domain, subdomain, customer_number: "") ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/loopiator/dns.rb', line 4 def get_zone_records(domain, subdomain, customer_number: "") records = [] response = call("getZoneRecords", customer_number, encode_domain(domain), subdomain) response.each do |item| records << Loopiator::Models::DnsRecord.new(item) end if response && response.is_a?(Array) return records end |
#remove_zone_record(domain, subdomain, record_id, customer_number: "") ⇒ Object
20 21 22 23 |
# File 'lib/loopiator/dns.rb', line 20 def remove_zone_record(domain, subdomain, record_id, customer_number: "") response = parse_status_response(call("removeZoneRecord", customer_number, encode_domain(domain), subdomain, record_id)) return response.eql?(:ok) end |