1027 Commits

Author SHA1 Message Date
Brandur
592bc89688 Refactor special case serialization for clarity 2016-03-07 11:27:45 -08:00
Brandur
dd11f4b297 Remove the ugly dirty == false 2016-03-07 11:11:57 -08:00
Brandur
27ebcbb697 Revert to opts = {} and rename to method_options 2016-03-07 09:59:33 -08:00
Brandur
eba117d5e8 Kill outdated "two" 2016-03-07 09:56:08 -08:00
Brandur
06cbe6239a Improve the accuracy on the comment above Hash serialization 2016-03-04 19:26:08 -08:00
Brandur
c173f802a6 Add comment about APIResource exclusion for clarity 2016-03-04 19:24:15 -08:00
Brandur
adcb806aac Add test to check .serialize_params deprecation 2016-03-04 19:22:17 -08:00
Brandur
f215827e2f Remove uses and deprecate .serialize_params 2016-03-04 19:18:26 -08:00
Brandur
fcfef21c77 Add spec for #dirty! 2016-03-04 19:10:59 -08:00
Brandur
f723080220 Refactor serialize_params under StripeObject
This pull does two major things:

1. Refactors `serialize_params` to be more concise and readable while
   still complying to our existing test suite. Unfortunately over time
   this method has become a ball of mud that's very difficult to reason
   about, as recently evidenced by #384.
2. Moves `serialize_params` from class method to instance method (while
   still keeping for old class method for backwards compatibility). This
   is to give it a more sane interface.
2016-03-04 19:04:29 -08:00
Brandur
fa314f6166 Bump version to 1.36.1 v1.36.1 2016-03-04 15:01:05 -08:00
Brandur
127c6694e8 Merge pull request #389 from stripe/brandur-fix-save-with-hash
Fix serialization of hashes passed to `#save`
2016-03-04 14:59:44 -08:00
Brandur
d92d084211 Add a few more low-level StripeObject tests 2016-03-04 14:52:30 -08:00
François de Metz
bc6cc96310 Fix serialization of hash when calling save.
Hashes are converted to StripeObject when used as params of save.
They need to be converted to hash on serialize.

Signed-off-by: François de Metz <francois@stormz.me>
Signed-off-by: Cyril Duez <cyril@stormz.me>
2016-03-04 14:40:57 -08:00
Brandur
abbf4c6426 Fix some gross trailing whitespace 2016-03-04 14:03:32 -08:00
Brandur
f711494f54 Merge pull request #387 from stripe/brandur-pass-params-fee-refund
Pass params and opts through on `ApplicationFee#refund`
2016-03-03 23:59:33 -08:00
Brandur
3fab2cd59f Pass params and opts through on ApplicationFee#refund
`params` and `opts` are not currently passed through when using the
`#refund` helper on `ApplicationFee`. This was an omission on the
original refactor to use the new endpoint, and wasn't an intentional
design.

Fixes #386.
2016-03-02 13:45:57 -08:00
Brandur
24632af95a Merge pull request #385 from stripe/brandur-md-readme
Change README to Markdown
2016-02-22 16:20:28 -08:00
Brandur
f7717208ae Change README to Markdown
This is kind of a bike shed, but at this point it's a little more clear
that Markdown has won the format wars and that people are a little more
used to seeing/editing it.

This moves the `README` to Markdown and also includes some minor
cleanup:

* Fixes a broken reference link (`curl`).
* Normalizes lines to 80 characters.
* Normalizes code snippets to be prefixed by four spaces.
* Normalizes sentence to be separately by only a single space.
2016-02-22 16:07:07 -08:00
Brandur
270dfe6052 Fix grammar problem 2016-02-19 10:28:03 -08:00
Brandur
eda056b9f6 Improve accuracy of puts message 2016-02-15 09:10:35 -08:00
Brandur
3e9cba3afd Merge pull request #380 from mohnish/master
Clean up stripe-console and use the IRB API
2016-02-15 09:09:29 -08:00
Mohnish Thallavajhula
07a27b61b6 Clean up stripe-console and use the IRB API 2016-02-14 09:43:24 -08:00
Brandur
097e185042 Merge pull request #379 from ahacop/remove-json
Remove json gem dependency
2016-02-09 12:04:33 -08:00
Ara Hacopian
c0ef16ad1d Remove json gem dependency
All required rubies include JSON as part of the stdlib.
2016-02-09 14:12:39 -05:00
Brandur
9b1315d08c Bump version to 1.36.0 v1.36.0 2016-02-08 08:24:04 -08:00
Brandur
85f191217b A few more nominal whitespace tweaks 2016-02-08 08:23:33 -08:00
Brandur
555341029b Tweak whitespace for consistency 2016-02-08 08:21:34 -08:00
Brandur
b2d74b09ff Merge pull request #376 from Easybring/master
support for country_spec
2016-02-08 08:19:36 -08:00
Ioannis Kolovos
f8532d225e Support for Stripe::CountrySpec 2016-02-06 16:55:29 +02:00
Brandur
3a258806a2 Bump version to 1.35.1 v1.35.1 2016-02-03 14:06:08 -08:00
Brandur
d8fc785f34 Merge pull request #374 from stripe/brandur-refund-fallback
Provide compatibility patch the Charge#refund helper
2016-02-03 14:04:54 -08:00
Brandur
65b92dec4b Provide compatibility patch the Charge#refund helper
An unfortunate side effect of #364 is that it broke compatibility for
users on very old API versions because their `refunds` field will come
back as an array.

