Class: VersSdk::CreateRepoTagRequest

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

Overview

Request body for creating a tag within a repository: POST /api/v1/repositories/repo_name/tags

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



158
159
160
161
# File 'lib/vers_sdk/models.rb', line 158

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



163
164
165
166
167
168
169
# File 'lib/vers_sdk/models.rb', line 163

def to_h
  {
    "commit_id" => @create_repo_tag_request,
    "description" => @create_repo_tag_request,
    "tag_name" => @create_repo_tag_request,
  }
end

#to_json(*args) ⇒ Object



171
172
173
# File 'lib/vers_sdk/models.rb', line 171

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