Class: RSpecStripe::Factory::Subscription
- Inherits:
-
Struct
- Object
- Struct
- RSpecStripe::Factory::Subscription
- Defined in:
- lib/rspec-stripe/factories/subscription.rb
Instance Attribute Summary collapse
-
#customer ⇒ Object
Returns the value of attribute customer.
-
#id ⇒ Object
Returns the value of attribute id.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
Instance Attribute Details
#customer ⇒ Object
Returns the value of attribute customer
2 3 4 |
# File 'lib/rspec-stripe/factories/subscription.rb', line 2 def customer @customer end |
#id ⇒ Object
Returns the value of attribute id
2 3 4 |
# File 'lib/rspec-stripe/factories/subscription.rb', line 2 def id @id end |
#metadata ⇒ Object
Returns the value of attribute metadata
2 3 4 |
# File 'lib/rspec-stripe/factories/subscription.rb', line 2 def @metadata end |
Instance Method Details
#cleanup ⇒ Object
9 10 11 |
# File 'lib/rspec-stripe/factories/subscription.rb', line 9 def cleanup get.delete end |
#get ⇒ Object
3 4 5 6 7 |
# File 'lib/rspec-stripe/factories/subscription.rb', line 3 def get @get ||= begin customer.subscriptions.create(plan: id, metadata: ) end end |