Class: VersSdk::CreateRepositoryResponse

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

Overview

Response body for POST /api/v1/repositories

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



43
44
45
46
# File 'lib/vers_sdk/models.rb', line 43

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



48
49
50
51
52
53
# File 'lib/vers_sdk/models.rb', line 48

def to_h
  {
    "name" => @create_repository_response,
    "repo_id" => @create_repository_response,
  }
end

#to_json(*args) ⇒ Object



55
56
57
# File 'lib/vers_sdk/models.rb', line 55

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