Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	src/Stripe/Infrastructure/Requestor.cs
	src/Stripe/Services/Account/StripeAccountService.cs
	src/Stripe/Services/ApplicationFees/StripeApplicationFeeService.cs
	src/Stripe/Services/Balance/StripeBalanceService.cs
	src/Stripe/Services/Cards/StripeCardService.cs
	src/Stripe/Services/Charges/StripeChargeService.cs
	src/Stripe/Services/Coupons/StripeCouponService.cs
	src/Stripe/Services/Customers/StripeCustomerService.cs
	src/Stripe/Services/Disputes/StripeDisputeService.cs
	src/Stripe/Services/Events/StripeEventService.cs
	src/Stripe/Services/InvoiceItems/StripeInvoiceItemService.cs
	src/Stripe/Services/Invoices/StripeInvoiceService.cs
	src/Stripe/Services/OAuth/StripeOAuthTokenService.cs
	src/Stripe/Services/Plans/StripePlanService.cs
	src/Stripe/Services/Recipients/StripeRecipientService.cs
	src/Stripe/Services/Refunds/StripeRefundService.cs
	src/Stripe/Services/StripeService.cs
	src/Stripe/Services/Subscriptions/StripeSubscriptionService.cs
	src/Stripe/Services/Tokens/StripeTokenService.cs
	src/Stripe/Services/Transfers/StripeTransferService.cs
  • Loading branch information
aidanbebbington committed Aug 8, 2015
2 parents 34f25ae + cb79f17 commit ea0930f
Show file tree
Hide file tree
Showing 99 changed files with 1,145 additions and 906 deletions.
2 changes: 1 addition & 1 deletion Stripe.net.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<id>Stripe.net</id>
<version>3.0.2</version>
<version>4.2.0</version>
<authors>Jayme Davis</authors>
<owners>Jayme Davis</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand Down
2 changes: 1 addition & 1 deletion rakefile.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'albacore'

VERSION = "3.0.2"
VERSION = "4.2.0"

task :default => [:build35, :build40, :output35, :output40]

Expand Down
254 changes: 152 additions & 102 deletions readme.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion run_tests.bat

This file was deleted.

