Class: Malipopay::Resources::Sms

Inherits:
Object
  • Object
show all
Defined in:
lib/malipopay/resources/sms.rb

Instance Method Summary collapse

Constructor Details

#initialize(http_client) ⇒ Sms

Returns a new instance of Sms.



6
7
8
# File 'lib/malipopay/resources/sms.rb', line 6

def initialize(http_client)
  @http = http_client
end

Instance Method Details

#schedule(params) ⇒ Hash

Schedule an SMS for later delivery

Parameters:

  • params (Hash)

    Schedule parameters (to, message, senderId, scheduledAt, etc.)

Returns:

  • (Hash)

    Scheduled SMS response



27
28
29
# File 'lib/malipopay/resources/sms.rb', line 27

def schedule(params)
  @http.post("/sms/schedule", body: params)
end

#send_bulk(params) ⇒ Hash

Send bulk SMS

Parameters:

  • params (Hash)

    Bulk SMS parameters (messages array, senderId, etc.)

Returns:

  • (Hash)

    Bulk SMS response



20
21
22
# File 'lib/malipopay/resources/sms.rb', line 20

def send_bulk(params)
  @http.post("/sms/bulk", body: params)
end

#send_sms(params) ⇒ Hash

Send a single SMS

Parameters:

  • params (Hash)

    SMS parameters (to, message, senderId, etc.)

Returns:

  • (Hash)

    SMS send response



13
14
15
# File 'lib/malipopay/resources/sms.rb', line 13

def send_sms(params)
  @http.post("/sms/", body: params)
end