Class: VersSdk::UpdateTagRequest

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

Overview

Request body for PATCH /api/v1/commit_tags/tag_name For ‘description`: - Field absent from JSON → don’t change the description - Field present as ‘null` → clear the description - Field present as `’text’‘ → set the description to ’text’

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_json(json_str) ⇒ Object



1743
1744
1745
1746
# File 'lib/vers_sdk/models.rb', line 1743

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



1748
1749
1750
1751
1752
1753
# File 'lib/vers_sdk/models.rb', line 1748

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

#to_json(*args) ⇒ Object



1755
1756
1757
# File 'lib/vers_sdk/models.rb', line 1755

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