2 changes: 1 addition & 1 deletion src/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
[assembly: AssemblyCompany("Jayme Davis")]
[assembly: AssemblyProduct("Stripe.net")]
[assembly: AssemblyCopyright("Copyright (C) Jayme Davis 2015")]
[assembly: AssemblyVersion("3.0.2")]
[assembly: AssemblyVersion("4.2.0")]
12 changes: 3 additions & 9 deletions src/Stripe.Tests/Stripe.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
<Reference Include="Machine.Specifications.Should">
<HintPath>..\packages\Machine.Specifications.Should.0.7.2\lib\net40\Machine.Specifications.Should.dll</HintPath>
</Reference>
<Reference Include="NCrunch.Framework, Version=2.8.0.34, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\NCrunch.Framework.2.8.0.34\lib\NCrunch.Framework.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.6\lib\net40\Newtonsoft.Json.dll</HintPath>
Expand All @@ -73,11 +69,11 @@
<Compile Include="balance\when_listing_balancetransactions.cs" />
<Compile Include="balance\when_listing_balancetransactions_for_charge.cs" />
<Compile Include="balance\when_retrieving_a_balance.cs" />
<Compile Include="idempotency\when_creating_a_charge_with_a_card_and_idempotency_key.cs" />
<Compile Include="charges\charge_behaviors.cs" />
<Compile Include="charges\when_capturing_a_charge_with_a_card.cs" />
<Compile Include="charges\when_creating_a_charge_with_a_customer_expanded.cs" />
<Compile Include="charges\when_getting_a_disputed_charge.cs" />
<Compile Include="charges\when_listing_charges_by_date.cs" />
<Compile Include="charges\when_listing_charges_with_expanded_properties.cs" />
<Compile Include="charges\when_listing_charges_with_paging.cs" />
<Compile Include="charges\when_setting_a_charge_to_capture.cs" />
Expand All @@ -86,6 +82,8 @@
<Compile Include="charges\when_listing_charges_for_customer.cs" />
<Compile Include="charges\when_listing_charges.cs" />
<Compile Include="charges\when_creating_a_charge_with_an_api_key.cs" />
<Compile Include="connect\when_listing_subscriptions_on_another_account.cs" />
<Compile Include="connect\when_authorizing_an_account.cs" />
<Compile Include="coupons\when_creating_a_coupon_with_amount_off.cs" />
<Compile Include="coupons\when_creating_a_coupon_with_an_api_key.cs" />
<Compile Include="customers\when_creating_a_customer_with_a_defaultcard_expanded.cs" />
Expand Down Expand Up @@ -129,7 +127,6 @@
<Compile Include="refunds\when_partially_refunding_a_charge.cs" />
<Compile Include="refunds\when_refunding_a_charge.cs" />
<Compile Include="requestor\when_creating_a_request.cs" />
<Compile Include="requestor\when_requesting_an_old_api_version.cs" />
<Compile Include="requestor\when_requesting_a_mismatched_certificate.cs" />
<Compile Include="subscriptions\when_changing_a_subscription_plan.cs" />
<Compile Include="subscriptions\when_creating_a_subscription.cs" />
Expand All @@ -140,7 +137,6 @@
<Compile Include="subscriptions\when_listing_subscriptions.cs" />
<Compile Include="subscriptions\when_updating_trial_end_date_subscription.cs" />
<Compile Include="subscriptions\when_updating_trial_end_of_subscription.cs" />
<Compile Include="tokens\when_creating_a_token_with_a_customer.cs" />
<Compile Include="tokens\when_creating_a_token_with_an_api_key.cs" />
<Compile Include="transfers\test_data\stripe_transfer_create_options.cs" />
<Compile Include="transfers\transfer_behaviors.cs" />
Expand All @@ -163,7 +159,6 @@
<Compile Include="coupons\when_deleting_a_coupon.cs" />
<Compile Include="coupons\coupon_behaviors.cs" />
<Compile Include="coupons\when_listing_coupons.cs" />
<Compile Include="customers\when_creating_a_customer_with_a_token.cs" />
<Compile Include="customers\test_data\stripe_customer_update_options.cs" />
<Compile Include="customers\when_updating_a_customer.cs" />
<Compile Include="customers\when_deleting_a_customer.cs" />
Expand Down Expand Up @@ -192,7 +187,6 @@
<Compile Include="customers\test_data\stripe_customer_create_options.cs" />
<Compile Include="plans\when_creating_a_plan.cs" />
<Compile Include="customers\when_creating_a_customer.cs" />
<Compile Include="oauth\when_creating_an_invalid_oauth_token_request.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Stripe\Stripe.csproj">
Expand Down
44 changes: 22 additions & 22 deletions src/Stripe.Tests/card_behaviors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,40 @@ public class card_behaviors
StripeCustomer.LiveMode.ShouldEqual(false);

It should_have_an_id = () =>
StripeCustomer.StripeCardList.StripeCards.First().Id.ShouldNotBeNull();
StripeCustomer.SourceList.Data.First().Id.ShouldNotBeNull();

It should_have_the_correct_card_address_line_1 = () =>
StripeCustomer.StripeCardList.StripeCards.First().AddressLine1.ShouldEqual(StripeCard.AddressLine1);
It should_have_the_correct_source_address_line_1 = () =>
StripeCustomer.SourceList.Data.First().AddressLine1.ShouldEqual(StripeCard.AddressLine1);

It should_have_the_correct_card_address_line_2 = () =>
StripeCustomer.StripeCardList.StripeCards.First().AddressLine2.ShouldEqual(StripeCard.AddressLine2);
It should_have_the_correct_source_address_line_2 = () =>
StripeCustomer.SourceList.Data.First().AddressLine2.ShouldEqual(StripeCard.AddressLine2);

It should_have_the_correct_card_address_state = () =>
StripeCustomer.StripeCardList.StripeCards.First().AddressState.ShouldEqual(StripeCard.AddressState);
It should_have_the_correct_source_address_state = () =>
StripeCustomer.SourceList.Data.First().AddressState.ShouldEqual(StripeCard.AddressState);

