Class: Twilio::REST::Preview::TrustedComms::BusinessContext::InsightsList::ImpressionsRateContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Preview::TrustedComms::BusinessContext::InsightsList::ImpressionsRateContext
- Defined in:
- lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.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(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset) ⇒ ImpressionsRateInstance
Fetch the ImpressionsRateInstance.
-
#initialize(version, business_sid) ⇒ ImpressionsRateContext
constructor
Initialize the ImpressionsRateContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, business_sid) ⇒ ImpressionsRateContext
Initialize the ImpressionsRateContext
78 79 80 81 82 83 84 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 78 def initialize(version, business_sid) super(version) # Path Solution @solution = {business_sid: business_sid, } @uri = "/Businesses/#{@solution[:business_sid]}/Insights/ImpressionsRate" end |
Instance Method Details
#fetch(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset) ⇒ ImpressionsRateInstance
Fetch the ImpressionsRateInstance
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 101 def fetch(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset) params = Twilio::Values.of({ 'BrandSid' => brand_sid, 'BrandedChannelSid' => branded_channel_sid, 'PhoneNumberSid' => phone_number_sid, 'Country' => country, 'Start' => Twilio.serialize_iso8601_datetime(start), 'End' => Twilio.serialize_iso8601_datetime(end_), 'Interval' => interval, }) payload = @version.fetch('GET', @uri, params: params) ImpressionsRateInstance.new(@version, payload, business_sid: @solution[:business_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
126 127 128 129 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 126 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.ImpressionsRateContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
119 120 121 122 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 119 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Preview.TrustedComms.ImpressionsRateContext #{context}>" end |