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



964
965
966
967
# File 'lib/vers_sdk/models.rb', line 964

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



969
970
971
972
973
974
975
976
977
# File 'lib/vers_sdk/models.rb', line 969

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



979
980
981
# File 'lib/vers_sdk/models.rb', line 979

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