It should_have_the_correct_card_address_zip = () =>
StripeCustomer.StripeCardList.StripeCards.First().AddressZip.ShouldEqual(StripeCard.AddressZip);
It should_have_the_correct_source_address_zip = () =>
StripeCustomer.SourceList.Data.First().AddressZip.ShouldEqual(StripeCard.AddressZip);

It should_have_the_correct_card_last_4 = () =>
StripeCustomer.StripeCardList.StripeCards.First().Last4.ShouldEqual(StripeCard.Last4.ShouldEqual(StripeCard.Last4));
It should_have_the_correct_source_last_4 = () =>
StripeCustomer.SourceList.Data.First().Last4.ShouldEqual(StripeCard.Last4.ShouldEqual(StripeCard.Last4));

It should_have_the_correct_card_expiration_month = () =>
StripeCustomer.StripeCardList.StripeCards.First().ExpirationMonth.ShouldEqual(StripeCard.ExpirationMonth);
It should_have_the_correct_source_expiration_month = () =>
StripeCustomer.SourceList.Data.First().ExpirationMonth.ShouldEqual(StripeCard.ExpirationMonth);

It should_have_the_correct_card_expiration_year = () =>
StripeCustomer.StripeCardList.StripeCards.First().ExpirationYear.ShouldEqual(StripeCard.ExpirationYear);
It should_have_the_correct_source_expiration_year = () =>
StripeCustomer.SourceList.Data.First().ExpirationYear.ShouldEqual(StripeCard.ExpirationYear);

It should_have_the_correct_card_name = () =>
StripeCustomer.StripeCardList.StripeCards.First().Name.ShouldEqual(StripeCard.Name);
It should_have_the_correct_source_name = () =>
StripeCustomer.SourceList.Data.First().Name.ShouldEqual(StripeCard.Name);

It should_have_the_correct_card_type = () =>
StripeCustomer.StripeCardList.StripeCards.First().Brand.ShouldEqual("Visa");
It should_have_the_correct_source_type = () =>
StripeCustomer.SourceList.Data.First().Brand.ShouldEqual("Visa");

It should_have_a_fingerprint = () =>
StripeCustomer.StripeCardList.StripeCards.First().Fingerprint.ShouldNotBeNull();
StripeCustomer.SourceList.Data.First().Fingerprint.ShouldNotBeNull();

It should_have_the_correct_card_country = () =>
StripeCustomer.StripeCardList.StripeCards.First().Country.ShouldEqual("US");
It should_have_the_correct_source_country = () =>
StripeCustomer.SourceList.Data.First().Country.ShouldEqual("US");

It should_have_the_correct_coupon_id = () =>
StripeCustomer.StripeDiscount.StripeCoupon.Id.ShouldEqual(StripeCoupon.Id);
Expand Down
44 changes: 22 additions & 22 deletions src/Stripe.Tests/charges/charge_behaviors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,37 @@ public class charge_behaviors
It should_have_the_correct_failure_message = () =>
StripeCharge.FailureMessage.ShouldBeNull();

It should_have_the_correct_card_address_line_1 = () =>
StripeCharge.StripeCard.AddressLine1.ShouldEqual(StripeCard.AddressLine1);
It should_have_the_correct_source_address_line_1 = () =>
StripeCharge.Source.AddressLine1.ShouldEqual(StripeCard.AddressLine1);

It should_have_the_correct_card_address_line_2 = () =>
StripeCharge.StripeCard.AddressLine2.ShouldEqual(StripeCard.AddressLine2);
It should_have_the_correct_source_address_line_2 = () =>
StripeCharge.Source.AddressLine2.ShouldEqual(StripeCard.AddressLine2);

It should_have_the_correct_card_address_city = () =>
StripeCharge.StripeCard.AddressCity.ShouldEqual(StripeCard.AddressCity);
It should_have_the_correct_source_address_city = () =>
StripeCharge.Source.AddressCity.ShouldEqual(StripeCard.AddressCity);

It should_have_the_correct_card_address_state = () =>
StripeCharge.StripeCard.AddressState.ShouldEqual(StripeCard.AddressState);
It should_have_the_correct_source_address_state = () =>
StripeCharge.Source.AddressState.ShouldEqual(StripeCard.AddressState);

