Sha256: cff72f257155ad3ef139635fa98d145812ec553f86f825b2ea67c55d4b03e746
Contents?: true
Size: 666 Bytes
Versions: 1
Compression:
Stored size: 666 Bytes
Contents
# frozen_string_literal: true module Cetustek class Configuration attr_accessor :environment, :site_id, :username, :password def initialize @environment = :sandbox end def url if @environment == :production 'https://www.ei.com.tw/InvoiceMultiWeb/InvoiceAPI?wsdl' else 'https://invoice.cetustek.com.tw/InvoiceMultiWeb/InvoiceAPI?wsdl' end end def production? @environment == :production end def sandbox? @environment == :sandbox end end class << self def configure yield(config) end def config @config ||= Configuration.new end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cetustek-0.2.0 | lib/cetustek/configuration.rb |