Class: StripeMock::TestStrategies::Mock
- Inherits:
-
Base
- Object
- Base
- StripeMock::TestStrategies::Mock
show all
- Defined in:
- lib/stripe_mock/test_strategies/mock.rb
Instance Method Summary
collapse
Methods inherited from Base
#complete_checkout_session, #create_checkout_session, #create_checkout_session_params, #create_coupon, #create_coupon_params, #create_coupon_percent_of_params, #create_plan, #create_plan_params, #create_price, #create_price_params, #create_product, #create_product_params, #delete_all_coupons, #generate_bank_token, #generate_card_token, #list_plans, #list_products, #list_subscriptions, #prepare_card_error, #retrieve_product
Instance Method Details
#delete_plan(plan_id) ⇒ Object
#delete_product(product_id) ⇒ Object
#upsert_stripe_object(object, attributes = {}) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/stripe_mock/test_strategies/mock.rb', line 21
def upsert_stripe_object(object, attributes = {})
if StripeMock.state == 'remote'
StripeMock.client.upsert_stripe_object(object, attributes)
elsif StripeMock.state == 'local'
StripeMock.instance.upsert_stripe_object(object, attributes)
end
end
|