This adds a compatibility layer that will allow even users on old API
versions to seamlessly upgrade their gem versions.
2016-02-03 13:45:01 -08:00
Brandur
23c61cc867 Bump version to 1.35.0 v1.35.0 2016-02-01 05:14:43 -08:00
Brandur
687be7015d Merge pull request #372 from stripe/brandur-update-bundle
Update CA bundle
2016-02-01 05:12:26 -08:00
Brandur
7aed899e1a Merge pull request #371 from stripe/brandur-configuration-ca-bundle-path
Allow the CA bundle to be configured
2016-02-01 05:12:14 -08:00
Brandur
31bbf02d4d Update CA bundle
Our CA bundle has fallen quite out of date since it was last pulled.
This patch updates it and adds a Rake task to make this task more
repeatable.

One thing worth noting is I've switched us over from the Ubuntu bundle
to the Mozilla bundle that's maintained by cURL. The bundle seemed to be
previously extracted by a custom script that I don't really want to
maintain. cURL and Excon both use the Mozilla bundle and it should be a
safe replacement.
2016-01-26 14:32:16 -08:00
Brandur
61ba47d619 Allow the CA bundle to be configured
As requested in #370, this will allow advanced users to configure a
certificate bundle that is expected to be more up-to-date than what
we've managed to include with the gem.
2016-01-26 14:19:07 -08:00
Brandur
91f42f4bc2 Bump version to 1.34.0 v1.34.0 2016-01-25 11:24:07 -08:00
Brandur
a508688c3c Merge pull request #368 from stripe/rasmus-support_product_sku_deletion
Support deleting SKUs and products.
2016-01-25 11:22:59 -08:00
Rasmus Rygaard
8d8fb67aae Support deleting SKUs and products. 2016-01-25 10:32:49 -08:00
Brandur
03086b8086 Bump version to 1.33.1 v1.33.1 2016-01-21 15:16:34 -08:00
Brandur
89cf6071b7 Merge pull request #366 from yogeshjain999/charge_refund_fix
Forward parameters passed to charge.refund
2016-01-21 11:54:33 -08:00
Yogesh Khater
4fe8474279 Forward parameters passed to charge.refund
fixes #365
2016-01-21 12:00:42 +05:30
Brandur
932ddb825a Bump version to 1.33.0 v1.33.0 2016-01-19 15:48:20 -08:00
Brandur
52a26ff08f Merge pull request #364 from stripe/brandur-deprecate-refund-helpers
Deprecate `#refund` helpers on `Charge` and `ApplicationFee`
2016-01-19 15:46:54 -08:00
Brandur
13cba9f29a Remove deprecations 2016-01-19 15:31:44 -08:00
Brandur
437c2dfa02 Move extend to top of file 2016-01-15 10:37:24 -08:00
Brandur
cd9d2bc71e Also re-implement Charge#refund to use our new endpoint
This was already done for `ApplicationFee`.
2016-01-15 10:36:42 -08:00
Brandur
8a20ab8972 Deprecate #refund helpers on Charge and ApplicationFee
As discussed previously in #354 and alluded to in #363, this patch
deprecates the `#refund` helpers on `Charge` and `ApplicationFee` in
favor of the resource-centric approach (i.e. `charge.refunds.create`).

We do this for a few reasons:

1. The new approach is far preferred and uses our modern endpoints. It's
   also been the mechanism suggested by the documentation for ages now.
2. The old approach is somewhat risky in that a forgotten "s" can lead
   to an accidental refund (i.e. `charge.refund` instead of
   `charge.refunds`).

Follows up #354. Fixes #363.
2016-01-14 18:16:56 -08:00