Class: Cetustek::Configuration
- Inherits:
-
Object
- Object
- Cetustek::Configuration
- Defined in:
- lib/cetustek/configuration.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
-
#logger ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
-
#password ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
-
#site_id ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
-
#username ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #production? ⇒ Boolean
- #sandbox? ⇒ Boolean
- #url ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 |
# File 'lib/cetustek/configuration.rb', line 8 def initialize @environment = :sandbox end |
Instance Attribute Details
#environment ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
6 7 8 |
# File 'lib/cetustek/configuration.rb', line 6 def environment @environment end |
#logger ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
6 7 8 |
# File 'lib/cetustek/configuration.rb', line 6 def logger @logger end |
#password ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
6 7 8 |
# File 'lib/cetustek/configuration.rb', line 6 def password @password end |
#site_id ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
6 7 8 |
# File 'lib/cetustek/configuration.rb', line 6 def site_id @site_id end |
#username ⇒ Object
logger is opt-in: nil means this gem writes nothing anywhere.
6 7 8 |
# File 'lib/cetustek/configuration.rb', line 6 def username @username end |
Instance Method Details
#production? ⇒ Boolean
20 21 22 |
# File 'lib/cetustek/configuration.rb', line 20 def production? @environment == :production end |
#sandbox? ⇒ Boolean
24 25 26 |
# File 'lib/cetustek/configuration.rb', line 24 def sandbox? @environment == :sandbox end |
#url ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/cetustek/configuration.rb', line 12 def url if @environment == :production 'https://www.ei.com.tw/InvoiceMultiWeb/InvoiceAPI?wsdl' else 'https://invoice.cetustek.com.tw/InvoiceMultiWeb/InvoiceAPI?wsdl' end end |