Class: Ey::Core::Client::UntrackedAddress

Inherits:
Model
  • Object
show all
Extended by:
Associations
Defined in:
lib/ey-core/models/untracked_address.rb

Instance Method Summary collapse

Methods included from Associations

assoc_accessor, assoc_coverage, assoc_reader, assoc_writer, associations, collection_reader

Methods inherited from Model

#destroy, range_parser, #save, #to_s, #update!, #url

Instance Method Details

#save!Object



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/ey-core/models/untracked_address.rb', line 11

def save!
  request_attributes = {
    "provider" => self.provider_id,
    "url"      => self.collection.url,
    "untracked_address"  => {
      "location" => self.location,
      "provisioned_id" => self.provisioned_id,
      "provisioner_id" => self.provisioner_id,
    }
  }

  merge_attributes(connection.create_untracked_address(request_attributes).body["untracked_address"])
end