Class: Gandi::Domain::Zone::Record
- Inherits:
-
Object
- Object
- Gandi::Domain::Zone::Record
- Extended by:
- Connector
- Defined in:
- lib/gandi/domain/zone/record.rb
Class Method Summary collapse
-
.add(zone_id, version_id, record) ⇒ Object
Add a new record to zone/version.
-
.count(zone_id, version_id) ⇒ Object
Count number of records for a given zone/version.
-
.delete(zone_id, version_id, filters = {}) ⇒ Object
Remove some records from a zone/version, filters are the same as for list.
-
.list(zone_id, version_id, filters = {}) ⇒ Object
List a zone’s records, with an optional filter.
-
.set(zone_id, version_id, records) ⇒ Object
Sets the records for a zone/version.
Methods included from Connector
Class Method Details
.add(zone_id, version_id, record) ⇒ Object
Add a new record to zone/version. Return a Record hash.
10 11 12 |
# File 'lib/gandi/domain/zone/record.rb', line 10 def add(zone_id, version_id, record) call('domain.zone.record.add', zone_id, version_id, record) end |
.count(zone_id, version_id) ⇒ Object
Count number of records for a given zone/version.
15 16 17 |
# File 'lib/gandi/domain/zone/record.rb', line 15 def count(zone_id, version_id) call('domain.zone.record.count', zone_id, version_id) end |
.delete(zone_id, version_id, filters = {}) ⇒ Object
Remove some records from a zone/version, filters are the same as for list. Return the number of records deleted.
21 22 23 |
# File 'lib/gandi/domain/zone/record.rb', line 21 def delete(zone_id, version_id, filters = {}) call('domain.zone.record.delete', zone_id, version_id, filters) end |
.list(zone_id, version_id, filters = {}) ⇒ Object
List a zone’s records, with an optional filter. Return an array of record hashes.
27 28 29 |
# File 'lib/gandi/domain/zone/record.rb', line 27 def list(zone_id, version_id, filters = {}) call('domain.zone.record.list', zone_id, version_id, filters = {}) end |
.set(zone_id, version_id, records) ⇒ Object
Sets the records for a zone/version. Return an array of record hashes.
33 34 35 |
# File 'lib/gandi/domain/zone/record.rb', line 33 def set(zone_id, version_id, records) call('domain.zone.record.set', zone_id, version_id, records) end |