Sha256: dd7a8a3db8fbd825050ba860bb734933f32f9419918c1c02ae9302d0b0e46960

Contents?: true

Size: 626 Bytes

Versions: 7

Compression:

Stored size: 626 Bytes

Contents

module CmSms
  class Configuration
    class ProductTokenMissing < ArgumentError; end
    class EndpointMissing < ArgumentError; end
    class PathMissing < ArgumentError; end
    
    ENDPOINT = 'https://sgw01.cm.nl'
    PATH     = '/gateway.ashx'
    DCS      = 0
    
    attr_accessor :from, :to, :product_token, :endpoint, :path, :dcs
    
    alias :'api_key=' :'product_token='  
    
    def endpoint
      @endpoint || ENDPOINT
    end
    
    def path
      @path || PATH
    end
    
    def dcs
      @dcs || DCS
    end
    
    def defaults
      @defaults ||= { from: from, to: to, dcs: dcs }
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cm-sms-0.2.7 lib/cm_sms/configuration.rb
cm-sms-0.2.6 lib/cm_sms/configuration.rb
cm-sms-0.2.5 lib/cm_sms/configuration.rb
cm-sms-0.2.4 lib/cm_sms/configuration.rb
cm-sms-0.2.3 lib/cm_sms/configuration.rb
cm-sms-0.2.2 lib/cm_sms/configuration.rb
cm-sms-0.2.1 lib/cm_sms/configuration.rb