Sha256: 6276cdd94490334ccaba60906322209ed91a5ae8cf5624a8e0e5d35b2c373d6d
Contents?: true
Size: 797 Bytes
Versions: 7
Compression:
Stored size: 797 Bytes
Contents
# frozen_string_literal: true module Mailersend # SMS Messages endpoint from MailerSend API. class SMSMessages attr_accessor :client, :page, :limit, :sms_message_id def initialize(client = Mailersend::Client.new) @client = client @page = page @limit = limit @sms_message_id = sms_message_id end def list(page: nil, limit: nil) hash = { 'page' => page, 'limit' => limit } client.http.get(URI::HTTPS.build(host: API_BASE_HOST, path: '/v1/sms-messages', query: URI.encode_www_form(hash))) end def get(sms_message_id:) client.http.get_single_route("#{API_URL}/sms-messages/#{sms_message_id}") end end end
Version data entries
7 entries across 7 versions & 1 rubygems