Class: MailerLite::Timezones

Inherits:
Object
  • Object
show all
Defined in:
lib/mailerlite/timezones/timezones.rb

Overview

This is a class for manipulating the Timezones from MailerLite API.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: MailerLite::Client.new) ⇒ Timezones

Inits the ‘Timezones` class with the specified `client`.

Parameters:

  • client (MailerLite::Client) (defaults to: MailerLite::Client.new)

    the ‘Client` instance to use



11
12
13
# File 'lib/mailerlite/timezones/timezones.rb', line 11

def initialize(client: MailerLite::Client.new)
  @client = client
end

Instance Attribute Details

#clientObject (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

#listHTTP::Response

Returns a list of Timezones

Returns:

  • (HTTP::Response)

    the response from the API



18
19
20
# File 'lib/mailerlite/timezones/timezones.rb', line 18

def list
  client.http.get("#{MAILERLITE_API_URL}/timezones")
end