Class: VersSdk::ForkRepositoryResponse

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

Overview

Response body for POST /api/v1/repositories/fork

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



21
22
23
24
# File 'lib/vers_sdk/models.rb', line 21

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



26
27
28
29
30
31
32
33
34
# File 'lib/vers_sdk/models.rb', line 26

def to_h
  {
    "commit_id" => @fork_repository_response,
    "reference" => @fork_repository_response,
    "repo_name" => @fork_repository_response,
    "tag_name" => @fork_repository_response,
    "vm_id" => @fork_repository_response,
  }
end

#to_json(*args) ⇒ Object



36
37
38
# File 'lib/vers_sdk/models.rb', line 36

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