Class: Twilio::REST::Numbers::V1::BulkEligibilityInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Numbers::V1::BulkEligibilityInstance
- Defined in:
- lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb
Instance Method Summary collapse
-
#context ⇒ BulkEligibilityContext
Generate an instance context for the instance, the context is capable of performing various actions.
- #date_completed ⇒ Time
- #date_created ⇒ Time
-
#fetch ⇒ BulkEligibilityInstance
Fetch the BulkEligibilityInstance.
-
#friendly_name ⇒ String
This is the string that you assigned as a friendly name for describing the eligibility check request.
-
#initialize(version, payload, request_id: nil) ⇒ BulkEligibilityInstance
constructor
Initialize the BulkEligibilityInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#request_id ⇒ String
The SID of the bulk eligibility check that you want to know about.
-
#results ⇒ Array<Hash>
The result set that contains the eligibility check response for each requested number, each result has at least the following attributes: phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, country: Phone number’s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number’s ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status.
-
#status ⇒ String
This is the status of the bulk eligibility check request.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
This is the url of the request that you’re trying to reach out to locate the resource.
Constructor Details
#initialize(version, payload, request_id: nil) ⇒ BulkEligibilityInstance
Initialize the BulkEligibilityInstance
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 151 def initialize(version, payload , request_id: nil) super(version) # Marshaled Properties @properties = { 'request_id' => payload['request_id'], 'url' => payload['url'], 'results' => payload['results'], 'friendly_name' => payload['friendly_name'], 'status' => payload['status'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_completed' => Twilio.deserialize_iso8601_datetime(payload['date_completed']), } # Context @instance_context = nil @params = { 'request_id' => request_id || @properties['request_id'] , } end |
Instance Method Details
#context ⇒ BulkEligibilityContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
174 175 176 177 178 179 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 174 def context unless @instance_context @instance_context = BulkEligibilityContext.new(@version , @params['request_id']) end @instance_context end |
#date_completed ⇒ Time
219 220 221 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 219 def date_completed @properties['date_completed'] end |
#date_created ⇒ Time
213 214 215 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 213 def date_created @properties['date_created'] end |
#fetch ⇒ BulkEligibilityInstance
Fetch the BulkEligibilityInstance
226 227 228 229 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 226 def fetch context.fetch end |
#friendly_name ⇒ String
Returns This is the string that you assigned as a friendly name for describing the eligibility check request.
201 202 203 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 201 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
240 241 242 243 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 240 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.BulkEligibilityInstance #{values}>" end |
#request_id ⇒ String
Returns The SID of the bulk eligibility check that you want to know about.
183 184 185 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 183 def request_id @properties['request_id'] end |
#results ⇒ Array<Hash>
Returns The result set that contains the eligibility check response for each requested number, each result has at least the following attributes: phone_number: The requested phone number ,hosting_account_sid: The account sid where the phone number will be hosted, country: Phone number’s country, eligibility_status: Indicates the eligibility status of the PN (Eligible/Ineligible), eligibility_sub_status: Indicates the sub status of the eligibility , ineligibility_reason: Reason for number’s ineligibility (if applicable), next_step: Suggested next step in the hosting process based on the eligibility status.
195 196 197 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 195 def results @properties['results'] end |
#status ⇒ String
Returns This is the status of the bulk eligibility check request. (Example: COMPLETE, IN_PROGRESS).
207 208 209 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 207 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
233 234 235 236 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 233 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Numbers.V1.BulkEligibilityInstance #{values}>" end |
#url ⇒ String
Returns This is the url of the request that you’re trying to reach out to locate the resource.
189 190 191 |
# File 'lib/twilio-ruby/rest/numbers/v1/bulk_eligibility.rb', line 189 def url @properties['url'] end |