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:, executions:, member:, realtime:, realtime_messages:, realtime_bandwidth:, storage:, users:, gb_hours:, image_transformations:, credits:) ⇒ 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:,
    executions:,
    member:,
    realtime:,
    realtime_messages:,
    realtime_bandwidth:,
    storage:,
    users:,
    gb_hours:,
    image_transformations:,
    credits:
)
    @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

#bandwidthObject (readonly)

Returns the value of attribute bandwidth.



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

def bandwidth
  @bandwidth
end

#creditsObject (readonly)

Returns the value of attribute credits.



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

def credits
  @credits
end

#executionsObject (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_hoursObject (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_transformationsObject (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

#memberObject (readonly)

Returns the value of attribute member.



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

def member
  @member
end

#realtimeObject (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_bandwidthObject (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_messagesObject (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

#storageObject (readonly)

Returns the value of attribute storage.



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

def storage
  @storage
end

#usersObject (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: AdditionalResource.from(map: map["bandwidth"]),
        executions: AdditionalResource.from(map: map["executions"]),
        member: AdditionalResource.from(map: map["member"]),
        realtime: AdditionalResource.from(map: map["realtime"]),
        realtime_messages: AdditionalResource.from(map: map["realtimeMessages"]),
        realtime_bandwidth: AdditionalResource.from(map: map["realtimeBandwidth"]),
        storage: AdditionalResource.from(map: map["storage"]),
        users: AdditionalResource.from(map: map["users"]),
        gb_hours: AdditionalResource.from(map: map["GBHours"]),
        image_transformations: AdditionalResource.from(map: map["imageTransformations"]),
        credits: AdditionalResource.from(map: map["credits"])
    )
end

Instance Method Details

#to_mapObject



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