Class: StatusCat::Checkers::Stripe
- Inherits:
-
Base
- Object
- Base
- StatusCat::Checkers::Stripe
show all
- Defined in:
- lib/status_cat/checkers/stripe.rb
Constant Summary
Constants inherited
from Base
Base::FORMAT
Instance Attribute Summary
Attributes inherited from Base
#status, #value
Instance Method Summary
collapse
Methods inherited from Base
class_to_name, #name, #to_s
Constructor Details
#initialize ⇒ Stripe
Returns a new instance of Stripe.
6
7
8
9
10
11
12
13
|
# File 'lib/status_cat/checkers/stripe.rb', line 6
def initialize
return if gem_missing?('stripe', defined?(::Stripe))
@status = fail_on_exception do
@value = account.email
test
end
end
|
Instance Method Details
#account ⇒ Object
19
20
21
|
# File 'lib/status_cat/checkers/stripe.rb', line 19
def account
return ::Stripe::Account.retrieve
end
|
#test ⇒ Object
15
16
17
|
# File 'lib/status_cat/checkers/stripe.rb', line 15
def test
return account.charge_enabled ? nil : 'Charge is not enabled'
end
|