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.



100
101
102
103
104
105
106
107
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 100

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

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



124
125
126
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 124

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

#resultsArray<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.



112
113
114
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 112

def results
    @properties['results']
end

#to_sObject

Provide a user friendly representation



118
119
120
# File 'lib/twilio-ruby/rest/numbers/v1/eligibility.rb', line 118

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