twilio-ruby 5.0.0.rc9 → 5.0.0.rc10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/lib/twilio-ruby/rest/api/v2010/account/address/dependent_phone_number.rb +2 -9
  3. data/lib/twilio-ruby/rest/api/v2010/account/address.rb +13 -24
  4. data/lib/twilio-ruby/rest/api/v2010/account/application.rb +12 -23
  5. data/lib/twilio-ruby/rest/api/v2010/account/authorized_connect_app.rb +6 -15
  6. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb +2 -9
  7. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/mobile.rb +2 -9
  8. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb +2 -9
  9. data/lib/twilio-ruby/rest/api/v2010/account/available_phone_number.rb +9 -18
  10. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb +15 -23
  11. data/lib/twilio-ruby/rest/api/v2010/account/call/feedback_summary.rb +8 -15
  12. data/lib/twilio-ruby/rest/api/v2010/account/call/notification.rb +9 -18
  13. data/lib/twilio-ruby/rest/api/v2010/account/call/recording.rb +9 -18
  14. data/lib/twilio-ruby/rest/api/v2010/account/call.rb +20 -28
  15. data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +15 -24
  16. data/lib/twilio-ruby/rest/api/v2010/account/conference.rb +7 -16
  17. data/lib/twilio-ruby/rest/api/v2010/account/connect_app.rb +10 -20
  18. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/local.rb +2 -10
  19. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/mobile.rb +2 -10
  20. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb +2 -10
  21. data/lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number.rb +12 -23
  22. data/lib/twilio-ruby/rest/api/v2010/account/key.rb +324 -0
  23. data/lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb +4 -9
  24. data/lib/twilio-ruby/rest/api/v2010/account/message/media.rb +9 -18
  25. data/lib/twilio-ruby/rest/api/v2010/account/message.rb +23 -29
  26. data/lib/twilio-ruby/rest/api/v2010/account/new_key.rb +145 -0
  27. data/lib/twilio-ruby/rest/api/v2010/account/new_signing_key.rb +145 -0
  28. data/lib/twilio-ruby/rest/api/v2010/account/notification.rb +7 -16
  29. data/lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb +12 -21
  30. data/lib/twilio-ruby/rest/api/v2010/account/queue/member.rb +13 -23
  31. data/lib/twilio-ruby/rest/api/v2010/account/queue.rb +13 -24
  32. data/lib/twilio-ruby/rest/api/v2010/account/recording/transcription.rb +9 -18
  33. data/lib/twilio-ruby/rest/api/v2010/account/recording.rb +8 -17
  34. data/lib/twilio-ruby/rest/api/v2010/account/sandbox.rb +8 -15
  35. data/lib/twilio-ruby/rest/api/v2010/account/signing_key.rb +324 -0
  36. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list/credential.rb +16 -27
  37. data/lib/twilio-ruby/rest/api/v2010/account/sip/credential_list.rb +14 -24
  38. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/credential_list_mapping.rb +11 -21
  39. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.rb +11 -21
  40. data/lib/twilio-ruby/rest/api/v2010/account/sip/domain.rb +23 -31
  41. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list/ip_address.rb +16 -27
  42. data/lib/twilio-ruby/rest/api/v2010/account/sip/ip_access_control_list.rb +14 -24
  43. data/lib/twilio-ruby/rest/api/v2010/account/sip.rb +1 -8
  44. data/lib/twilio-ruby/rest/api/v2010/account/sms/short_code.rb +10 -20
  45. data/lib/twilio-ruby/rest/api/v2010/account/sms/sms_message.rb +13 -23
  46. data/lib/twilio-ruby/rest/api/v2010/account/sms.rb +1 -7
  47. data/lib/twilio-ruby/rest/api/v2010/account/token.rb +2 -7
  48. data/lib/twilio-ruby/rest/api/v2010/account/transcription.rb +7 -16
  49. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/all_time.rb +1 -8
  50. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/daily.rb +1 -8
  51. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/last_month.rb +1 -8
  52. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/monthly.rb +1 -8
  53. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/this_month.rb +1 -8
  54. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/today.rb +1 -8
  55. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yearly.rb +1 -8
  56. data/lib/twilio-ruby/rest/api/v2010/account/usage/record/yesterday.rb +1 -8
  57. data/lib/twilio-ruby/rest/api/v2010/account/usage/record.rb +1 -8
  58. data/lib/twilio-ruby/rest/api/v2010/account/usage/trigger.rb +12 -23
  59. data/lib/twilio-ruby/rest/api/v2010/account/usage.rb +1 -6
  60. data/lib/twilio-ruby/rest/api/v2010/account/validation_request.rb +2 -7
  61. data/lib/twilio-ruby/rest/api/v2010/account.rb +131 -38
  62. data/lib/twilio-ruby/rest/api/v2010.rb +17 -1
  63. data/lib/twilio-ruby/rest/api.rb +16 -0
  64. data/lib/twilio-ruby/rest/client.rb +16 -0
  65. data/lib/twilio-ruby/rest/ip_messaging/v1/credential.rb +13 -28
  66. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/member.rb +11 -21
  67. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel/message.rb +62 -20
  68. data/lib/twilio-ruby/rest/ip_messaging/v1/service/channel.rb +17 -28
  69. data/lib/twilio-ruby/rest/ip_messaging/v1/service/role.rb +12 -23
  70. data/lib/twilio-ruby/rest/ip_messaging/v1/service/user.rb +23 -25
  71. data/lib/twilio-ruby/rest/ip_messaging/v1/service.rb +13 -24
  72. data/lib/twilio-ruby/rest/ip_messaging/v1.rb +1 -1
  73. data/lib/twilio-ruby/rest/lookups/v1/phone_number.rb +5 -12
  74. data/lib/twilio-ruby/rest/lookups/v1.rb +1 -1
  75. data/lib/twilio-ruby/rest/monitor/v1/alert.rb +5 -14
  76. data/lib/twilio-ruby/rest/monitor/v1/event.rb +4 -13
  77. data/lib/twilio-ruby/rest/monitor/v1.rb +1 -1
  78. data/lib/twilio-ruby/rest/notifications/v1/credential.rb +13 -28
  79. data/lib/twilio-ruby/rest/notifications/v1/service/binding.rb +8 -18
  80. data/lib/twilio-ruby/rest/notifications/v1/service/notification.rb +8 -8
  81. data/lib/twilio-ruby/rest/notifications/v1/service.rb +10 -21
  82. data/lib/twilio-ruby/rest/notifications/v1.rb +1 -1
  83. data/lib/twilio-ruby/rest/preview/wireless/command.rb +4 -14
  84. data/lib/twilio-ruby/rest/preview/wireless/device/usage.rb +6 -13
  85. data/lib/twilio-ruby/rest/preview/wireless/device.rb +8 -19
  86. data/lib/twilio-ruby/rest/preview/wireless/rate_plan.rb +4 -13
  87. data/lib/twilio-ruby/rest/preview/wireless.rb +1 -1
  88. data/lib/twilio-ruby/rest/pricing/v1/messaging/country.rb +4 -13
  89. data/lib/twilio-ruby/rest/pricing/v1/messaging.rb +0 -5
  90. data/lib/twilio-ruby/rest/pricing/v1/phone_number/country.rb +4 -13
  91. data/lib/twilio-ruby/rest/pricing/v1/phone_number.rb +0 -5
  92. data/lib/twilio-ruby/rest/pricing/v1/voice/country.rb +4 -13
  93. data/lib/twilio-ruby/rest/pricing/v1/voice/number.rb +4 -10
  94. data/lib/twilio-ruby/rest/pricing/v1/voice.rb +0 -6
  95. data/lib/twilio-ruby/rest/pricing/v1.rb +1 -1
  96. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/activity.rb +13 -23
  97. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/event.rb +6 -15
  98. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task/reservation.rb +13 -23
  99. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task.rb +13 -24
  100. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.rb +8 -15
  101. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.rb +1 -8
  102. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/task_queue.rb +13 -24
  103. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/worker_statistics.rb +8 -15
  104. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker/workers_statistics.rb +6 -13
  105. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/worker.rb +13 -24
  106. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow/workflow_statistics.rb +8 -15
  107. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workflow.rb +13 -24
  108. data/lib/twilio-ruby/rest/taskrouter/v1/workspace/workspace_statistics.rb +6 -13
  109. data/lib/twilio-ruby/rest/taskrouter/v1/workspace.rb +15 -26
  110. data/lib/twilio-ruby/rest/taskrouter/v1.rb +1 -1
  111. data/lib/twilio-ruby/rest/trunking/v1/trunk/credential_list.rb +8 -18
  112. data/lib/twilio-ruby/rest/trunking/v1/trunk/ip_access_control_list.rb +8 -18
  113. data/lib/twilio-ruby/rest/trunking/v1/trunk/origination_url.rb +12 -23
  114. data/lib/twilio-ruby/rest/trunking/v1/trunk/phone_number.rb +8 -18
  115. data/lib/twilio-ruby/rest/trunking/v1/trunk.rb +12 -23
  116. data/lib/twilio-ruby/rest/trunking/v1.rb +1 -1
  117. data/lib/twilio-ruby/version.rb +1 -1
  118. data/spec/integration/api/v2010/account/key_spec.rb +178 -0
  119. data/spec/integration/api/v2010/account/message_spec.rb +2 -3
  120. data/spec/integration/api/v2010/account/new_key_spec.rb +45 -0
  121. data/spec/integration/api/v2010/account/new_signing_key_spec.rb +45 -0
  122. data/spec/integration/api/v2010/account/signing_key_spec.rb +178 -0
  123. data/spec/integration/api/v2010/account/sip/ip_access_control_list/ip_address_spec.rb +3 -7
  124. data/spec/integration/ip_messaging/v1/credential_spec.rb +5 -10
  125. data/spec/integration/ip_messaging/v1/service/channel/message_spec.rb +37 -0
  126. data/spec/integration/ip_messaging/v1/service/channel_spec.rb +3 -7
  127. data/spec/integration/ip_messaging/v1/service/user_spec.rb +3 -6
  128. data/spec/integration/notifications/v1/credential_spec.rb +5 -10
  129. data/spec/integration/notifications/v1/service/notification_spec.rb +1 -0
  130. data/spec/integration/preview/wireless/device_spec.rb +4 -4
  131. data/spec/integration/taskrouter/v1/workspace/task/reservation_spec.rb +3 -6
  132. metadata +15 -3
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [LastMonthList] LastMonthList
22
21
  def initialize(version, account_sid: nil)
