Class: Appwrite::Models::UsageBillingPlan

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bandwidth: nil, executions: nil, member: nil, realtime: nil, realtime_messages: nil, realtime_bandwidth: nil, storage: nil, users: nil, gb_hours: nil, image_transformations: nil, credits: nil) ⇒ UsageBillingPlan

Returns a new instance of UsageBillingPlan.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/appwrite/models/usage_billing_plan.rb', line 18

def initialize(
    bandwidth: nil,
    executions: nil,
    member: nil,
    realtime: nil,
    realtime_messages: nil,
    realtime_bandwidth: nil,
    storage: nil,
    users: nil,
    gb_hours: nil,
    image_transformations: nil,
    credits: nil
)
    @bandwidth = bandwidth
    @executions = executions
    @member = member
    @realtime = realtime
    @realtime_messages = realtime_messages
    @realtime_bandwidth = realtime_bandwidth
    @storage = storage
    @users = users
    @gb_hours = gb_hours
    @image_transformations = image_transformations
    @credits = credits
end

Instance Attribute Details

#bandwidth ⇒ Object (readonly)

Returns the value of attribute bandwidth.



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

def bandwidth
  @bandwidth
end

#credits ⇒ Object (readonly)

Returns the value of attribute credits.



16
17
18
# File 'lib/appwrite/models/usage_billing_plan.rb', line 16

def credits
  @credits
end

#executions ⇒ Object (readonly)

Returns the value of attribute executions.



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

def executions
  @executions
end

#gb_hours ⇒ Object (readonly)

Returns the value of attribute gb_hours.



14
15
16
# File 'lib/appwrite/models/usage_billing_plan.rb', line 14

def gb_hours
  @gb_hours
end

#image_transformations ⇒ Object (readonly)

Returns the value of attribute image_transformations.



15
16
17
# File 'lib/appwrite/models/usage_billing_plan.rb', line 15

def image_transformations
  @image_transformations
end

#member ⇒ Object (readonly)

Returns the value of attribute member.



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

def member
  @member
end

#realtime ⇒ Object (readonly)

Returns the value of attribute realtime.



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

def realtime
  @realtime
end

#realtime_bandwidth ⇒ Object (readonly)

Returns the value of attribute realtime_bandwidth.



11
12
13
# File 'lib/appwrite/models/usage_billing_plan.rb', line 11

def realtime_bandwidth
  @realtime_bandwidth
end

#realtime_messages ⇒ Object (readonly)

Returns the value of attribute realtime_messages.



10
11
12
# File 'lib/appwrite/models/usage_billing_plan.rb', line 10

def realtime_messages
  @realtime_messages
end

#storage ⇒ Object (readonly)

Returns the value of attribute storage.



12
13
14
# File 'lib/appwrite/models/usage_billing_plan.rb', line 12

def storage
  @storage
end

#users ⇒ Object (readonly)

Returns the value of attribute users.



13
14
15
# File 'lib/appwrite/models/usage_billing_plan.rb', line 13

def users
  @users
end

Class Method Details

.from(map:) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/appwrite/models/usage_billing_plan.rb', line 44

def self.from(map:)
    UsageBillingPlan.new(
        bandwidth: map["bandwidth"].nil? ? nil : AdditionalResource.from(map: map["bandwidth"]),
        executions: map["executions"].nil? ? nil : AdditionalResource.from(map: map["executions"]),
        member: map["member"].nil? ? nil : AdditionalResource.from(map: map["member"]),
        realtime: map["realtime"].nil? ? nil : AdditionalResource.from(map: map["realtime"]),
        realtime_messages: map["realtimeMessages"].nil? ? nil : AdditionalResource.from(map: map["realtimeMessages"]),
        realtime_bandwidth: map["realtimeBandwidth"].nil? ? nil : AdditionalResource.from(map: map["realtimeBandwidth"]),
        storage: map["storage"].nil? ? nil : AdditionalResource.from(map: map["storage"]),
        users: map["users"].nil? ? nil : AdditionalResource.from(map: map["users"]),
        gb_hours: map["GBHours"].nil? ? nil : AdditionalResource.from(map: map["GBHours"]),
        image_transformations: map["imageTransformations"].nil? ? nil : AdditionalResource.from(map: map["imageTransformations"]),
        credits: map["credits"].nil? ? nil : AdditionalResource.from(map: map["credits"])
    )
end

Instance Method Details

#to_map ⇒ Object



60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/appwrite/models/usage_billing_plan.rb', line 60

def to_map
    {
        "bandwidth": @bandwidth&.to_map,
        "executions": @executions&.to_map,
        "member": @member&.to_map,
        "realtime": @realtime&.to_map,
        "realtimeMessages": @realtime_messages&.to_map,
        "realtimeBandwidth": @realtime_bandwidth&.to_map,
        "storage": @storage&.to_map,
        "users": @users&.to_map,
        "GBHours": @gb_hours&.to_map,
        "imageTransformations": @image_transformations&.to_map,
        "credits": @credits&.to_map
    }
end