Class: Bodega::PaymentMethod::Base
- Inherits:
-
Object
- Object
- Bodega::PaymentMethod::Base
- Extended by:
- Optional
- Defined in:
- lib/bodega/payment_method/base.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#order ⇒ Object
Returns the value of attribute order.
Instance Method Summary collapse
- #checkout_url(success_url, cancel_url, params = {}) ⇒ Object
- #complete!(options = {}) ⇒ Object
-
#initialize(order) ⇒ Base
constructor
A new instance of Base.
-
#shipping? ⇒ Boolean
Does the payment method provide shipping details? If not, they’ll be editable at checkout.
Constructor Details
#initialize(order) ⇒ Base
Returns a new instance of Base.
18 19 20 |
# File 'lib/bodega/payment_method/base.rb', line 18 def initialize(order) self.order = order end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/bodega/payment_method/base.rb', line 8 def @options end |
#order ⇒ Object
Returns the value of attribute order.
8 9 10 |
# File 'lib/bodega/payment_method/base.rb', line 8 def order @order end |
Instance Method Details
#checkout_url(success_url, cancel_url, params = {}) ⇒ Object
10 11 12 |
# File 'lib/bodega/payment_method/base.rb', line 10 def checkout_url(success_url, cancel_url, params = {}) raise "Implement #{self.class.name}#checkout_url" end |
#complete!(options = {}) ⇒ Object
14 15 16 |
# File 'lib/bodega/payment_method/base.rb', line 14 def complete!( = {}) raise "Implement #{self.class.name}#complete!" end |
#shipping? ⇒ Boolean
Does the payment method provide shipping details? If not, they’ll be editable at checkout.
24 25 26 |
# File 'lib/bodega/payment_method/base.rb', line 24 def shipping? true end |