It should_have_the_correct_card_address_zip = () =>
StripeCharge.StripeCard.AddressZip.ShouldEqual(StripeCard.AddressZip);
It should_have_the_correct_source_address_zip = () =>
StripeCharge.Source.AddressZip.ShouldEqual(StripeCard.AddressZip);

It should_have_the_correct_card_last_4 = () =>
StripeCharge.StripeCard.Last4.ShouldEqual(StripeCard.Last4.ShouldEqual(StripeCard.Last4));
It should_have_the_correct_source_last_4 = () =>
StripeCharge.Source.Last4.ShouldEqual(StripeCard.Last4.ShouldEqual(StripeCard.Last4));

It should_have_the_correct_card_expiration_month = () =>
StripeCharge.StripeCard.ExpirationMonth.ShouldEqual(StripeCard.ExpirationMonth);
It should_have_the_correct_source_expiration_month = () =>
StripeCharge.Source.ExpirationMonth.ShouldEqual(StripeCard.ExpirationMonth);

It should_have_the_correct_card_expiration_year = () =>
StripeCharge.StripeCard.ExpirationYear.ShouldEqual(StripeCard.ExpirationYear);
It should_have_the_correct_source_expiration_year = () =>
StripeCharge.Source.ExpirationYear.ShouldEqual(StripeCard.ExpirationYear);

It should_have_the_correct_card_name = () =>
StripeCharge.StripeCard.Name.ShouldEqual(StripeCard.Name);
It should_have_the_correct_source_name = () =>
StripeCharge.Source.Name.ShouldEqual(StripeCard.Name);

It should_have_the_correct_card_type = () =>
StripeCharge.StripeCard.Brand.ShouldEqual("Visa");
It should_have_the_correct_source_type = () =>
StripeCharge.Source.Brand.ShouldEqual("Visa");

