stripe 1.32.0 → 1.32.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 482b4a27be7ebd463dacdc270465e84dd6a59a7d
4
- data.tar.gz: b594a2a801f966bbf72f2c8825e3a56620124d01
3
+ metadata.gz: d2d2a6395d80bde7fc0021ce5774016af214c990
4
+ data.tar.gz: 71f7a568f9e60ae0a696c2e43a31ba963ca05ae6
5
5
  SHA512:
6
- metadata.gz: 0bb43636c63f12d659e76d4e29cc02b960d738bdba5160c55232335c600845bd199bb780e4ee822b520bb8422d41450bf0f82992743f87679cd3d03f86018913
7
- data.tar.gz: 919a6651eab63dd5b0da21841514bd904fc0ab0529778aaf36696aa81405aa863740ad78206b9d1fc5baaa56a40dcde5b0273e50728a80ae89cdf5b4a6adca7c
6
+ metadata.gz: 6e2a2dc5678a605a941e28c2332383c8cebb1be58406881db0d0d1ed47a47f692be87868eb917aedd6ff8f231c4a7b92889c33b65e37bdb459e8fd8f827d8cfe
7
+ data.tar.gz: 20ce1c2d6be1316ef740ab3ad469fa676e1ada2e5d92cd7bd4587d4b3f0c574284e6b3392d29ed8b8bace956d9ea16c420495de373cebe3b3f00b4b2662a006a
@@ -1,3 +1,8 @@
1
+ === 1.32.1 2016-01-07
2
+
3
+ * Fix bug where ivar left uninitialized in StripeObject could error on serialization
4
+ * Fix bug where a nil customer from API could error Bitcoin model on refresh
5
+
1
6
  === 1.32.0 2016-01-05
2
7
 
3
8
  * Add configuration to optionally retry network failures
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.32.0
1
+ 1.32.1
@@ -10,7 +10,7 @@ module Stripe
10
10
  end
11
11
 
12
12
  def url
13
- if respond_to?(:customer)
13
+ if respond_to?(:customer) && !self.customer.nil?
14
14
  "#{Customer.url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
15
15
  else
16
16
  "#{self.class.url}/#{CGI.escape(id)}"
@@ -3,6 +3,7 @@ module Stripe
3
3
  include Enumerable
4
4
  include Stripe::APIOperations::List
5
5
  include Stripe::APIOperations::Request
6
+ include Stripe::APIOperations::Create
6
7
 
7
8
  # This accessor allows a `ListObject` to inherit various filters that were
8
9
  # given to a predecessor. This allows for things like consistent limits,
@@ -67,11 +68,6 @@ module Stripe
67
68
  Util.convert_to_stripe_object(response, opts)
68
69
  end
69
70
 
70
- def create(params={}, opts={})
71
- response, opts = request(:post, url, params, opts)
72
- Util.convert_to_stripe_object(response, opts)
73
- end
74
-
75
71
  # Fetches the next page in the resource list (if there is one).
76
72
  #
77
73
  # This method will try to respect the limit of the current page. If none
@@ -12,6 +12,7 @@ module Stripe
12
12
  def initialize(id=nil, opts={})
13
13
  id, @retrieve_params = Util.normalize_id(id)
14
14
  @opts = Util.normalize_opts(opts)
15
+ @original_values = {}
15
16
  @values = {}
16
17
  # This really belongs in APIResource, but not putting it there allows us
17
18
  # to have a unified inspect method
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = '1.32.0'
2
+ VERSION = '1.32.1'
3
3
  end
@@ -105,6 +105,13 @@ module Stripe
105
105
  assert_equal({}, Stripe::StripeObject.serialize_params(obj))
106
106
  end
107
107
 
108
+ should "#serialize_params on a new object with a subobject" do
109
+ obj = Stripe::StripeObject.new
110
+ obj.metadata = { :foo => "bar" }
111
+ assert_equal({ :metadata => { :foo => "bar" } },
112
+ Stripe::StripeObject.serialize_params(obj))
113
+ end
114
+
108
115
  should "#serialize_params on a basic object" do
109
116
  obj = Stripe::StripeObject.construct_from({ :foo => nil })
110
117
  obj.update_attributes(:foo => "bar")
@@ -458,6 +458,7 @@ module Stripe
458
458
  :description => 'some details',
459
459
  :metadata => {},
460
460
  :object => 'bitcoin_receiver',
461
+ :customer => nil,
461
462
  :transactions => make_bitcoin_transaction_array
462
463
  }.merge(params)
463
464
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.32.0
4
+ version: 1.32.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Boucher
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-05 00:00:00.000000000 Z
12
+ date: 2016-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client