Class: Twilio::REST::Numbers::V2::RegulatoryComplianceList::RegulationContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Numbers::V2::RegulatoryComplianceList::RegulationContext
- Defined in:
- lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb
Instance Method Summary collapse
-
#fetch(include_constraints: :unset) ⇒ RegulationInstance
Fetch the RegulationInstance.
-
#initialize(version, sid) ⇒ RegulationContext
constructor
Initialize the RegulationContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, sid) ⇒ RegulationContext
Initialize the RegulationContext
162 163 164 165 166 167 168 169 170 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 162 def initialize(version, sid) super(version) # Path Solution @solution = { sid: sid, } @uri = "/RegulatoryCompliance/Regulations/#{@solution[:sid]}" end |
Instance Method Details
#fetch(include_constraints: :unset) ⇒ RegulationInstance
Fetch the RegulationInstance
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 175 def fetch( include_constraints: :unset ) params = Twilio::Values.of({ 'IncludeConstraints' => include_constraints, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) RegulationInstance.new( @version, payload, sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
206 207 208 209 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 206 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.RegulationContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
199 200 201 202 |
# File 'lib/twilio-ruby/rest/numbers/v2/regulatory_compliance/regulation.rb', line 199 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Numbers.V2.RegulationContext #{context}>" end |