Class: OpenMarket::SMS::Client

Inherits:
Client
  • Object
show all
Defined in:
lib/open_market/sms/client.rb

Constant Summary collapse

BASE_URL =
'sms/v4'.freeze

Constants inherited from Client

Client::HEADERS

Instance Attribute Summary

Attributes inherited from Client

#client

Instance Method Summary collapse

Methods inherited from Client

#initialize

Constructor Details

This class inherits a constructor from OpenMarket::Client

Instance Method Details

#message_status(ticket_id:) ⇒ Object



17
18
19
20
21
# File 'lib/open_market/sms/client.rb', line 17

def message_status(ticket_id:)
  request = Requests::MessageStatus.new(ticket_id)

  SMS::Responses::MessageStatus.new(request, send_request(request))
end

#send_message(from: nil, to:, text:) ⇒ Object



11
12
13
14
15
# File 'lib/open_market/sms/client.rb', line 11

def send_message(from:nil, to:, text:)
  request = Requests::SendMessage.new(from, to, text)

  SMS::Responses::SendMessage.new(request, send_request(request))
end