Class: SpreeAvatax::Config
- Inherits:
-
Spree::Base
- Object
- Spree::Base
- SpreeAvatax::Config
- Defined in:
- app/models/spree_avatax/config.rb
Constant Summary collapse
- DEFAULT_TIMEOUT =
20
Class Attribute Summary collapse
-
.company_code ⇒ Object
Returns the value of attribute company_code.
-
.password ⇒ Object
Returns the value of attribute password.
-
.sales_invoice_cancel_error_handler ⇒ Object
Returns the value of attribute sales_invoice_cancel_error_handler.
-
.sales_invoice_commit_error_handler ⇒ Object
Returns the value of attribute sales_invoice_commit_error_handler.
-
.sales_invoice_generate_error_handler ⇒ Object
These error handlers should be objects that respond to “call” and accept an order and an exception as arguments.
-
.service_url ⇒ Object
Returns the value of attribute service_url.
-
.username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
- .enabled ⇒ Object
-
.timeout ⇒ Object
These configurations are stored in the database so that they can be updated immediately and synchronously across all servers in the event of an outage, without a redeploy or restart.
Class Attribute Details
.company_code ⇒ Object
Returns the value of attribute company_code.
8 9 10 |
# File 'app/models/spree_avatax/config.rb', line 8 def company_code @company_code end |
.password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'app/models/spree_avatax/config.rb', line 7 def password @password end |
.sales_invoice_cancel_error_handler ⇒ Object
Returns the value of attribute sales_invoice_cancel_error_handler.
15 16 17 |
# File 'app/models/spree_avatax/config.rb', line 15 def sales_invoice_cancel_error_handler @sales_invoice_cancel_error_handler end |
.sales_invoice_commit_error_handler ⇒ Object
Returns the value of attribute sales_invoice_commit_error_handler.
14 15 16 |
# File 'app/models/spree_avatax/config.rb', line 14 def sales_invoice_commit_error_handler @sales_invoice_commit_error_handler end |
.sales_invoice_generate_error_handler ⇒ Object
These error handlers should be objects that respond to “call” and accept an order and an exception as arguments. This allows you to ignore certain errors or handle them in specific ways.
13 14 15 |
# File 'app/models/spree_avatax/config.rb', line 13 def sales_invoice_generate_error_handler @sales_invoice_generate_error_handler end |
.service_url ⇒ Object
Returns the value of attribute service_url.
9 10 11 |
# File 'app/models/spree_avatax/config.rb', line 9 def service_url @service_url end |
.username ⇒ Object
Returns the value of attribute username.
6 7 8 |
# File 'app/models/spree_avatax/config.rb', line 6 def username @username end |
Class Method Details
.enabled ⇒ Object
24 25 26 |
# File 'app/models/spree_avatax/config.rb', line 24 def enabled (config = active) ? config.enabled : true end |
.timeout ⇒ Object
These configurations are stored in the database so that they can be updated immediately and synchronously across all servers in the event of an outage, without a redeploy or restart.
20 21 22 |
# File 'app/models/spree_avatax/config.rb', line 20 def timeout (config = active) ? config.timeout : DEFAULT_TIMEOUT end |