Sha256: b089f38839e3e57a66d991f0eecf1e15cd7c82b7f45f3932e621f699f8d8cd23

Contents?: true

Size: 1.99 KB

Versions: 12

Compression:

Stored size: 1.99 KB

Contents

require_relative "../abstract"

class Sms < MoceanFactory
    
    attr_writer :flashSms 
    
    def initialize client
        super(client)
        @flashSms = false
        @required_fileds = ['mocean-api-key','mocean-api-secret','mocean-from','mocean-to','mocean-text']
    end
    
    def setFrom param
        @params['mocean-from'] = param
        return self
    end
    
    def setTo param
        @params['mocean-to'] = param
        return self
    end
    
    def setText param
        @params['mocean-text'] = param
        return self
    end
    
    def setUdh param
        @params['mocean-udh'] = param
        return self
    end
    
    def setCoding param
        @params['mocean-coding'] = param
        return self
    end
    
    def setDlrMask param
        @params['mocean-dlr-mask'] = param
        return self
    end
    
    def setDlrUrl param
        @params['mocean-dlr-url'] = param
        return self
    end
    
    def setSchedule param
        @params['mocean-schedule'] = param
        return self
    end
    
    def setMclass param
        @params['mocean-mclass'] = param
        return self
    end
    
    def setAltDcs param
        @params['mocean-alt-dcs'] = param
        return self
    end
    
    def setCharset param
        @params['mocean-charset'] = param
        return self
    end
    
    def setValidity param
        @params['mocean-validity'] = param
        return self
    end
    
    def setRespFormat param
        @params['mocean-resp-format'] = param
        return self
    end
    
    def create params = {}
        reset
        super(params)
        return self
    end
    
    def send
        if @flashSms == true
            setMclass(1)
            setAltDcs(1)
        end
        createFinalParams
        isRequiredFieldsSet
        response = Transmitter.new('/rest/1/sms','post',@params)
        return response.getResponse()
    end
    
    
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
moceansdk-0.1.7 lib/moceansdk/modules/message/sms.rb
moceansdk-0.1.6 lib/moceansdk/modules/message/sms.rb
moceansdk-0.1.5 lib/moceansdk/modules/message/sms.rb
moceansdk-0.1.4 lib/moceansdk/modules/message/sms.rb
moceansdk-0.1.3 lib/moceansdk/modules/message/sms.rb
moceansdk-0.1.2 lib/moceansdk/modules/message/sms.rb
deno92-0.1.22 lib/deno92/modules/message/sms.rb
deno92-0.1.21 lib/deno92/modules/message/sms.rb
deno92-0.1.20 lib/deno92/modules/message/sms.rb
deno92-0.1.19 lib/deno92/modules/message/sms.rb
deno92-0.1.18 lib/deno92/modules/message/sms.rb
deno92-0.1.17 lib/deno92/modules/message/sms.rb