Class: RSpecStripe::Factory::Customer
- Inherits:
-
Struct
- Object
- Struct
- RSpecStripe::Factory::Customer
- Defined in:
- lib/rspec-stripe/factories/customer.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/rspec-stripe/factories/customer.rb', line 2 def id @id end |
Instance Method Details
#cleanup ⇒ Object
15 16 17 |
# File 'lib/rspec-stripe/factories/customer.rb', line 15 def cleanup get.delete if @should_delete end |
#get ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/rspec-stripe/factories/customer.rb', line 3 def get @get ||= begin if id == :new || id == true @should_delete = true Stripe::Customer.create else @should_delete = false Stripe::Customer.retrieve(id) end end end |