Class: Twilio::REST::Preview::TrustedComms::CpsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::TrustedComms::CpsContext
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected]
Instance Method Summary collapse
-
#fetch(x_xcnam_sensitive_phone_number: :unset) ⇒ CpsInstance
Fetch the CpsInstance.
-
#initialize(version) ⇒ CpsContext
constructor
Initialize the CpsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ CpsContext
Initialize the CpsContext
72 73 74 75 76 77 78 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/cps.rb', line 72 def initialize(version) super(version) # Path Solution @solution = {} @uri = "/CPS" end |
Instance Method Details
#fetch(x_xcnam_sensitive_phone_number: :unset) ⇒ CpsInstance
Fetch the CpsInstance
85 86 87 88 89 90 91 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/cps.rb', line 85 def fetch(x_xcnam_sensitive_phone_number: :unset) headers = Twilio::Values.of({'X-Xcnam-Sensitive-Phone-Number' => x_xcnam_sensitive_phone_number, }) payload = @version.fetch('GET', @uri, headers: headers) CpsInstance.new(@version, payload, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
102 103 104 105 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/cps.rb', line 102 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.CpsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
95 96 97 98 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/cps.rb', line 95 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.CpsContext #{context}>" end |