Class: LockstepSdk::UriModel
- Inherits:
-
Object
- Object
- LockstepSdk::UriModel
- Defined in:
- lib/lockstep_sdk/models/uri_model.rb
Overview
Represents a Uri for download link
Instance Attribute Summary collapse
-
#download_link ⇒ Uri
Represents the download link.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ UriModel
constructor
Initialize the UriModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ UriModel
Initialize the UriModel using the provided prototype
25 26 27 |
# File 'lib/lockstep_sdk/models/uri_model.rb', line 25 def initialize(params = {}) @download_link = params.dig(:download_link) end |
Instance Attribute Details
#download_link ⇒ Uri
Returns Represents the download link.
31 32 33 |
# File 'lib/lockstep_sdk/models/uri_model.rb', line 31 def download_link @download_link end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
35 36 37 38 39 |
# File 'lib/lockstep_sdk/models/uri_model.rb', line 35 def as_json(={}) { 'downloadLink' => @download_link, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
43 44 45 |
# File 'lib/lockstep_sdk/models/uri_model.rb', line 43 def to_json(*) "[#{as_json(*).to_json(*)}]" end |