Class: FileTurn::Account
- Defined in:
- lib/fileturn/resources/account.rb
Class Method Summary collapse
- .created_at ⇒ Object
- .credits ⇒ Object
- .id ⇒ Object
- .load ⇒ Object
- .load_only_if_not_loaded ⇒ Object
- .max_file_size_in_bytes ⇒ Object
- .notification_url ⇒ Object
- .time_zone ⇒ Object
Methods inherited from Resource
Class Method Details
.created_at ⇒ Object
28 29 30 |
# File 'lib/fileturn/resources/account.rb', line 28 def created_at @account.created_at end |
.credits ⇒ Object
24 25 26 |
# File 'lib/fileturn/resources/account.rb', line 24 def credits @account.credits end |
.id ⇒ Object
20 21 22 |
# File 'lib/fileturn/resources/account.rb', line 20 def id @account.id end |
.load ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/fileturn/resources/account.rb', line 7 def load conn.get("/users.json", {}, 200) do |params| params['created_at'] = DateTime.parse(params['created_at']) @account = OpenStruct.new(params) self end end |
.load_only_if_not_loaded ⇒ Object
15 16 17 18 |
# File 'lib/fileturn/resources/account.rb', line 15 def load_only_if_not_loaded load if @account.nil? || @account.id.nil? self end |
.max_file_size_in_bytes ⇒ Object
40 41 42 |
# File 'lib/fileturn/resources/account.rb', line 40 def max_file_size_in_bytes @account.max_file_size_in_bytes end |
.notification_url ⇒ Object
32 33 34 |
# File 'lib/fileturn/resources/account.rb', line 32 def notification_url @account.notification_url end |
.time_zone ⇒ Object
36 37 38 |
# File 'lib/fileturn/resources/account.rb', line 36 def time_zone @account.time_zone end |