Class: Moceansdk::Modules::Message::Sms

Inherits:
AbstractClient show all
Defined in:
lib/moceansdk/modules/message/sms.rb

Instance Attribute Summary

Attributes inherited from AbstractClient

#params

Instance Method Summary collapse

Methods inherited from AbstractClient

#create, #create_final_params, #param_prefix_set?, #required_field_set?

Constructor Details

#initialize(obj_auth, transmitter) ⇒ Sms

Returns a new instance of Sms.



6
7
8
9
# File 'lib/moceansdk/modules/message/sms.rb', line 6

def initialize(obj_auth, transmitter)
  super(obj_auth, transmitter)
  @required_fields = ['mocean-api-key', 'mocean-api-secret', 'mocean-from', 'mocean-to', 'mocean-text']
end

Instance Method Details

#alt_dcs=(param) ⇒ Object



47
48
49
# File 'lib/moceansdk/modules/message/sms.rb', line 47

def alt_dcs=(param)
  @params['mocean-alt-dcs'] = param
end

#charset=(param) ⇒ Object



51
52
53
# File 'lib/moceansdk/modules/message/sms.rb', line 51

def charset=(param)
  @params['mocean-charset'] = param
end

#coding=(param) ⇒ Object



27
28
29
# File 'lib/moceansdk/modules/message/sms.rb', line 27

def coding=(param)
  @params['mocean-coding'] = param
end

#dlr_mask=(param) ⇒ Object



31
32
33
# File 'lib/moceansdk/modules/message/sms.rb', line 31

def dlr_mask=(param)
  @params['mocean-dlr-mask'] = param
end

#dlr_url=(param) ⇒ Object



35
36
37
# File 'lib/moceansdk/modules/message/sms.rb', line 35

def dlr_url=(param)
  @params['mocean-dlr-url'] = param
end

#from=(param) ⇒ Object



11
12
13
# File 'lib/moceansdk/modules/message/sms.rb', line 11

def from=(param)
  @params['mocean-from'] = param
end

#mclass=(param) ⇒ Object



43
44
45
# File 'lib/moceansdk/modules/message/sms.rb', line 43

def mclass=(param)
  @params['mocean-mclass'] = param
end

#resp_format=(param) ⇒ Object



59
60
61
# File 'lib/moceansdk/modules/message/sms.rb', line 59

def resp_format=(param)
  @params['mocean-resp-format'] = param
end

#schedule=(param) ⇒ Object



39
40
41
# File 'lib/moceansdk/modules/message/sms.rb', line 39

def schedule=(param)
  @params['mocean-schedule'] = param
end

#send(params = {}) ⇒ Object



63
64
65
66
67
68
69
# File 'lib/moceansdk/modules/message/sms.rb', line 63

def send(params = {})
  create(params)
  create_final_params
  required_field_set?

  @transmitter.post('/sms', @params)
end

#text=(param) ⇒ Object



19
20
21
# File 'lib/moceansdk/modules/message/sms.rb', line 19

def text=(param)
  @params['mocean-text'] = param
end

#to=(param) ⇒ Object



15
16
17
# File 'lib/moceansdk/modules/message/sms.rb', line 15

def to=(param)
  @params['mocean-to'] = param
end

#udh=(param) ⇒ Object



23
24
25
# File 'lib/moceansdk/modules/message/sms.rb', line 23

def udh=(param)
  @params['mocean-udh'] = param
end

#validity=(param) ⇒ Object



55
56
57
# File 'lib/moceansdk/modules/message/sms.rb', line 55

def validity=(param)
  @params['mocean-validity'] = param
end