Method: Dnsimple::Client::TemplatesRecords#create_record
- Defined in:
- lib/dnsimple/client/templates_records.rb
#create_record(account_id, template_id, attributes, options = {}) ⇒ Dnsimple::Response<Dnsimple::Struct::TemplateRecord>
Creates a record in the template.
82 83 84 85 86 87 88 |
# File 'lib/dnsimple/client/templates_records.rb', line 82 def create_record(account_id, template_id, attributes, = {}) Extra.validate_mandatory_attributes(attributes, [:type, :name, :content]) endpoint = Client.versioned("/%s/templates/%s/records" % [account_id, template_id]) response = client.post(endpoint, attributes, ) Dnsimple::Response.new(response, Struct::TemplateRecord.new(response["data"])) end |