Class: ActsAsSubscription::Subscription::Backend::DummyClient

Inherits:
Object
  • Object
show all
Defined in:
lib/acts_as_subscription/backend/dummy_client.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(user, password, product_code) ⇒ DummyClient

Returns a new instance of DummyClient.



5
6
7
# File 'lib/acts_as_subscription/backend/dummy_client.rb', line 5

def initialize(user, password, product_code)
  true
end

Instance Method Details

#cancel_subscription!(customer_code) ⇒ Object



17
18
19
# File 'lib/acts_as_subscription/backend/dummy_client.rb', line 17

def cancel_subscription!(customer_code)
  true
end

#create_subscription(options) ⇒ Object



9
10
11
# File 'lib/acts_as_subscription/backend/dummy_client.rb', line 9

def create_subscription(options)
  true
end

#plansObject



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/acts_as_subscription/backend/dummy_client.rb', line 21

def plans
  [{
    :code               =>'FREE', 
    :name               =>'Free',  
    :active             =>true, 
    :description        =>'The price is right!', 
    :billing_frequency  =>'month',
    :recurring_charge   =>0.0
  }, {
    :code               =>'PERSONAL', 
    :name               =>'Personal', 
    :active             =>true, 
    :description        =>'Single-user. can access calendars, reminders and to-dos.', 
    :billing_frequency  =>'month', 
    :recurring_charge   =>9.95
  }, {
    :code               =>'PRO', 
    :name               =>'Pro', 
    :active             =>true, 
    :description        =>'All the bells and whistles.', 
    :billing_frequency  =>'month', 
    :recurring_charge   =>19.95
  }]
end

#update_subscription(options) ⇒ Object



13
14
15
# File 'lib/acts_as_subscription/backend/dummy_client.rb', line 13

def update_subscription(options)
  true
end