Sha256: 860cce2ac20fb32e55bed7927dd6e4ba0e1af4dcd20f0758e9d2b6f970c97895
Contents?: true
Size: 1.06 KB
Versions: 14
Compression:
Stored size: 1.06 KB
Contents
class Ey::Core::Client::DatabaseServerSnapshot < Ey::Core::Model extend Ey::Core::Associations identity :id attribute :deleted_at, type: :time attribute :engine attribute :engine_version attribute :location attribute :provisioned_at, type: :time attribute :provisioned_id attribute :storage, type: :integer has_one :provider has_one :database_server has_one :database_service attr_accessor :name def save if new_record? create_params = if collection.url { "url" => collection.url } elsif self.database_service { "database_service" => self.database_service.identity } else requires_one :database_server, :database_service { "database_service" => self.database_server.database_service.identity } end connection.requests.new( connection.create_database_service_snapshot(create_params.merge("name" => self.name)).body["request"] ) end end end
Version data entries
14 entries across 14 versions & 1 rubygems