Sha256: ae6fe33564dd703190fef13c644cc8beeb39b25f43548a7d1346cf9e89736660

Contents?: true

Size: 550 Bytes

Versions: 2

Compression:

Stored size: 550 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'
    
    attr_accessor :from, :to, :product_token, :endpoint, :path
    
    alias :'api_key=' :'product_token='  
    
    def endpoint
      @endpoint || ENDPOINT
    end
    
    def path
      @path || PATH
    end
    
    def defaults
      @defaults ||= { from: from, to: to }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cm-sms-0.1.1 lib/cm_sms/configuration.rb
cm-sms-0.1.0 lib/cm_sms/configuration.rb