It should_have_the_correct_card_country = () =>
StripeCharge.StripeCard.Country.ShouldEqual("US");
It should_have_the_correct_source_country = () =>
StripeCharge.Source.Country.ShouldEqual("US");
}
}
78 changes: 39 additions & 39 deletions src/Stripe.Tests/charges/test_data/stripe_charge_create_options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ public static class stripe_charge_create_options
{
public static StripeChargeCreateOptions ValidCard()
{
var cardOptions = new StripeCreditCardOptions()
var cardOptions = new StripeSourceOptions()
{
CardAddressCountry = "US",
CardAddressLine1 = "24 Beef Flank St",
CardAddressLine2 = "Apt 24",
CardAddressCity = "BIGGIE",
CardAddressState = "NC",
CardAddressZip = "27617",
CardCvc = "1223",
CardExpirationMonth = "10",
CardExpirationYear = "2021",
CardName = "Joe Meatballs",
CardNumber = "4000000000000077",
AddressCountry = "US",
AddressLine1 = "24 Beef Flank St",
AddressLine2 = "Apt 24",
AddressCity = "BIGGIE",
AddressState = "NC",
AddressZip = "27617",
Cvc = "1223",
ExpirationMonth = "10",
ExpirationYear = "2021",
Name = "Joe Meatballs",
Number = "4000000000000077",
};

return new StripeChargeCreateOptions()
{
Card = cardOptions,
Source = cardOptions,
Description = "Joe Meatball Charge",
Amount = 5153,
Currency = "usd",
Expand All @@ -36,24 +36,24 @@ public static StripeChargeCreateOptions ValidCard()

public static StripeChargeCreateOptions DisputedCard()
{
var cardOptions = new StripeCreditCardOptions()
var cardOptions = new StripeSourceOptions()
{
CardAddressCountry = "US",
CardAddressLine1 = "24 Beef Flank St",
CardAddressLine2 = "Apt 24",
CardAddressCity = "BIGGIE",
CardAddressState = "NC",
CardAddressZip = "27617",
CardCvc = "1223",
CardExpirationMonth = "10",
CardExpirationYear = "2021",
CardName = "Joe Meatballs",
CardNumber = "4000000000000259",
AddressCountry = "US",
AddressLine1 = "24 Beef Flank St",
AddressLine2 = "Apt 24",
AddressCity = "BIGGIE",
AddressState = "NC",
AddressZip = "27617",
Cvc = "1223",
ExpirationMonth = "10",
ExpirationYear = "2021",
Name = "Joe Meatballs",
Number = "4000000000000259",
};

return new StripeChargeCreateOptions()
{
Card = cardOptions,
Source = cardOptions,
Description = "Joe Meatball Charge",
Amount = 5153,
Currency = "usd",
Expand All @@ -67,23 +67,23 @@ public static StripeChargeCreateOptions DisputedCard()

public static StripeChargeCreateOptions InvalidCard()
{
var cardOptions = new StripeCreditCardOptions()
var cardOptions = new StripeSourceOptions()
{
CardAddressCountry = "US",
CardAddressLine1 = "24 Poopie St",
CardAddressCity = "Yeehaw Beebop ChickyChicky",
CardAddressState = "NC",
CardAddressZip = "90210",
CardCvc = "1223",
CardExpirationMonth = "10",
CardExpirationYear = "2004",
CardName = "Joe Meatballs",
CardNumber = "425221"
AddressCountry = "US",
AddressLine1 = "24 Poopie St",
AddressCity = "Yeehaw Beebop ChickyChicky",
AddressState = "NC",
AddressZip = "90210",
Cvc = "1223",
ExpirationMonth = "10",
ExpirationYear = "2004",
Name = "Joe Meatballs",
Number = "425221"
};

return new StripeChargeCreateOptions()
{
Card = cardOptions,
Source = cardOptions,
Description = "Joe Meatball Charge",
Amount = 5153,
Currency = "usd"
Expand All @@ -107,7 +107,7 @@ public static StripeChargeCreateOptions ValidToken(string _tokenId)
{
Amount = 2001,
Currency = "usd",
Card = new StripeCreditCardOptions() { TokenId = _tokenId }
Source = new StripeSourceOptions() { TokenId = _tokenId }
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class when_creating_a_charge_with_a_card
Because of = () =>
{
StripeCharge = _stripeChargeService.Create(StripeChargeCreateOptions);
StripeCard = StripeCharge.StripeCard;
StripeCard = StripeCharge.Source;
};

Behaves_like<charge_behaviors> behaviors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class when_creating_a_charge_with_a_customer
Because of = () =>
{
StripeCharge = _stripeChargeService.Create(StripeChargeCreateOptions);
StripeCard = _stripeCustomer.StripeCardList.StripeCards.First();
StripeCard = _stripeCustomer.SourceList.Data.First();
};

It should_have_the_customerid = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class when_creating_a_charge_with_a_customer_expanded
Because of = () =>
{
StripeCharge = _stripeChargeService.Create(StripeChargeCreateOptions);
StripeCard = _stripeCustomer.StripeCardList.StripeCards.First();
StripeCard = _stripeCustomer.SourceList.Data.First();
};

It should_have_the_customerid = () =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class when_creating_a_charge_with_an_api_key
Because of = () =>
{
StripeCharge = _stripeChargeService.Create(StripeChargeCreateOptions);
StripeCard = StripeCharge.StripeCard;
StripeCard = StripeCharge.Source;
};

Behaves_like<charge_behaviors> behaviors;
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.Tests/charges/when_getting_a_charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class when_getting_a_charge
Because of = () =>
{
StripeCharge = _stripeChargeService.Get(_createdStripeChargeId);
StripeCard = StripeCharge.StripeCard;
StripeCard = StripeCharge.Source;
};

Behaves_like<charge_behaviors> behaviors;
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.Tests/charges/when_getting_a_disputed_charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class when_getting_a_disputed_charge
do
{
StripeCharge = _stripeChargeService.Get(_createdStripeChargeId);
StripeCard = StripeCharge.StripeCard;
StripeCard = StripeCharge.Source;
if (StripeCharge.Dispute != null) break;
Thread.Sleep(500);
} while (stopwatch.ElapsedMilliseconds < 10000);
Expand Down
Loading

0 comments on commit ea0930f

Please sign in to comment.