Class: Mailersend::SMSActivity
- Inherits:
-
Object
- Object
- Mailersend::SMSActivity
- Defined in:
- lib/mailersend/sms_activity/sms_activity.rb
Overview
SMS Activity endpoint from MailerSend API.
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#page ⇒ Object
Returns the value of attribute page.
Instance Method Summary collapse
-
#initialize(client = Mailersend::Client.new) ⇒ SMSActivity
constructor
A new instance of SMSActivity.
- #list(page: nil, limit: nil) ⇒ Object
Constructor Details
#initialize(client = Mailersend::Client.new) ⇒ SMSActivity
Returns a new instance of SMSActivity.
10 11 12 13 14 |
# File 'lib/mailersend/sms_activity/sms_activity.rb', line 10 def initialize(client = Mailersend::Client.new) @client = client @page = page @limit = limit end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
6 7 8 |
# File 'lib/mailersend/sms_activity/sms_activity.rb', line 6 def client @client end |
#limit ⇒ Object
Returns the value of attribute limit.
6 7 8 |
# File 'lib/mailersend/sms_activity/sms_activity.rb', line 6 def limit @limit end |
#page ⇒ Object
Returns the value of attribute page.
6 7 8 |
# File 'lib/mailersend/sms_activity/sms_activity.rb', line 6 def page @page end |
Instance Method Details
#list(page: nil, limit: nil) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/mailersend/sms_activity/sms_activity.rb', line 16 def list(page: nil, limit: nil) hash = { 'page' => page, 'limit' => limit } client.http.get(URI::HTTPS.build(host: MAILERSEND_API_BASE_HOST, path: '/v1/sms-activity', query: URI.encode_www_form(hash))) end |