Module: SlackRubyBotServer::Stripe::Config

Extended by:
Config
Included in:
Config
Defined in:
lib/slack-ruby-bot-server-stripe/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#root_urlObject

Returns the value of attribute root_url.



19
20
21
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 19

def root_url
  @root_url
end

#stripe_api_keyObject

Returns the value of attribute stripe_api_key.



8
9
10
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 8

def stripe_api_key
  @stripe_api_key
end

#stripe_api_publishable_keyObject

Returns the value of attribute stripe_api_publishable_key.



15
16
17
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 15

def stripe_api_publishable_key
  @stripe_api_publishable_key
end

#subscription_plan_amountObject

Returns the value of attribute subscription_plan_amount.



17
18
19
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 17

def subscription_plan_amount
  @subscription_plan_amount
end

#subscription_plan_idObject

Returns the value of attribute subscription_plan_id.



16
17
18
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 16

def subscription_plan_id
  @subscription_plan_id
end

#trial_durationObject

Returns the value of attribute trial_duration.



18
19
20
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 18

def trial_duration
  @trial_duration
end

Instance Method Details

#reset!Object



21
22
23
24
25
26
27
28
# File 'lib/slack-ruby-bot-server-stripe/config.rb', line 21

def reset!
  self.stripe_api_publishable_key = ENV['STRIPE_API_PUBLISHABLE_KEY']
  self.stripe_api_key = ENV['STRIPE_API_KEY']
  self.subscription_plan_id = ENV['STRIPE_SUBSCRIPTION_PLAN_ID']
  self.subscription_plan_amount = -1
  self.root_url = ENV['URL']
  self.trial_duration = 2.weeks
end