Skip to content

Instantly share code, notes, and snippets.

View jaymedavis's full-sized avatar

Jayme Davis jaymedavis

View GitHub Profile
@jaymedavis
jaymedavis / Program.cs
Created October 13, 2017 23:17
Reading the StripeBilling Attribute
using System;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
namespace SmoothNumerator
{
class Program
{
public enum StripeBilling
@jaymedavis
jaymedavis / 0_reuse_code.js
Created April 12, 2017 17:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jaymedavis
jaymedavis / stripe.net test for prorating
Created June 13, 2016 22:25
i would expect this test to pass, because the upcoming invoice should be less than the original $5 amount
public class when_updating_a_subscription_with_proration
{
private static StripeSubscriptionService _subscriptionService;
private static StripeSubscription _subscription;
private static string _customerId;
private static string _planId;
private static StripeInvoice _upcomingInvoice;
Establish context = () =>
{
@jaymedavis
jaymedavis / charge_connect_with_token.cs
Last active April 6, 2016 14:39
creating a Stripe.net charge with a token on a connected account
var charge = new StripeChargeCreateOptions();
charge.Amount = 1223;
charge.Currency = "usd";
charge.Description = "irctc516 took all your money";
charge.SourceTokenOrExistingSourceId = *tokenId*;
var requestOptions = new StripeRequestOptions();
requestOptions.StripeConnectAccountId = "acct_*";
var completedCharge = new StripeChargeService().Create(charge, requestOptions);