Class: ZeusSdk::V1::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/zeus_sdk/v1/models/assets/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ Image

Returns a new instance of Image.



5
6
7
8
9
10
11
12
13
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 5

def initialize(obj)
    self.raw = obj
    self.id = obj["id"]
    self.urls = obj["urls"]
    self.presigned_url = obj["presigned_url"]
    self.presigned_post = obj["presigned_post"]
    self.created_at = obj["created_at"]
    self.updated_at = obj["updated_at"]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def created_at
  @created_at
end

#image_idObject

Returns the value of attribute image_id.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def image_id
  @image_id
end

#presigned_postObject

Returns the value of attribute presigned_post.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def presigned_post
  @presigned_post
end

#presigned_urlObject

Returns the value of attribute presigned_url.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def presigned_url
  @presigned_url
end

#rawObject

Returns the value of attribute raw.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def raw
  @raw
end

#updated_atObject

Returns the value of attribute updated_at.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def updated_at
  @updated_at
end

#urlsObject

Returns the value of attribute urls.



3
4
5
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 3

def urls
  @urls
end

Instance Method Details

#as_json(options = {}) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 15

def as_json(options={})
    return {
        id: self.id,
        urls: self.urls,
        presigned_url: self.presigned_url,
        presigned_post: self.presigned_post,
        created_at: self.created_at,
        updated_at: self.updated_at
    }
end

#to_sObject



26
27
28
# File 'lib/zeus_sdk/v1/models/assets/image.rb', line 26

def to_s
    "Image(id: #{self.image_id},  urls: #{self.urls})"
end