    # File lib/fog/dynect/models/dns/record.rb, line 23
            def save
              requires :name, :type, :rdata, :zone

              options = {
                :ttl => ttl
              }
              options.delete_if {|key, value| value.nil?}

              data = connection.post_record(type, zone.identity, name, rdata, options).body['data']
              # avoid overwriting zone object with zone string
              data = data.reject {|key, value| key == 'zone'}
              merge_attributes(data)

              zone.publish
              records = connection.get_record(type, zone.identity, name).body['data']
              # data in format ['/REST/xRecord/domain/fqdn/identity]
              records.map! do |record|
                tokens = record.split('/')
                {
                  :identity => tokens.last,
                  :type     => tokens[2][0...-6] # everything before 'Record'
                }
              end
              record = records.detect {|record| record[:type] == type}
              merge_attributes(record)

              true
            end