Class: Appwrite::Models::Program
- Inherits:
-
Object
- Object
- Appwrite::Models::Program
- Defined in:
- lib/appwrite/models/program.rb
Instance Attribute Summary collapse
-
#active ⇒ Object
readonly
Returns the value of attribute active.
-
#billing_plan_id ⇒ Object
readonly
Returns the value of attribute billing_plan_id.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#external ⇒ Object
readonly
Returns the value of attribute external.
-
#icon ⇒ Object
readonly
Returns the value of attribute icon.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, title:, description:, tag:, icon:, url:, active:, external:, billing_plan_id:) ⇒ Program
constructor
A new instance of Program.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, title:, description:, tag:, icon:, url:, active:, external:, billing_plan_id:) ⇒ Program
Returns a new instance of Program.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/appwrite/models/program.rb', line 16 def initialize( id:, title:, description:, tag:, icon:, url:, active:, external:, billing_plan_id: ) @id = id @title = title @description = description @tag = tag @icon = icon @url = url @active = active @external = external @billing_plan_id = billing_plan_id end |
Instance Attribute Details
#active ⇒ Object (readonly)
Returns the value of attribute active.
12 13 14 |
# File 'lib/appwrite/models/program.rb', line 12 def active @active end |
#billing_plan_id ⇒ Object (readonly)
Returns the value of attribute billing_plan_id.
14 15 16 |
# File 'lib/appwrite/models/program.rb', line 14 def billing_plan_id @billing_plan_id end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
8 9 10 |
# File 'lib/appwrite/models/program.rb', line 8 def description @description end |
#external ⇒ Object (readonly)
Returns the value of attribute external.
13 14 15 |
# File 'lib/appwrite/models/program.rb', line 13 def external @external end |
#icon ⇒ Object (readonly)
Returns the value of attribute icon.
10 11 12 |
# File 'lib/appwrite/models/program.rb', line 10 def icon @icon end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/program.rb', line 6 def id @id end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
9 10 11 |
# File 'lib/appwrite/models/program.rb', line 9 def tag @tag end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
7 8 9 |
# File 'lib/appwrite/models/program.rb', line 7 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
11 12 13 |
# File 'lib/appwrite/models/program.rb', line 11 def url @url end |
Class Method Details
.from(map:) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/appwrite/models/program.rb', line 38 def self.from(map:) Program.new( id: map["$id"], title: map["title"], description: map["description"], tag: map["tag"], icon: map["icon"], url: map["url"], active: map["active"], external: map["external"], billing_plan_id: map["billingPlanId"] ) end |
Instance Method Details
#to_map ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/appwrite/models/program.rb', line 52 def to_map { "$id": @id, "title": @title, "description": @description, "tag": @tag, "icon": @icon, "url": @url, "active": @active, "external": @external, "billingPlanId": @billing_plan_id } end |