Skip to content
Commits on May 4, 2016
  1. @kyleconroy

    Bump version to 1.42.0

    kyleconroy committed May 4, 2016
  2. @jxu577 @kyleconroy

    Use v1/subs endpoints for operations on subs and allow direct sub acc…

    jxu577 committed with kyleconroy May 4, 2016
    …ess (#411)
    
    * allow subs to be retrieved & created with new v1/subs API endpoint
    
    * edit tests to check for url
    
    * fix customer subscription URLs to go through v1/customers
Commits on Apr 13, 2016
  1. @brandur

    Bump version to 1.41.0

    brandur committed Apr 13, 2016
  2. @brandur

    Merge pull request #412 from Edouard-chin/global-stripe-account-head

    brandur committed Apr 13, 2016
    Allow `stripe_account` to be set globally:
  3. @Edouard-chin

    Allow `stripe_account` to be set globally:

    Edouard-chin committed Apr 12, 2016
    - When performing requests on the behalf of a managed account, `stripe_account` option must be passed everytime, this can become redundant
    - Allowing to set the `stripe_account` globally makes thing easier for wrapping every request in a single method, the same way as it is for defining the `api_key` globally
Commits on Apr 11, 2016
  1. @brandur

    Merge pull request #410 from stripe/brandur-fix-warnings

    brandur committed Apr 11, 2016
    Fix warnings emitted during tests
  2. @brandur

    Merge pull request #409 from stripe/br-charge-outcomes

    brandur committed Apr 11, 2016
    add test for handling of charge.outcome subfield
  3. @brandur

    Fix warnings emitted during tests

    brandur committed Apr 11, 2016
    I'm not sure exactly what changed here (did we change the `$VERBOSE`
    setting?), but I'm not seeing a whole lot of warnings when running the
    test suites locally and in CI. For example:
    
    ```
    Started
    ........................................./home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ............../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ......../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    .../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ........./home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ...
    ..../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ....../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ..../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ......./home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ........./home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ........../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ................./home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    .../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ..../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ....../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ..........
    ........./home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ....../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ......../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ......../home/travis/build/stripe/stripe-ruby/lib/stripe/api_operations/list.rb:6: warning: instance variable @opts not initialized
    ............./home/travis/build/stripe/stripe-ruby/lib/stripe/stripe_object.rb:35: warning: instance variable @values not initialized
    ./home/travis/build/stripe/stripe-ruby/lib/stripe/stripe_object.rb:35: warning: instance variable @values not initialized
    ...................../home/travis/build/stripe/stripe-ruby/lib/stripe/transfer.rb:8: warning: instance variable @api_key not initialized
    ..............
    ..
    Finished in 0.785621037 seconds.
    ```
    
    Most of these are due to unused or uninitialized variables. This patch
    fixes all warnings by fixing offending code.
  4. @brahn
  5. @tetrakai

    Merge pull request #408 from stripe/karla-openssl-errors

    tetrakai committed Apr 11, 2016
    Catch SSL connection errors, and re-raise them as APIConnectionErrors
Commits on Apr 9, 2016
  1. @tetrakai

    Catch SSL connection errors, and re-raise them as APIConnectionErrors

    tetrakai committed Apr 8, 2016
    This is consistent with API library behavior in other languages, and with our
    API documentation (which doesn't mention needing to handle this type of error).
Commits on Apr 6, 2016
  1. @brandur

    Bump version to 1.40.0

    brandur committed Apr 6, 2016
  2. @brandur

    Merge pull request #407 from stripe/brandur-remove-api-resource-check

    brandur committed Apr 6, 2016
    Remove check that prevents API resource subobjects from being serialized
Commits on Apr 5, 2016
  1. @brandur

    Merge pull request #397 from stripe/brandur-ca-store

    brandur committed Apr 5, 2016
    Initialize an internal CA store
Commits on Apr 1, 2016
  1. @brandur

    Remove check that prevents API resource subobjects from being serialized

    brandur committed Apr 1, 2016
    Prior to my last major serialization refactor, there was a check in the
    code that would remove any subobjects from serialization that were of
    their own proper resource type (for example, if a charge contained a
    customer, that customer would be removed).
    
    What I didn't realize at the time is that the old serialization code had
    a bug/quirk that would allow *certain types* of subobjects that were API
    resources to make it through unscathed.
    
    In short, the behavior requirement here is *directly* contradictory.
    There was a test in place that would make sure that `customer` was
    removed from this hash:
    
    ``` ruby
    {
      :id => 'ch_id',
      :object => 'charge',
      :customer => {
        :object => 'customer',
        :id => 'customer_id'
      }
    }
    ```
    
    But, as reported in #406, we expect, and indeed need, for `source` (a
    card) to make it through to the API in this hash:
    
    ``` ruby
    {
      :id => 'cus_id',
      :object => 'customer',
      :source => {
        :object => 'card',
        :id => 'card_id'
      }
    }
    ```
    
    My proposal here is to just remove the check on serializing API
    resources. The normal code that only sends up keys/hashes that have
    changed is still in place, so in the first example, `customer` still
    isn't sent unless the user has directly manipulated a field on that
    subobject. I propose that in those cases we allow the API itself to
    reject the request rather than try to cut it off at the client level.
    
    Unfortunately, there is some possibility that removing those API
    resources is important for some reason, but of course there's no
    documentation on it beyond the after-the-fact post-justification that I
    wrote during my last refactor. I can't think of any reason that it would
    be too destructive, but there is some level of risk.
