213 Commits

Author SHA1 Message Date
Remi Jannel
962538b149 Add support for TaxRate resource and APIs 2019-04-23 09:56:03 -07:00
Remi Jannel
b5cd9e3682 Add support for TaxId resource and APIs 2019-04-19 10:13:57 -07:00
Remi Jannel
0233deb5c6 Add support for CreditNote 2019-04-07 09:47:43 -07:00
Olivier Bellone
160028ada1
New custom_method DSL for defining custom API request methods as static methods (#754)
New `custom_method` DSL for defining custom API request methods as static methods
2019-04-02 10:06:40 -07:00
Olivier Bellone
6e95bf45f9 Add a global proxy configuration parameter 2019-03-25 18:34:12 -07:00
Remi Jannel
f93c0075c0 Add support for the PaymentMethod resource 2019-03-18 16:30:51 -07:00
Remi Jannel
d784819901 Add support for Subscription Schedules 2019-02-11 22:38:08 -08:00
Remi Jannel
359a0c9cdf Move CheckoutSession to the Checkout namespace and rename to Session 2019-01-16 18:50:14 -08:00
Remi Jannel
0747d59752 Add support for the Checkout Session resource 2018-12-21 09:20:29 +01:00
Remi Jannel
220bac9397 Add support for the Account Link resource 2018-12-07 16:06:04 -08:00
Remi Jannel
c186e71c92 Revert "Add support for the Account Link resource"
This reverts commit 335c40b4d8cf974c427f34024072272441a5131e.
2018-12-07 16:05:05 -08:00
Remi Jannel
335c40b4d8 Add support for the Account Link resource 2018-12-07 15:54:50 -08:00
Remi Jannel
0383de9dc2 Add support for the Review resource 2018-11-28 09:50:42 -05:00
Remi Jannel
ceab2740c1
Add support for Radar List and ListItem resources 2018-11-27 14:10:18 +01:00
Anton Kropp
ab248ec691
Adding metadata header to client requests 2018-11-12 10:24:06 -08:00
Remi Jannel
da9d15df95 Add support for the Webhook Endpoint resource 2018-10-30 10:36:10 -07:00
Remi Jannel
23d94005d3 Add support for the Person resource 2018-10-30 10:25:10 -07:00
David Zhu
b3055bfd44 Terminal Bindings 2018-09-24 13:43:32 -07:00
Olivier Bellone
ea09249e67
Use files.stripe.com only for the file create endpoint 2018-09-20 23:02:00 +02:00
Olivier Bellone
f3dd3ab1bf
Handle file objects like file_upload 2018-09-17 16:53:23 +02:00
Remi Jannel
66248ba2aa Add support for the Reporting resources 2018-08-30 20:11:07 -04:00
Olivier Bellone
156145b96b
Merge pull request #677 from stripe/ob-prep-file
Use `::File` instead of `File`
2018-08-27 16:50:57 +02:00
Olivier Bellone
21db64fe0e
Use ::File instead of File 2018-08-27 15:32:10 +02:00
Remi Jannel
f5dc3ab0c3 Add support for usage record summary 2018-08-21 08:56:18 -04:00
Olivier Bellone
9c357c803f
file_link support 2018-08-03 00:07:27 +02:00
Remi Jannel
4c39c35fd8 Add support for ScheduledQueryRun 2018-07-27 19:14:37 -04:00
Brandur
ec5c51c3ba Very minor fix for alphabetical ordering 2018-07-26 11:32:35 -07:00
Remi Jannel
04ae411754 Add support for Issuing resources 2018-07-26 13:35:50 -04:00
zach wick
ab3949b8da Adds support for 'partner_id' in 'set_app_info' (#658)
* Adds support for 'partner_id' in 'set_app_info'

Signed-off-by: zach wick <zwick@stripe.com>
2018-06-28 08:55:58 -07:00
Remi Jannel
201f9c29f4 Add support for the PaymentIntent resource
This feature is gated so the tests are stubbed for now
2018-06-27 19:24:23 -04:00
Brandur
863da48398 Add frozen_string_literal to every file and enforce Rubocop rule
Adds the magic `frozen_string_literal: true` comment to every file and
enables a Rubocop rule to make sure that it's always going to be there
going forward as well.

See here for more background [1], but the basic idea is that unlike many
other languages, static strings in code are mutable by default. This has
since been acknowledged as not a particularly good idea, and the
intention is to rectify the mistake when Ruby 3 comes out, where all
string literals will be frozen. The `frozen_string_literal` magic
comment was introduced in Ruby 2.3 as a way of easing the transition,
and allows libraries and projects to freeze their literals in advance.

I don't think this is breaking in any way: it's possible that users
might've been pulling out one of are literals somehow and mutating it,
but that would probably not have been useful for anything and would
certainly not be recommended, so I'm quite comfortable pushing this
change through as a minor version.

As discussed in #641.

[1] https://stackoverflow.com/a/37799399
2018-05-10 14:56:14 -07:00
Fay Wu
6ce45193d2 Add support for v1/issuer_fraud_records endpoints (#645) 2018-05-09 14:55:10 -07:00
Alexander Thiemann
c066c9c5f8 flexible billing primitives and tests 2018-04-11 13:29:24 -07:00
Jamu Kakar
0be22683a3 Add support for /v1/topups endpoints. 2018-02-16 15:03:46 -08:00
Olivier Bellone
b153b39203
Add support for exchange_rates API requests 2017-10-31 10:25:18 +01:00
Olivier Bellone
c455be74d4
Add support for listing source_transactions 2017-10-26 15:43:34 +02:00
Brandur
cf5354cc27 Alphabetize inclusion order 2017-10-17 17:50:20 -07:00
Brandur
7699033d90 Merge pull request #597 from stripe/ob-nested-resource-class-methods
Nested resource class methods
2017-10-17 17:50:52 -07:00
Brandur
6dca58937d Merge require lists together + add uri
There's really no reason for these to have been two separate lists.
Also, add `uri` as an explicit dependency (so far it's been getting
included by luck with other libraries).
2017-10-16 12:32:18 -07:00
Olivier Bellone
7f866aab5c
Nested resource class methods 2017-10-15 18:49:13 +02:00
Brandur
7f85eea3ee Fix low hanging Rubocop TODOs
I wanted to see what fixing Rubocop TODOs was like, so I tried to
eliminate all the easy ones. Most of these were pretty easy, and the
changes required are relatively minimal.

Some of the stuff left is harder. Pretty much everything under
`Metrics/*` is going to be a pretty big yak shave. A few of the others
are just going to need a little more work (e.g. `Style/ClassVars` and
`Style/GuardClause`). Going to stop here for now.
2017-09-27 15:07:18 -07:00
Olivier Bellone
e02ff7f849
Start using RuboCop for linting 2017-09-27 21:28:25 +02:00
Brandur
1ca67cb954 Correct behavior for error logging
A few changes:

* Add a new `Util.log_error` method which will forward to the equivalent
  of `#error` on a logger.
* Move errors produced by `StripeClient` to use `Util.log_error`.
* Change standard stdout logging behavior to log to stderr in the case
  of `Util.log_error.
* Change `Stripe.log_level` values to be an enum in a similar fashion as
  the standard library's built in `Logger`.
2017-08-11 11:45:43 -07:00
Brandur
cb111a8e74 Add support for setting a logger
Adds support for setting `Stripe.logger` to a logger that's compatible
with `Logger` from Ruby's standard library. In set, the library will no
longer log to stdout, and instead emit straight to the logger and defer
decision on what log level to print to it.

Addresses a request in #566.
2017-08-11 11:22:14 -07:00
Brandur
ce69d749e1 Implement STRIPE_LOG for stripe-ruby
Adds logging support for stripe-ruby in a similar way that we did it for
stripe-python [1], with the idea that users you can optionally get some
additional low-cost-to-configure logging for operational visibility or
debugging.

I made a few tweaks from the Python implementation (which I'll try to
contribute back to there):

* Added an elapsed parameter to responses so you can tell how long they
  lasted.
* Mixed in idempotency_key to all lines that users have a way to
  aggregate logs related to a request from start to finish.
* Standardized naming between different log lines as much as possible.
* Detect a TTY and produce output that's colorized and formatted.

[1] https://github.com/stripe/stripe-python/pull/269
2017-08-03 13:39:15 -07:00
Marc Hesse
d69ccfc1dd Add support for ephemeral keys (#549) 2017-06-20 18:30:30 -07:00
Olivier Bellone
330763aa02 Adds support for login links 2017-05-19 17:22:54 +02:00
Olivier Bellone
a645a78cd0 Add OAuth methods 2017-05-18 11:29:59 +02:00
Olivier Bellone
0376e242d9 Support for deserializing webhook events and verifying signatures 2017-04-28 14:25:40 +02:00
Corey Farwell
408c697847 Add Stripe::InvoiceLineItem class.
Fixes #531.
2017-04-26 14:59:02 -04:00