test/test_data.rb in stripe-1.55.0 vs test/test_data.rb in stripe-1.55.1
- old
+ new
@@ -275,10 +275,28 @@
:customer => "c_test_customer",
:id => 's_test_subscription'
}.merge(params)
end
+ def make_subscription_item(params = {})
+ plan = params.delete(:plan) || 'gold'
+ {
+ :id => "si_test_subscription_item",
+ :object => "subscription_item",
+ :created => 1473875521,
+ :plan => {
+ :id => plan,
+ :object => "plan",
+ :amount => 1000,
+ :created => 1468349629,
+ :currency => "usd",
+ :interval => "month",
+ },
+ :quantity => 1
+ }.merge(params)
+ end
+
def make_refund(params = {})
{
:object => 'refund',
:amount => 30,
:currency => "usd",
@@ -292,9 +310,17 @@
def make_subscription_array
{
:data => [make_subscription, make_subscription, make_subscription],
:object => 'list',
:resource_url => '/v1/subscriptions'
+ }
+ end
+
+ def make_subscription_item_array
+ {
+ :data => [make_subscription_item, make_subscription_item, make_subscription_item],
+ :object => 'list',
+ :resource_url => '/v1/subscription_items'
}
end
def make_customer_subscription_array(customer_id)
{