Commits on Mar 31, 2016
  1. @brandur

    Bump version to 1.39.0

    brandur committed Mar 31, 2016
  2. @brandur

    Merge pull request #402 from stripe/brandur-cybertrust

    brandur committed Mar 31, 2016
    Add "CyberTrust Global Root"
Commits on Mar 28, 2016
  1. @brandur

    Merge pull request #404 from stripe/brandur-improve-error-message

    brandur committed Mar 28, 2016
    Improve error message on setting empty strings
Commits on Mar 24, 2016
  1. @brandur

    Improve error message on setting empty strings

    brandur committed Mar 24, 2016
    This improves the error message that a user sees when attempting to set
    a property to an empty string.
    
    Fixes #403.
Commits on Mar 23, 2016
  1. @brandur

    Add "CyberTrust Global Root"

    brandur committed Mar 22, 2016
    This allows old OpenSSL versions (0.9.8 and 1.0.0) to successfully
    verify Stripe's certificate chain.
Commits on Mar 18, 2016
  1. @brandur

    Bump version to 1.38.0

    brandur committed Mar 18, 2016
  2. @brandur

    Merge pull request #401 from herimedia/add-options-to-save

    brandur committed Mar 18, 2016
    Allow options (headers) to be passed into .save
  3. @niels

    Allow options (headers) to be passed into .save

    niels committed Mar 18, 2016
    in the same manner as is already possible for .create.
Commits on Mar 14, 2016
  1. @brandur

    Bump version to 1.37.0

    brandur committed Mar 14, 2016
  2. @brandur

    Merge pull request #400 from stripe/gregsabo-add-account-reject

    brandur committed Mar 14, 2016
    Create account.reject method.
  3. @gregsabo

    Create account.reject method.

    gregsabo committed Mar 14, 2016
  4. @brandur

    Merge pull request #399 from stripe/brandur-fix-warning

    brandur committed Mar 14, 2016
    Initialize @max_network_retries
  5. @brandur

    Initialize @max_network_retries

    brandur committed Mar 14, 2016
    Certain platforms will throw an error if this variable is accessed
    without being initialized. Assign it a value instead of relying on the
    OR operator to give it a default.
  6. @brandur

    Merge pull request #398 from stripe/brandur-byebug-platform-lock

    brandur committed Mar 14, 2016
    Lock Byebug to just the MRI
  7. @brandur

    9.0.5.0 instead?

    brandur committed Mar 14, 2016
  8. @brandur

    Lock Byebug to just the MRI

    brandur committed Mar 14, 2016
    Here we predicate the installation of Byebug on being on the MRI. This
    allows us to `bundle install` on alternate platforms like JRuby.
    
    Also performs some Gemfile management: add latest MRI and JRuby versions
    and remove special case Gemfiles.
  9. @brandur

    Initialize an internal CA store

    brandur committed Mar 14, 2016
    This attempts to give some semblance of thread safety to parallel
    library requests by pre-assigning a certificate store, the
    initialization of which seems to be a weak point for thread safety. Note
    that while this does seem to empirically improve the situation, it
    doesn't guarantee actual thread safety.
    
    A longer term solution to the problem is probably to assign a per-thread
    HTTP client for much stronger guarantees, but this is a little further
    out. More discussion on that topic in #313.
    
    Fixes #382.
  10. @brandur

    Bump version to 1.36.2

    brandur committed Mar 14, 2016
  11. @brandur

    Merge pull request #396 from stripe/brandur-fix-list

    brandur committed Mar 14, 2016
    Fix reference to URLs on ListObject
  12. @brandur

    Fix reference to URLs on ListObject

    brandur committed Mar 14, 2016
    In #394 we renamed `url` to `resource_url` in order to prevent name
    collisions in API resource that also have a `url` property.
    Unfortunately, this didn't account for the fact that when making API
    calls on a list object we rely on a returned `url` property to build a
    request, and this had been renamed to `resource_url`. Test should have
    caught this, but they were written to work differently than how live
    API calls actually function.
    
    This patch repairs the problem by adding a `resource_url` to list
    objects, and modifies test to be more accurate to reality so that
    they'll catch this class of problem in the future.
    
    Fixes #395.
Something went wrong with that request. Please try again.