23
22
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of LastMonthInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [LastMonthPage] LastMonthPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of LastMonthInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [LastMonthInstance] LastMonthInstance
146
140
  def get_instance(payload)
147
141
  return LastMonthInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [LastMonthInstance] LastMonthInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [MonthlyList] MonthlyList
22
21
  def initialize(version, account_sid: nil)
23
22
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of MonthlyInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [MonthlyPage] MonthlyPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of MonthlyInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [MonthlyInstance] MonthlyInstance
146
140
  def get_instance(payload)
147
141
  return MonthlyInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [MonthlyInstance] MonthlyInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [ThisMonthList] ThisMonthList
22
21
  def initialize(version, account_sid: nil)
23
22
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of ThisMonthInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [ThisMonthPage] ThisMonthPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of ThisMonthInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [ThisMonthInstance] ThisMonthInstance
146
140
  def get_instance(payload)
147
141
  return ThisMonthInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [ThisMonthInstance] ThisMonthInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [TodayList] TodayList
22
21
  def initialize(version, account_sid: nil)
23
22
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of TodayInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [TodayPage] TodayPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of TodayInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [TodayInstance] TodayInstance
146
140
  def get_instance(payload)
147
141
  return TodayInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [TodayInstance] TodayInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [YearlyList] YearlyList
