Class: Twilio::REST::Messaging::V3::MessageCostEstimateList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Messaging::V3::MessageCostEstimateList
- Defined in:
- lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb
Instance Method Summary collapse
-
#fetch(country: nil, lookback_window: nil) ⇒ MessageCostEstimateInstance
Fetch the MessageCostEstimateInstance.
-
#fetch_with_metadata(country: nil, lookback_window: nil) ⇒ MessageCostEstimateInstance
Fetch the MessageCostEstimateInstanceMetadata.
-
#initialize(version) ⇒ MessageCostEstimateList
constructor
Initialize the MessageCostEstimateList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ MessageCostEstimateList
Initialize the MessageCostEstimateList
26 27 28 29 30 31 32 33 |
# File 'lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb', line 26 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/MessageCostEstimate" end |
Instance Method Details
#fetch(country: nil, lookback_window: nil) ⇒ MessageCostEstimateInstance
Fetch the MessageCostEstimateInstance
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb', line 39 def fetch( country: nil, lookback_window: nil ) params = Twilio::Values.of({ 'country' => country, 'lookbackWindow' => lookback_window, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) MessageCostEstimateInstance.new( @version, payload, ) end |
#fetch_with_metadata(country: nil, lookback_window: nil) ⇒ MessageCostEstimateInstance
Fetch the MessageCostEstimateInstanceMetadata
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb', line 66 def ( country: nil, lookback_window: nil ) params = Twilio::Values.of({ 'country' => country, 'lookbackWindow' => lookback_window, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, params: params, headers: headers) = MessageCostEstimateInstance.new( @version, response.body, ) MessageCostEstimateInstanceMetadata.new( @version, , response.headers, response.status_code ) end |
#to_s ⇒ Object
Provide a user friendly representation
98 99 100 |
# File 'lib/twilio-ruby/rest/messaging/v3/message_cost_estimate.rb', line 98 def to_s '#<Twilio.Messaging.V3.MessageCostEstimateList>' end |