Class: Twilio::REST::Preview::TrustedComms::BusinessContext::InsightsList::ImpressionsRateInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Preview::TrustedComms::BusinessContext::InsightsList::ImpressionsRateInstance
- 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
-
#account_sid ⇒ String
Account Sid.
-
#business_sid ⇒ String
Business Sid.
-
#context ⇒ ImpressionsRateContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#end_ ⇒ Time
The end date that for this Impressions Rate.
-
#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, payload, business_sid: nil) ⇒ ImpressionsRateInstance
constructor
Initialize the ImpressionsRateInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#interval ⇒ impressions_rate.Intervals
The Interval of this Impressions Rate.
-
#reports ⇒ Hash
Values of Impressions Rate per interval.
-
#start ⇒ Time
The start date that for this Impressions Rate.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, business_sid: nil) ⇒ ImpressionsRateInstance
Initialize the ImpressionsRateInstance
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 142 def initialize(version, payload, business_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'business_sid' => payload['business_sid'], 'end_' => Twilio.deserialize_iso8601_datetime(payload['end']), 'interval' => payload['interval'], 'reports' => payload['reports'], 'start' => Twilio.deserialize_iso8601_datetime(payload['start']), 'url' => payload['url'], } # Context @instance_context = nil @params = {'business_sid' => business_sid, } end |
Instance Method Details
#account_sid ⇒ String
Returns Account Sid.
174 175 176 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 174 def account_sid @properties['account_sid'] end |
#business_sid ⇒ String
Returns Business Sid.
180 181 182 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 180 def business_sid @properties['business_sid'] end |
#context ⇒ ImpressionsRateContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
165 166 167 168 169 170 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 165 def context unless @instance_context @instance_context = ImpressionsRateContext.new(@version, @params['business_sid'], ) end @instance_context end |
#end_ ⇒ Time
Returns The end date that for this Impressions Rate.
186 187 188 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 186 def end_ @properties['end_'] end |
#fetch(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset) ⇒ ImpressionsRateInstance
Fetch the ImpressionsRateInstance
229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 229 def fetch(brand_sid: :unset, branded_channel_sid: :unset, phone_number_sid: :unset, country: :unset, start: :unset, end_: :unset, interval: :unset) context.fetch( brand_sid: brand_sid, branded_channel_sid: branded_channel_sid, phone_number_sid: phone_number_sid, country: country, start: start, end_: end_, interval: interval, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
250 251 252 253 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 250 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.ImpressionsRateInstance #{values}>" end |
#interval ⇒ impressions_rate.Intervals
Returns The Interval of this Impressions Rate.
192 193 194 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 192 def interval @properties['interval'] end |
#reports ⇒ Hash
Returns Values of Impressions Rate per interval.
198 199 200 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 198 def reports @properties['reports'] end |
#start ⇒ Time
Returns The start date that for this Impressions Rate.
204 205 206 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 204 def start @properties['start'] end |
#to_s ⇒ Object
Provide a user friendly representation
243 244 245 246 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 243 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Preview.TrustedComms.ImpressionsRateInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
210 211 212 |
# File 'lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb', line 210 def url @properties['url'] end |