Class: StatusCat::Checkers::Stripe

Inherits:
Base
  • Object
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

#initializeStripe

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 = .email
    test
  end
end

Instance Method Details

#accountObject



19
20
21
# File 'lib/status_cat/checkers/stripe.rb', line 19

def 
  return ::Stripe::Account.retrieve
end

#testObject



15
16
17
# File 'lib/status_cat/checkers/stripe.rb', line 15

def test
  return .charge_enabled ? nil : 'Charge is not enabled'
end