Class: Twilio::REST::Verify::V2::VerificationAttemptsSummaryInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::VerificationAttemptsSummaryInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb
Instance Method Summary collapse
-
#context ⇒ VerificationAttemptsSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#conversion_rate_percentage ⇒ Float
Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100.
-
#fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset) ⇒ VerificationAttemptsSummaryInstance
Fetch the VerificationAttemptsSummaryInstance.
-
#initialize(version, payload) ⇒ VerificationAttemptsSummaryInstance
constructor
Initialize the VerificationAttemptsSummaryInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#total_attempts ⇒ String
Total of attempts made according to the provided filters.
-
#total_converted ⇒ String
Total of attempts made that were confirmed by the end user, according to the provided filters.
-
#total_unconverted ⇒ String
Total of attempts made that were not confirmed by the end user, according to the provided filters.
- #url ⇒ String
Constructor Details
#initialize(version, payload) ⇒ VerificationAttemptsSummaryInstance
Initialize the VerificationAttemptsSummaryInstance
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 146 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'total_attempts' => payload['total_attempts'] == nil ? payload['total_attempts'] : payload['total_attempts'].to_i, 'total_converted' => payload['total_converted'] == nil ? payload['total_converted'] : payload['total_converted'].to_i, 'total_unconverted' => payload['total_unconverted'] == nil ? payload['total_unconverted'] : payload['total_unconverted'].to_i, 'conversion_rate_percentage' => payload['conversion_rate_percentage'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#context ⇒ VerificationAttemptsSummaryContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
167 168 169 170 171 172 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 167 def context unless @instance_context @instance_context = VerificationAttemptsSummaryContext.new(@version ) end @instance_context end |
#conversion_rate_percentage ⇒ Float
Returns Percentage of the confirmed messages over the total, defined by (total_converted/total_attempts)*100.
194 195 196 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 194 def conversion_rate_percentage @properties['conversion_rate_percentage'] end |
#fetch(verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset) ⇒ VerificationAttemptsSummaryInstance
Fetch the VerificationAttemptsSummaryInstance
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 213 def fetch( verify_service_sid: :unset, date_created_after: :unset, date_created_before: :unset, country: :unset, channel: :unset, destination_prefix: :unset ) context.fetch( verify_service_sid: verify_service_sid, date_created_after: date_created_after, date_created_before: date_created_before, country: country, channel: channel, destination_prefix: destination_prefix, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
241 242 243 244 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 241 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>" end |
#to_s ⇒ Object
Provide a user friendly representation
234 235 236 237 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 234 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.VerificationAttemptsSummaryInstance #{values}>" end |
#total_attempts ⇒ String
Returns Total of attempts made according to the provided filters.
176 177 178 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 176 def total_attempts @properties['total_attempts'] end |
#total_converted ⇒ String
Returns Total of attempts made that were confirmed by the end user, according to the provided filters.
182 183 184 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 182 def total_converted @properties['total_converted'] end |
#total_unconverted ⇒ String
Returns Total of attempts made that were not confirmed by the end user, according to the provided filters.
188 189 190 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 188 def total_unconverted @properties['total_unconverted'] end |
#url ⇒ String
200 201 202 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempts_summary.rb', line 200 def url @properties['url'] end |