Class: Appwrite::Models::InsightCTA

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, service:, method:, params:) ⇒ InsightCTA

Returns a new instance of InsightCTA.



11
12
13
14
15
16
17
18
19
20
21
# File 'lib/appwrite/models/insight_cta.rb', line 11

def initialize(
    label:,
    service:,
    method:,
    params:
)
    @label = label
    @service = service
    @method = method
    @params = params
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



6
7
8
# File 'lib/appwrite/models/insight_cta.rb', line 6

def label
  @label
end

#methodObject (readonly)

Returns the value of attribute method.



8
9
10
# File 'lib/appwrite/models/insight_cta.rb', line 8

def method
  @method
end

#paramsObject (readonly)

Returns the value of attribute params.



9
10
11
# File 'lib/appwrite/models/insight_cta.rb', line 9

def params
  @params
end

#serviceObject (readonly)

Returns the value of attribute service.



7
8
9
# File 'lib/appwrite/models/insight_cta.rb', line 7

def service
  @service
end

Class Method Details

.from(map:) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/appwrite/models/insight_cta.rb', line 23

def self.from(map:)
    InsightCTA.new(
        label: map["label"],
        service: map["service"],
        method: map["method"],
        params: map["params"]
    )
end

Instance Method Details

#to_mapObject



32
33
34
35
36
37
38
39
# File 'lib/appwrite/models/insight_cta.rb', line 32

def to_map
    {
        "label": @label,
        "service": @service,
        "method": @method,
        "params": @params
    }
end