Module: Piggybak::Config
- Defined in:
- lib/piggybak/config.rb
Class Attribute Summary collapse
-
.activemerchant_mode ⇒ Object
Returns the value of attribute activemerchant_mode.
-
.additional_line_item_attributes ⇒ Object
Returns the value of attribute additional_line_item_attributes.
-
.default_country ⇒ Object
Returns the value of attribute default_country.
-
.email_sender ⇒ Object
Returns the value of attribute email_sender.
-
.extra_abilities ⇒ Object
Returns the value of attribute extra_abilities.
-
.extra_secure_paths ⇒ Object
Returns the value of attribute extra_secure_paths.
-
.line_item_types ⇒ Object
Returns the value of attribute line_item_types.
-
.logging ⇒ Object
Returns the value of attribute logging.
-
.logging_file ⇒ Object
Returns the value of attribute logging_file.
-
.manage_classes ⇒ Object
Returns the value of attribute manage_classes.
-
.order_cc ⇒ Object
Returns the value of attribute order_cc.
-
.payment_calculators ⇒ Object
Returns the value of attribute payment_calculators.
-
.secure_checkout ⇒ Object
Returns the value of attribute secure_checkout.
-
.secure_prefix ⇒ Object
Returns the value of attribute secure_prefix.
-
.shipping_calculators ⇒ Object
Returns the value of attribute shipping_calculators.
-
.tax_calculators ⇒ Object
Returns the value of attribute tax_calculators.
-
.whois_url ⇒ Object
Returns the value of attribute whois_url.
Class Method Summary collapse
Class Attribute Details
.activemerchant_mode ⇒ Object
Returns the value of attribute activemerchant_mode.
8 9 10 |
# File 'lib/piggybak/config.rb', line 8 def activemerchant_mode @activemerchant_mode end |
.additional_line_item_attributes ⇒ Object
Returns the value of attribute additional_line_item_attributes.
20 21 22 |
# File 'lib/piggybak/config.rb', line 20 def additional_line_item_attributes @additional_line_item_attributes end |
.default_country ⇒ Object
Returns the value of attribute default_country.
7 8 9 |
# File 'lib/piggybak/config.rb', line 7 def default_country @default_country end |
.email_sender ⇒ Object
Returns the value of attribute email_sender.
9 10 11 |
# File 'lib/piggybak/config.rb', line 9 def email_sender @email_sender end |
.extra_abilities ⇒ Object
Returns the value of attribute extra_abilities.
19 20 21 |
# File 'lib/piggybak/config.rb', line 19 def extra_abilities @extra_abilities end |
.extra_secure_paths ⇒ Object
Returns the value of attribute extra_secure_paths.
17 18 19 |
# File 'lib/piggybak/config.rb', line 17 def extra_secure_paths @extra_secure_paths end |
.line_item_types ⇒ Object
Returns the value of attribute line_item_types.
14 15 16 |
# File 'lib/piggybak/config.rb', line 14 def line_item_types @line_item_types end |
.logging ⇒ Object
Returns the value of attribute logging.
11 12 13 |
# File 'lib/piggybak/config.rb', line 11 def logging @logging end |
.logging_file ⇒ Object
Returns the value of attribute logging_file.
12 13 14 |
# File 'lib/piggybak/config.rb', line 12 def logging_file @logging_file end |
.manage_classes ⇒ Object
Returns the value of attribute manage_classes.
18 19 20 |
# File 'lib/piggybak/config.rb', line 18 def manage_classes @manage_classes end |
.order_cc ⇒ Object
Returns the value of attribute order_cc.
10 11 12 |
# File 'lib/piggybak/config.rb', line 10 def order_cc @order_cc end |
.payment_calculators ⇒ Object
Returns the value of attribute payment_calculators.
4 5 6 |
# File 'lib/piggybak/config.rb', line 4 def payment_calculators @payment_calculators end |
.secure_checkout ⇒ Object
Returns the value of attribute secure_checkout.
15 16 17 |
# File 'lib/piggybak/config.rb', line 15 def secure_checkout @secure_checkout end |
.secure_prefix ⇒ Object
Returns the value of attribute secure_prefix.
16 17 18 |
# File 'lib/piggybak/config.rb', line 16 def secure_prefix @secure_prefix end |
.shipping_calculators ⇒ Object
Returns the value of attribute shipping_calculators.
5 6 7 |
# File 'lib/piggybak/config.rb', line 5 def shipping_calculators @shipping_calculators end |
.tax_calculators ⇒ Object
Returns the value of attribute tax_calculators.
6 7 8 |
# File 'lib/piggybak/config.rb', line 6 def tax_calculators @tax_calculators end |
.whois_url ⇒ Object
Returns the value of attribute whois_url.
13 14 15 |
# File 'lib/piggybak/config.rb', line 13 def whois_url @whois_url end |
Class Method Details
.reset ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/piggybak/config.rb', line 22 def reset @manage_classes = ["::Piggybak::Sellable", "::Piggybak::ShippingMethod", "::Piggybak::PaymentMethod", "::Piggybak::TaxMethod", "::Piggybak::State", "::Piggybak::Country", "::Piggybak::Order"] @extra_abilities = [] @email_sender = "[email protected]" @order_cc = nil @payment_calculators = ["::Piggybak::PaymentCalculator::Fake", "::Piggybak::PaymentCalculator::AuthorizeNet"] @shipping_calculators = ["::Piggybak::ShippingCalculator::FlatRate", "::Piggybak::ShippingCalculator::Free", "::Piggybak::ShippingCalculator::Range"] @tax_calculators = ["::Piggybak::TaxCalculator::Percent"] @line_item_types = { :sellable => { :visible => true, :fields => ["sellable_id", "quantity"], :allow_destroy => true, :sort => 1 }, :payment => { :visible => true, :nested_attrs => true, :fields => ["payment"], :allow_destroy => false, :class_name => "::Piggybak::Payment", :sort => 5 }, :shipment => { :visible => true, :nested_attrs => true, :fields => ["shipment"], :allow_destroy => true, :class_name => "::Piggybak::Shipment", :sort => 2 }, :adjustment => { :visible => true, :fields => ["description", "price"], :allow_destroy => true, :sort => 4 }, :tax => { :visible => false, :allow_destroy => false, :sort => 3 } } @default_country = "US" @activemerchant_mode = :test @logging = false @logging_file = "/log/orders.log" @whois_url = nil @secure_checkout = false @secure_prefix = '' @extra_secure_paths = [] @additional_line_item_attributes = {} end |