22
21
  def initialize(version, account_sid: nil)
23
22
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of YearlyInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [YearlyPage] YearlyPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of YearlyInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [YearlyInstance] YearlyInstance
146
140
  def get_instance(payload)
147
141
  return YearlyInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [YearlyInstance] YearlyInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -17,7 +17,6 @@ module Twilio
17
17
  # @param [Version] version Version that contains the resource
18
18
  # @param [String] account_sid A 34 character string that uniquely identifies this
19
19
  # resource.
20
-
21
20
  # @return [YesterdayList] YesterdayList
22
21
  def initialize(version, account_sid: nil)
23
22
  super(version)
@@ -39,7 +38,6 @@ module Twilio
39
38
  # the default value of 50 records. If no page_size is defined
40
39
  # but a limit is defined, stream() will attempt to read the
41
40
  # limit with the most efficient page size, i.e. min(limit, 1000)
42
-
43
41
  # @return [Array] Array of up to limit results
44
42
  def list(limit: nil, page_size: nil)
45
43
  self.stream(
@@ -58,7 +56,6 @@ module Twilio
58
56
  # the default value of 50 records. If no page_size is defined
59
57
  # but a limit is defined, stream() will attempt to read the
60
58
  # limit with the most efficient page size, i.e. min(limit, 1000)
61
-
62
59
  # @return [Enumerable] Enumerable that will yield up to limit results
63
60
  def stream(limit: nil, page_size: nil)
64
61
  limits = @version.read_limits(limit, page_size)
@@ -98,7 +95,6 @@ module Twilio
98
95
  # @param [String] page_token PageToken provided by the API
99
96
  # @param [Integer] page_number Page Number, this value is simply for client state
100
97
  # @param [Integer] page_size Number of records to return, defaults to 50
101
-
102
98
  # @return [Page] Page of YesterdayInstance
103
99
  def page(page_token: nil, page_number: nil, page_size: nil)
104
100
  params = {
@@ -129,7 +125,6 @@ module Twilio
129
125
  # @param [Hash] solution Path solution for the resource
130
126
  # @param [String] account_sid A 34 character string that uniquely identifies this
131
127
  # resource.
132
-
133
128
  # @return [YesterdayPage] YesterdayPage
134
129
  def initialize(version, response, solution)
135
130
  super(version, response)
@@ -141,13 +136,12 @@ module Twilio
141
136
  ##
142
137
  # Build an instance of YesterdayInstance
143
138
  # @param [Hash] payload Payload response from the API
144
-
145
139
  # @return [YesterdayInstance] YesterdayInstance
146
140
  def get_instance(payload)
147
141
  return YesterdayInstance.new(
148
142
  @version,
149
143
  payload,
150
- account_sid: @solution['account_sid'],
144
+ account_sid: @solution[:account_sid],
151
145
  )
152
146
  end
153
147
 
@@ -165,7 +159,6 @@ module Twilio
165
159
  # @param [Hash] payload payload that contains response from Twilio
166
160
  # @param [String] account_sid A 34 character string that uniquely identifies this
167
161
  # resource.
168
-
169
162
  # @return [YesterdayInstance] YesterdayInstance
170
163
  def initialize(version, payload, account_sid: nil)
171
164
  super(version)
@@ -16,7 +16,6 @@ module Twilio
16
16
  # @param [Version] version Version that contains the resource
17
17
  # @param [String] account_sid A 34 character string that uniquely identifies this
18
18
  # resource.
19
-
20
19
  # @return [RecordList] RecordList
21
20
  def initialize(version, account_sid: nil)
22
21
  super(version)
@@ -55,7 +54,6 @@ module Twilio
55
54
  # the default value of 50 records. If no page_size is defined
56
55
  # but a limit is defined, stream() will attempt to read the
57
56
  # limit with the most efficient page size, i.e. min(limit, 1000)
58
-
59
57
  # @return [Array] Array of up to limit results
60
58
  def list(category: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil, limit: nil, page_size: nil)
61
59
  self.stream(
@@ -88,7 +86,6 @@ module Twilio
88
86
  # the default value of 50 records. If no page_size is defined
89
87
  # but a limit is defined, stream() will attempt to read the
90
88
  # limit with the most efficient page size, i.e. min(limit, 1000)
91
-
92
89
  # @return [Enumerable] Enumerable that will yield up to limit results
93
90
  def stream(category: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil, limit: nil, page_size: nil)
94
91
  limits = @version.read_limits(limit, page_size)
@@ -149,7 +146,6 @@ module Twilio
149
146
  # @param [String] page_token PageToken provided by the API
150
147
  # @param [Integer] page_number Page Number, this value is simply for client state
151
148
  # @param [Integer] page_size Number of records to return, defaults to 50
152
-
153
149
  # @return [Page] Page of RecordInstance
154
150
  def page(category: nil, start_date_before: nil, start_date: nil, start_date_after: nil, end_date_before: nil, end_date: nil, end_date_after: nil, page_token: nil, page_number: nil, page_size: nil)
155
151
  params = {
@@ -267,7 +263,6 @@ module Twilio
267
263
  # @param [Hash] solution Path solution for the resource
268
264
  # @param [String] account_sid A 34 character string that uniquely identifies this
269
265
  # resource.
270
-
271
266
  # @return [RecordPage] RecordPage
272
267
  def initialize(version, response, solution)
273
268
  super(version, response)
@@ -279,13 +274,12 @@ module Twilio
279
274
  ##
280
275
  # Build an instance of RecordInstance
281
276
  # @param [Hash] payload Payload response from the API
282
-
283
277
  # @return [RecordInstance] RecordInstance
284
278
  def get_instance(payload)
285
279
  return RecordInstance.new(
286
280
  @version,
287
281
  payload,
288
- account_sid: @solution['account_sid'],
282
+ account_sid: @solution[:account_sid],
289
283
  )
290
284
  end
291
285
 
@@ -303,7 +297,6 @@ module Twilio
303
297
  # @param [Hash] payload payload that contains response from Twilio
304
298
  # @param [String] account_sid A 34 character string that uniquely identifies this
305
299
  # resource.
306
-
307
300
  # @return [RecordInstance] RecordInstance
308
301
  def initialize(version, payload, account_sid: nil)
309
302
  super(version)
@@ -16,7 +16,6 @@ module Twilio
16
16
  # @param [Version] version Version that contains the resource
17
17
  # @param [String] account_sid A 34 character string that uniquely identifies this
18
18
  # resource.
19
-
20
19
  # @return [TriggerList] TriggerList
21
20
  def initialize(version, account_sid: nil)
22
21
  super(version)
@@ -47,7 +46,6 @@ module Twilio
47
46
  # Recurring periods are in GMT.
48
47
  # @param [trigger.TriggerField] trigger_by The field in the UsageRecord that fires
49
48
  # the trigger. One of `count`, `usage`, or `price`
50
-
51
49
  # @return [TriggerInstance] Newly created TriggerInstance
52
50
  def create(callback_url: nil, trigger_value: nil, usage_category: nil, callback_method: nil, friendly_name: nil, recurring: nil, trigger_by: nil)
53
51
  data = {
@@ -69,7 +67,7 @@ module Twilio
69
67
  return TriggerInstance.new(
70
68
  @version,
71
69
  payload,
72
- account_sid: @solution['account_sid'],
70
+ account_sid: @solution[:account_sid],
73
71
  )
74
72
  end
75
73
 
@@ -89,7 +87,6 @@ module Twilio
89
87
  # the default value of 50 records. If no page_size is defined
90
88
  # but a limit is defined, stream() will attempt to read the
91
89
  # limit with the most efficient page size, i.e. min(limit, 1000)
92
-
93
90
  # @return [Array] Array of up to limit results
94
91
  def list(recurring: nil, trigger_by: nil, usage_category: nil, limit: nil, page_size: nil)
95
92
  self.stream(
@@ -117,7 +114,6 @@ module Twilio
117
114
  # the default value of 50 records. If no page_size is defined
118
115
  # but a limit is defined, stream() will attempt to read the
119
116
  # limit with the most efficient page size, i.e. min(limit, 1000)
120
-
121
117
  # @return [Enumerable] Enumerable that will yield up to limit results
122
118
  def stream(recurring: nil, trigger_by: nil, usage_category: nil, limit: nil, page_size: nil)
123
119
  limits = @version.read_limits(limit, page_size)
@@ -172,7 +168,6 @@ module Twilio
172
168
  # @param [String] page_token PageToken provided by the API
173
169
  # @param [Integer] page_number Page Number, this value is simply for client state
174
170
  # @param [Integer] page_size Number of records to return, defaults to 50
175
-
176
171
  # @return [Page] Page of TriggerInstance
177
172
  def page(recurring: nil, trigger_by: nil, usage_category: nil, page_token: nil, page_number: nil, page_size: nil)
178
173
  params = {
@@ -206,7 +201,6 @@ module Twilio
206
201
  # @param [Hash] solution Path solution for the resource
207
202
  # @param [String] account_sid A 34 character string that uniquely identifies this
208
203
  # resource.
209
-
210
204
  # @return [TriggerPage] TriggerPage
211
205
  def initialize(version, response, solution)
212
206
  super(version, response)
@@ -218,13 +212,12 @@ module Twilio
218
212
  ##
219
213
  # Build an instance of TriggerInstance
220
214
  # @param [Hash] payload Payload response from the API
221
-
222
215
  # @return [TriggerInstance] TriggerInstance
223
216
  def get_instance(payload)
224
217
  return TriggerInstance.new(
225
218
  @version,
226
219
  payload,
227
- account_sid: @solution['account_sid'],
220
+ account_sid: @solution[:account_sid],
228
221
  )
229
222
  end
230
223
 
@@ -241,7 +234,6 @@ module Twilio
241
234
  # @param [Version] version Version that contains the resource
242
235
  # @param [String] account_sid The account_sid
243
236
  # @param [String] sid The usage-trigger Sid that uniquely identifies this resource
244
-
245
237
  # @return [TriggerContext] TriggerContext
246
238
  def initialize(version, account_sid, sid)
247
239
  super(version)
@@ -269,8 +261,8 @@ module Twilio
269
261
  return TriggerInstance.new(
270
262
  @version,
271
263
  payload,
272
- account_sid: @solution['account_sid'],
273
- sid: @solution['sid'],
264
+ account_sid: @solution[:account_sid],
265
+ sid: @solution[:sid],
274
266
  )
275
267
  end
276
268
 
@@ -282,7 +274,6 @@ module Twilio
282
274
  # trigger fires.
283
275
  # @param [String] friendly_name A user-specified, human-readable name for the
284
276
  # trigger.
285
-
286
277
  # @return [TriggerInstance] Updated TriggerInstance
287
278
  def update(callback_method: nil, callback_url: nil, friendly_name: nil)
288
279
  data = {
@@ -300,8 +291,8 @@ module Twilio
300
291
  return TriggerInstance.new(
301
292
  @version,
302
293
  payload,
303
- account_sid: @solution['account_sid'],
304
- sid: @solution['sid'],
294
+ account_sid: @solution[:account_sid],
295
+ sid: @solution[:sid],
305
296
  )
306
297
  end
307
298
 
@@ -328,7 +319,6 @@ module Twilio
328
319
  # @param [String] account_sid A 34 character string that uniquely identifies this
329
320
  # resource.
330
321
  # @param [String] sid The usage-trigger Sid that uniquely identifies this resource
331
-
332
322
  # @return [TriggerInstance] TriggerInstance
333
323
  def initialize(version, payload, account_sid: nil, sid: nil)
334
324
  super(version)
@@ -365,7 +355,6 @@ module Twilio
365
355
  # Generate an instance context for the instance, the context is capable of
366
356
  # performing various actions. All instance actions are proxied to the context
367
357
  # @param [Version] version Version that contains the resource
368
-
369
358
  # @return [TriggerContext] TriggerContext for this TriggerInstance
370
359
  def context
371
360
  unless @instance_context
@@ -446,7 +435,7 @@ module Twilio
446
435
  # Fetch a TriggerInstance
447
436
  # @return [TriggerInstance] Fetched TriggerInstance
448
437
  def fetch
449
- @context.fetch()
438
+ context.fetch
450
439
  end
451
440
 
452
441
  ##
@@ -457,10 +446,10 @@ module Twilio
457
446
  # trigger fires.
458
447
  # @param [String] friendly_name A user-specified, human-readable name for the
459
448
  # trigger.
460
-
461
449
  # @return [TriggerInstance] Updated TriggerInstance
462
450
  def update(callback_method: nil, callback_url: nil, friendly_name: nil)
463
- @context.update(
451
+ context.update(
452
+ callback_method: callback_method,
464
453
  callback_url: callback_url,
465
454
  friendly_name: friendly_name,
466
455
  )
@@ -470,14 +459,14 @@ module Twilio
470
459
  # Deletes the TriggerInstance
471
460
  # @return [Boolean] true if delete succeeds, true otherwise
472
461
  def delete
473
- @context.delete()
462
+ context.delete
474
463
  end
475
464
 
476
465
  ##
477
466
  # Provide a user friendly representation
478
467
  def to_s
479
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
480
- "<Twilio.Api.V2010.TriggerInstance #{context}>"
468
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
469
+ "<Twilio.Api.V2010.TriggerInstance #{values}>"
481
470
  end
482
471
  end
483
472
  end