Class: VersSdk::DomainResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/vers_sdk/models.rb

Overview

Response type for domain operations.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



1138
1139
1140
1141
# File 'lib/vers_sdk/models.rb', line 1138

def self.from_json(json_str)
  obj = json_str.is_a?(String) ? JSON.parse(json_str) : json_str
  new(obj)
end

Instance Method Details

#to_hObject



1143
1144
1145
1146
1147
1148
1149
1150
# File 'lib/vers_sdk/models.rb', line 1143

def to_h
  {
    "created_at" => @domain_response,
    "domain" => @domain_response,
    "domain_id" => @domain_response,
    "vm_id" => @domain_response,
  }
end

#to_json(*args) ⇒ Object



1152
1153
1154
# File 'lib/vers_sdk/models.rb', line 1152

def to_json(*args)
  to_h.to_json(*args)
end