Class: Twilio::REST::Numbers::V1::EligibilityInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/eligibility.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ EligibilityInstance

Initialize the EligibilityInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this Eligibility resource.

  • sid (String) —

    The SID of the Call resource to fetch.



129
130
131
132
133
134
135
136
137
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 129

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'results' => payload['results'],
    }
end

Instance Method Details

#inspect ⇒ Object

Provide a detailed, user friendly representation



154
155
156
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 154

def inspect
    "<Twilio.Numbers.V1.EligibilityInstance>"
end

#results ⇒ Array<Hash>

Returns The result set that contains the eligibility check response for the 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, date_last_checked: Datetime (ISO 8601) when the PN was last checked for eligibility, 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.

Returns:

  • (Array<Hash>) —

    The result set that contains the eligibility check response for the 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, date_last_checked: Datetime (ISO 8601) when the PN was last checked for eligibility, 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.



142
143
144
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 142

def results
    @properties['results']
end

#to_s ⇒ Object

Provide a user friendly representation



148
149
150
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 148

def to_s
    "<Twilio.Numbers.V1.EligibilityInstance>"
end