Class: Appwrite::Models::Organization
- Inherits:
-
Object
- Object
- Appwrite::Models::Organization
- Defined in:
- lib/appwrite/models/organization.rb
Instance Attribute Summary collapse
-
#agreement_baa ⇒ Object
readonly
Returns the value of attribute agreement_baa.
-
#backup_payment_method_id ⇒ Object
readonly
Returns the value of attribute backup_payment_method_id.
-
#billing_address_id ⇒ Object
readonly
Returns the value of attribute billing_address_id.
-
#billing_aggregation_id ⇒ Object
readonly
Returns the value of attribute billing_aggregation_id.
-
#billing_budget ⇒ Object
readonly
Returns the value of attribute billing_budget.
-
#billing_current_invoice_date ⇒ Object
readonly
Returns the value of attribute billing_current_invoice_date.
-
#billing_email ⇒ Object
readonly
Returns the value of attribute billing_email.
-
#billing_invoice_id ⇒ Object
readonly
Returns the value of attribute billing_invoice_id.
-
#billing_limits ⇒ Object
readonly
Returns the value of attribute billing_limits.
-
#billing_next_invoice_date ⇒ Object
readonly
Returns the value of attribute billing_next_invoice_date.
-
#billing_plan ⇒ Object
readonly
Returns the value of attribute billing_plan.
-
#billing_plan_details ⇒ Object
readonly
Returns the value of attribute billing_plan_details.
-
#billing_plan_downgrade ⇒ Object
readonly
Returns the value of attribute billing_plan_downgrade.
-
#billing_plan_id ⇒ Object
readonly
Returns the value of attribute billing_plan_id.
-
#billing_start_date ⇒ Object
readonly
Returns the value of attribute billing_start_date.
-
#billing_tax_id ⇒ Object
readonly
Returns the value of attribute billing_tax_id.
-
#billing_trial_days ⇒ Object
readonly
Returns the value of attribute billing_trial_days.
-
#billing_trial_start_date ⇒ Object
readonly
Returns the value of attribute billing_trial_start_date.
-
#budget_alerts ⇒ Object
readonly
Returns the value of attribute budget_alerts.
-
#budget_critical ⇒ Object
readonly
Returns the value of attribute budget_critical.
-
#budget_notify ⇒ Object
readonly
Returns the value of attribute budget_notify.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#education_expires_at ⇒ Object
readonly
Returns the value of attribute education_expires_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#marked_for_deletion ⇒ Object
readonly
Returns the value of attribute marked_for_deletion.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#payment_method_id ⇒ Object
readonly
Returns the value of attribute payment_method_id.
-
#platform ⇒ Object
readonly
Returns the value of attribute platform.
-
#prefs ⇒ Object
readonly
Returns the value of attribute prefs.
-
#program_discord_channel_name ⇒ Object
readonly
Returns the value of attribute program_discord_channel_name.
-
#program_discord_channel_url ⇒ Object
readonly
Returns the value of attribute program_discord_channel_url.
-
#program_manager_calendar ⇒ Object
readonly
Returns the value of attribute program_manager_calendar.
-
#program_manager_name ⇒ Object
readonly
Returns the value of attribute program_manager_name.
-
#projects ⇒ Object
readonly
Returns the value of attribute projects.
-
#remarks ⇒ Object
readonly
Returns the value of attribute remarks.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, updated_at:, name:, total:, prefs:, billing_budget: nil, budget_alerts:, budget_notify:, budget_critical:, billing_plan:, billing_plan_id:, billing_plan_details:, billing_email:, billing_start_date: nil, billing_current_invoice_date: nil, billing_next_invoice_date: nil, billing_trial_start_date: nil, billing_trial_days: nil, billing_aggregation_id: nil, billing_invoice_id: nil, payment_method_id: nil, billing_address_id: nil, backup_payment_method_id: nil, status:, remarks: nil, agreement_baa: nil, program_manager_name: nil, program_manager_calendar: nil, program_discord_channel_name: nil, program_discord_channel_url: nil, education_expires_at: nil, billing_limits: nil, billing_plan_downgrade: nil, billing_tax_id: nil, marked_for_deletion:, platform:, projects:) ⇒ Organization
constructor
A new instance of Organization.
- #to_map ⇒ Object
Constructor Details
#initialize(id:, created_at:, updated_at:, name:, total:, prefs:, billing_budget: nil, budget_alerts:, budget_notify:, budget_critical:, billing_plan:, billing_plan_id:, billing_plan_details:, billing_email:, billing_start_date: nil, billing_current_invoice_date: nil, billing_next_invoice_date: nil, billing_trial_start_date: nil, billing_trial_days: nil, billing_aggregation_id: nil, billing_invoice_id: nil, payment_method_id: nil, billing_address_id: nil, backup_payment_method_id: nil, status:, remarks: nil, agreement_baa: nil, program_manager_name: nil, program_manager_calendar: nil, program_discord_channel_name: nil, program_discord_channel_url: nil, education_expires_at: nil, billing_limits: nil, billing_plan_downgrade: nil, billing_tax_id: nil, marked_for_deletion:, platform:, projects:) ⇒ Organization
Returns a new instance of Organization.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/appwrite/models/organization.rb', line 45 def initialize( id:, created_at:, updated_at:, name:, total:, prefs:, billing_budget: nil, budget_alerts:, budget_notify:, budget_critical:, billing_plan:, billing_plan_id:, billing_plan_details:, billing_email:, billing_start_date: nil, billing_current_invoice_date: nil, billing_next_invoice_date: nil, billing_trial_start_date: nil, billing_trial_days: nil, billing_aggregation_id: nil, billing_invoice_id: nil, payment_method_id: nil, billing_address_id: nil, backup_payment_method_id: nil, status:, remarks: nil, agreement_baa: nil, program_manager_name: nil, program_manager_calendar: nil, program_discord_channel_name: nil, program_discord_channel_url: nil, education_expires_at: nil, billing_limits: nil, billing_plan_downgrade: nil, billing_tax_id: nil, marked_for_deletion:, platform:, projects: ) @id = id @created_at = created_at @updated_at = updated_at @name = name @total = total @prefs = prefs @billing_budget = billing_budget @budget_alerts = budget_alerts @budget_notify = budget_notify @budget_critical = budget_critical @billing_plan = billing_plan @billing_plan_id = billing_plan_id @billing_plan_details = billing_plan_details @billing_email = billing_email @billing_start_date = billing_start_date @billing_current_invoice_date = billing_current_invoice_date @billing_next_invoice_date = billing_next_invoice_date @billing_trial_start_date = billing_trial_start_date @billing_trial_days = billing_trial_days @billing_aggregation_id = billing_aggregation_id @billing_invoice_id = billing_invoice_id @payment_method_id = payment_method_id @billing_address_id = billing_address_id @backup_payment_method_id = backup_payment_method_id @status = status @remarks = remarks @agreement_baa = agreement_baa @program_manager_name = program_manager_name @program_manager_calendar = program_manager_calendar @program_discord_channel_name = program_discord_channel_name @program_discord_channel_url = program_discord_channel_url @education_expires_at = education_expires_at @billing_limits = billing_limits @billing_plan_downgrade = billing_plan_downgrade @billing_tax_id = billing_tax_id @marked_for_deletion = marked_for_deletion @platform = platform @projects = projects end |
Instance Attribute Details
#agreement_baa ⇒ Object (readonly)
Returns the value of attribute agreement_baa.
32 33 34 |
# File 'lib/appwrite/models/organization.rb', line 32 def agreement_baa @agreement_baa end |
#backup_payment_method_id ⇒ Object (readonly)
Returns the value of attribute backup_payment_method_id.
29 30 31 |
# File 'lib/appwrite/models/organization.rb', line 29 def backup_payment_method_id @backup_payment_method_id end |
#billing_address_id ⇒ Object (readonly)
Returns the value of attribute billing_address_id.
28 29 30 |
# File 'lib/appwrite/models/organization.rb', line 28 def billing_address_id @billing_address_id end |
#billing_aggregation_id ⇒ Object (readonly)
Returns the value of attribute billing_aggregation_id.
25 26 27 |
# File 'lib/appwrite/models/organization.rb', line 25 def billing_aggregation_id @billing_aggregation_id end |
#billing_budget ⇒ Object (readonly)
Returns the value of attribute billing_budget.
12 13 14 |
# File 'lib/appwrite/models/organization.rb', line 12 def billing_budget @billing_budget end |
#billing_current_invoice_date ⇒ Object (readonly)
Returns the value of attribute billing_current_invoice_date.
21 22 23 |
# File 'lib/appwrite/models/organization.rb', line 21 def billing_current_invoice_date @billing_current_invoice_date end |
#billing_email ⇒ Object (readonly)
Returns the value of attribute billing_email.
19 20 21 |
# File 'lib/appwrite/models/organization.rb', line 19 def billing_email @billing_email end |
#billing_invoice_id ⇒ Object (readonly)
Returns the value of attribute billing_invoice_id.
26 27 28 |
# File 'lib/appwrite/models/organization.rb', line 26 def billing_invoice_id @billing_invoice_id end |
#billing_limits ⇒ Object (readonly)
Returns the value of attribute billing_limits.
38 39 40 |
# File 'lib/appwrite/models/organization.rb', line 38 def billing_limits @billing_limits end |
#billing_next_invoice_date ⇒ Object (readonly)
Returns the value of attribute billing_next_invoice_date.
22 23 24 |
# File 'lib/appwrite/models/organization.rb', line 22 def billing_next_invoice_date @billing_next_invoice_date end |
#billing_plan ⇒ Object (readonly)
Returns the value of attribute billing_plan.
16 17 18 |
# File 'lib/appwrite/models/organization.rb', line 16 def billing_plan @billing_plan end |
#billing_plan_details ⇒ Object (readonly)
Returns the value of attribute billing_plan_details.
18 19 20 |
# File 'lib/appwrite/models/organization.rb', line 18 def billing_plan_details @billing_plan_details end |
#billing_plan_downgrade ⇒ Object (readonly)
Returns the value of attribute billing_plan_downgrade.
39 40 41 |
# File 'lib/appwrite/models/organization.rb', line 39 def billing_plan_downgrade @billing_plan_downgrade end |
#billing_plan_id ⇒ Object (readonly)
Returns the value of attribute billing_plan_id.
17 18 19 |
# File 'lib/appwrite/models/organization.rb', line 17 def billing_plan_id @billing_plan_id end |
#billing_start_date ⇒ Object (readonly)
Returns the value of attribute billing_start_date.
20 21 22 |
# File 'lib/appwrite/models/organization.rb', line 20 def billing_start_date @billing_start_date end |
#billing_tax_id ⇒ Object (readonly)
Returns the value of attribute billing_tax_id.
40 41 42 |
# File 'lib/appwrite/models/organization.rb', line 40 def billing_tax_id @billing_tax_id end |
#billing_trial_days ⇒ Object (readonly)
Returns the value of attribute billing_trial_days.
24 25 26 |
# File 'lib/appwrite/models/organization.rb', line 24 def billing_trial_days @billing_trial_days end |
#billing_trial_start_date ⇒ Object (readonly)
Returns the value of attribute billing_trial_start_date.
23 24 25 |
# File 'lib/appwrite/models/organization.rb', line 23 def billing_trial_start_date @billing_trial_start_date end |
#budget_alerts ⇒ Object (readonly)
Returns the value of attribute budget_alerts.
13 14 15 |
# File 'lib/appwrite/models/organization.rb', line 13 def budget_alerts @budget_alerts end |
#budget_critical ⇒ Object (readonly)
Returns the value of attribute budget_critical.
15 16 17 |
# File 'lib/appwrite/models/organization.rb', line 15 def budget_critical @budget_critical end |
#budget_notify ⇒ Object (readonly)
Returns the value of attribute budget_notify.
14 15 16 |
# File 'lib/appwrite/models/organization.rb', line 14 def budget_notify @budget_notify end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/appwrite/models/organization.rb', line 7 def created_at @created_at end |
#education_expires_at ⇒ Object (readonly)
Returns the value of attribute education_expires_at.
37 38 39 |
# File 'lib/appwrite/models/organization.rb', line 37 def education_expires_at @education_expires_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/appwrite/models/organization.rb', line 6 def id @id end |
#marked_for_deletion ⇒ Object (readonly)
Returns the value of attribute marked_for_deletion.
41 42 43 |
# File 'lib/appwrite/models/organization.rb', line 41 def marked_for_deletion @marked_for_deletion end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/appwrite/models/organization.rb', line 9 def name @name end |
#payment_method_id ⇒ Object (readonly)
Returns the value of attribute payment_method_id.
27 28 29 |
# File 'lib/appwrite/models/organization.rb', line 27 def payment_method_id @payment_method_id end |
#platform ⇒ Object (readonly)
Returns the value of attribute platform.
42 43 44 |
# File 'lib/appwrite/models/organization.rb', line 42 def platform @platform end |
#prefs ⇒ Object (readonly)
Returns the value of attribute prefs.
11 12 13 |
# File 'lib/appwrite/models/organization.rb', line 11 def prefs @prefs end |
#program_discord_channel_name ⇒ Object (readonly)
Returns the value of attribute program_discord_channel_name.
35 36 37 |
# File 'lib/appwrite/models/organization.rb', line 35 def program_discord_channel_name @program_discord_channel_name end |
#program_discord_channel_url ⇒ Object (readonly)
Returns the value of attribute program_discord_channel_url.
36 37 38 |
# File 'lib/appwrite/models/organization.rb', line 36 def program_discord_channel_url @program_discord_channel_url end |
#program_manager_calendar ⇒ Object (readonly)
Returns the value of attribute program_manager_calendar.
34 35 36 |
# File 'lib/appwrite/models/organization.rb', line 34 def program_manager_calendar @program_manager_calendar end |
#program_manager_name ⇒ Object (readonly)
Returns the value of attribute program_manager_name.
33 34 35 |
# File 'lib/appwrite/models/organization.rb', line 33 def program_manager_name @program_manager_name end |
#projects ⇒ Object (readonly)
Returns the value of attribute projects.
43 44 45 |
# File 'lib/appwrite/models/organization.rb', line 43 def projects @projects end |
#remarks ⇒ Object (readonly)
Returns the value of attribute remarks.
31 32 33 |
# File 'lib/appwrite/models/organization.rb', line 31 def remarks @remarks end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
30 31 32 |
# File 'lib/appwrite/models/organization.rb', line 30 def status @status end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
10 11 12 |
# File 'lib/appwrite/models/organization.rb', line 10 def total @total end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
8 9 10 |
# File 'lib/appwrite/models/organization.rb', line 8 def updated_at @updated_at end |
Class Method Details
.from(map:) ⇒ Object
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/appwrite/models/organization.rb', line 125 def self.from(map:) map = { "$id" => "", "$createdAt" => "", "$updatedAt" => "", "name" => "", "total" => 0, "budgetAlerts" => [75], "budgetNotify" => ["owner", "billing"], "budgetCritical" => [], "billingPlan" => "tier-0", "billingPlanId" => "tier-0", "billingEmail" => "", "status" => "draft", "markedForDeletion" => false, "platform" => "appwrite", "projects" => [] }.merge(map) Organization.new( id: map["$id"], created_at: map["$createdAt"], updated_at: map["$updatedAt"], name: map["name"], total: map["total"], prefs: Preferences.from(map: map["prefs"]), billing_budget: map["billingBudget"], budget_alerts: map["budgetAlerts"], budget_notify: map["budgetNotify"], budget_critical: map["budgetCritical"], billing_plan: map["billingPlan"], billing_plan_id: map["billingPlanId"], billing_plan_details: BillingPlan.from(map: map["billingPlanDetails"]), billing_email: map["billingEmail"], billing_start_date: map["billingStartDate"], billing_current_invoice_date: map["billingCurrentInvoiceDate"], billing_next_invoice_date: map["billingNextInvoiceDate"], billing_trial_start_date: map["billingTrialStartDate"], billing_trial_days: map["billingTrialDays"], billing_aggregation_id: map["billingAggregationId"], billing_invoice_id: map["billingInvoiceId"], payment_method_id: map["paymentMethodId"], billing_address_id: map["billingAddressId"], backup_payment_method_id: map["backupPaymentMethodId"], status: map["status"], remarks: map["remarks"], agreement_baa: map["agreementBAA"], program_manager_name: map["programManagerName"], program_manager_calendar: map["programManagerCalendar"], program_discord_channel_name: map["programDiscordChannelName"], program_discord_channel_url: map["programDiscordChannelUrl"], education_expires_at: map["educationExpiresAt"], billing_limits: map["billingLimits"].nil? ? nil : BillingLimits.from(map: map["billingLimits"]), billing_plan_downgrade: map["billingPlanDowngrade"], billing_tax_id: map["billingTaxId"], marked_for_deletion: map["markedForDeletion"], platform: map["platform"], projects: map["projects"] ) end |
Instance Method Details
#to_map ⇒ Object
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/appwrite/models/organization.rb', line 169 def to_map { "$id": @id, "$createdAt": @created_at, "$updatedAt": @updated_at, "name": @name, "total": @total, "prefs": @prefs.to_map, "billingBudget": @billing_budget, "budgetAlerts": @budget_alerts, "budgetNotify": @budget_notify, "budgetCritical": @budget_critical, "billingPlan": @billing_plan, "billingPlanId": @billing_plan_id, "billingPlanDetails": @billing_plan_details.to_map, "billingEmail": @billing_email, "billingStartDate": @billing_start_date, "billingCurrentInvoiceDate": @billing_current_invoice_date, "billingNextInvoiceDate": @billing_next_invoice_date, "billingTrialStartDate": @billing_trial_start_date, "billingTrialDays": @billing_trial_days, "billingAggregationId": @billing_aggregation_id, "billingInvoiceId": @billing_invoice_id, "paymentMethodId": @payment_method_id, "billingAddressId": @billing_address_id, "backupPaymentMethodId": @backup_payment_method_id, "status": @status, "remarks": @remarks, "agreementBAA": @agreement_baa, "programManagerName": @program_manager_name, "programManagerCalendar": @program_manager_calendar, "programDiscordChannelName": @program_discord_channel_name, "programDiscordChannelUrl": @program_discord_channel_url, "educationExpiresAt": @education_expires_at, "billingLimits": @billing_limits&.to_map, "billingPlanDowngrade": @billing_plan_downgrade, "billingTaxId": @billing_tax_id, "markedForDeletion": @marked_for_deletion, "platform": @platform, "projects": @projects } end |