Class: Roistat::Resources::Sms

Inherits:
Base
  • Object
show all
Defined in:
lib/roistat/resources/sms.rb,
sig/roistat.rbs

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Roistat::Resources::Base

Instance Method Details

#set_report_enabled(enabled:) ⇒ Object

POST /project/set-sms-report-enabled

Parameters:

  • enabled: (bool, Integer, String)

Returns:

  • (Object)


5
6
7
8
9
10
11
12
13
14
# File 'lib/roistat/resources/sms.rb', line 5

def set_report_enabled(enabled:)
  flag =
    case enabled
    when true, "1", 1 then "1"
    when false, "0", 0 then "0"
    else enabled.to_s
    end

  client.post("project/set-sms-report-enabled", body: {enabled: flag})
end