twilio-ruby 3.8.0 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module Twilio
8
8
  resource :sandbox, :available_phone_numbers, :incoming_phone_numbers,
9
9
  :calls, :outgoing_caller_ids, :conferences, :sms, :recordings,
10
10
  :transcriptions, :notifications, :applications, :connect_apps,
11
- :authorized_connect_apps, :queues
11
+ :authorized_connect_apps, :queues, :usage
12
12
  end
13
13
  end
14
14
  end
@@ -0,0 +1,21 @@
1
+ module Twilio
2
+ module REST
3
+ class Records < ListResource
4
+
5
+ SUBRESOURCES = [:daily, :monthly, :yearly, :all_time, :today, :yesterday,
6
+ :this_month, :last_month]
7
+
8
+ def initialize(uri, client)
9
+ super
10
+ @list_key = 'usage_records'
11
+ end
12
+
13
+ def method_missing(method, *args)
14
+ super unless SUBRESOURCES.include? method
15
+ self.class.new "#{@uri}/#{twilify(method)}", @client
16
+ end
17
+ end
18
+
19
+ class Record < InstanceResource; end
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ module Twilio
2
+ module REST
3
+ class Triggers < ListResource
4
+ def initialize(uri, client)
5
+ super
6
+ @list_key = 'usage_triggers'
7
+ end
8
+ end
9
+
10
+ class Trigger < InstanceResource; end
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ module Twilio
2
+ module REST
3
+ class Usage < InstanceResource
4
+ def initialize(uri, client, params={})
5
+ super
6
+ resource :records, :triggers
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,3 +1,3 @@
1
1
  module Twilio
2
- VERSION = '3.8.0'
2
+ VERSION = '3.9.0'
3
3
  end
data/lib/twilio-ruby.rb CHANGED
@@ -35,6 +35,9 @@ require 'twilio-ruby/rest/conferences'
35
35
  require 'twilio-ruby/rest/conferences/participants'
36
36
  require 'twilio-ruby/rest/queues'
37
37
  require 'twilio-ruby/rest/queues/members'
38
+ require 'twilio-ruby/rest/usage'
39
+ require 'twilio-ruby/rest/usage/records'
40
+ require 'twilio-ruby/rest/usage/triggers'
38
41
  require 'twilio-ruby/rest/recordings'
39
42
  require 'twilio-ruby/rest/transcriptions'
40
43
  require 'twilio-ruby/rest/notifications'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 35
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 8
8
+ - 9
9
9
  - 0
10
- version: 3.8.0
10
+ version: 3.9.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Benton
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-08-09 00:00:00 -07:00
18
+ date: 2012-10-19 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -176,6 +176,9 @@ files:
176
176
  - lib/twilio-ruby/rest/sms/messages.rb
177
177
  - lib/twilio-ruby/rest/sms/short_codes.rb
178
178
  - lib/twilio-ruby/rest/transcriptions.rb
179
+ - lib/twilio-ruby/rest/usage.rb
180
+ - lib/twilio-ruby/rest/usage/records.rb
181
+ - lib/twilio-ruby/rest/usage/triggers.rb
179
182
  - lib/twilio-ruby/rest/utils.rb
180
183
  - lib/twilio-ruby/twiml/response.rb
181
184
  - lib/twilio-ruby/util.rb