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.



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/status_cat/checkers/stripe.rb', line 5

def initialize
  if !defined?( ::Stripe )
    @status = 'stripe gem not installed'
  else
    @status = fail_on_exception do
       = ::Stripe::Account.retrieve
      @value = .email
      .charge_enabled ? nil : 'Charge is not enabled'
    end
  end
end