Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

先人の知恵を拝見して決済機能を実装した / Customize Stripe to Your ...

先人の知恵を拝見して決済機能を実装した / Customize Stripe to Your Needs

ハッカーズチャンプルー2019スポンサーセッションで発表したスライド。

http://hackers-champloo.org/2019/
https://twitter.com/himajin315/status/1144811236757929985

nanophate

June 29, 2019
Tweet

More Decks by nanophate

Other Decks in Programming

Transcript

  1. Stripe::SubscriptionSchedule.update( sub_sched_id, phases: [ { plans: [ { plan: TEAM_FIXED_PLAN_ID,

    quantity: team_stripe_customer .subscription.quantity } ], start_date: sub_sched_phase.start_date, end_date: sub_sched_phase.end_date }, { plans: [ { plan: TEAM_FIXED_PLAN_ID, quantity: limit } ], start_date: Time.zone.now .next_month.beginning_of_month.to_i } ], prorate: false, renewal_behavior: 'release' )