Class: MailerLite::Timezones
- Inherits:
-
Object
- Object
- MailerLite::Timezones
- Defined in:
- lib/mailerlite/timezones/timezones.rb
Overview
This is a class for manipulating the Timezones from MailerLite API.
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
-
#initialize(client: MailerLite::Client.new) ⇒ Timezones
constructor
Inits the ‘Timezones` class with the specified `client`.
-
#list ⇒ HTTP::Response
Returns a list of Timezones.
Constructor Details
#initialize(client: MailerLite::Client.new) ⇒ Timezones
Inits the ‘Timezones` class with the specified `client`.
11 12 13 |
# File 'lib/mailerlite/timezones/timezones.rb', line 11 def initialize(client: MailerLite::Client.new) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/mailerlite/timezones/timezones.rb', line 6 def client @client end |
Instance Method Details
#list ⇒ HTTP::Response
Returns a list of Timezones
18 19 20 |
# File 'lib/mailerlite/timezones/timezones.rb', line 18 def list client.http.get("#{MAILERLITE_API_URL}/timezones") end |