Class: SimpleRecurring::ProcessorAdapters::BaseAdapter
- Inherits:
-
Object
- Object
- SimpleRecurring::ProcessorAdapters::BaseAdapter
- Defined in:
- lib/simple_recurring/processor_adapters/base_adapter.rb
Class Method Summary collapse
-
.display_name ⇒ Object
Display name of the adapter / provider.
-
.version ⇒ Object
Version of the adapter.
Instance Method Summary collapse
-
#cancel_subscription(reference) ⇒ Object
Cancel the subscription.
-
#create_subscription(credit_card, subscription, promotions = nil) ⇒ Object
Create the subscription.
Class Method Details
.display_name ⇒ Object
Display name of the adapter / provider.
Returns: String with the display name of the adapter / provider.
32 33 34 |
# File 'lib/simple_recurring/processor_adapters/base_adapter.rb', line 32 def self.display_name raise 'Invalid Provider' end |
.version ⇒ Object
Version of the adapter.
Returns: String with version of the adapter.
40 41 42 |
# File 'lib/simple_recurring/processor_adapters/base_adapter.rb', line 40 def self.version raise 'Invalid Provider' end |
Instance Method Details
#cancel_subscription(reference) ⇒ Object
Cancel the subscription.
Params: String|Integer Reference
Returns: TRUE or FALSE determined by success
24 25 26 |
# File 'lib/simple_recurring/processor_adapters/base_adapter.rb', line 24 def cancel_subscription(reference) raise 'Invalid Provider' end |
#create_subscription(credit_card, subscription, promotions = nil) ⇒ Object
Create the subscription.
Params: SimpleRecurring::CreditCard credit_card SimpleRecurring::Subscription subscription SimpleRecurring::Promotions promotions (optional)
Returns: String|Integer Reference id or string for use in cancelling the subscription.
13 14 15 |
# File 'lib/simple_recurring/processor_adapters/base_adapter.rb', line 13 def create_subscription(credit_card, subscription, promotions = nil) raise 'Invalid Provider' end |