stripe 1.5.20 → 1.5.21
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/stripe.rb +12 -1
- data/lib/stripe/version.rb +1 -1
- metadata +7 -18
data/lib/stripe.rb
CHANGED
@@ -50,7 +50,8 @@ module Stripe
|
|
50
50
|
'customer' => Customer,
|
51
51
|
'invoiceitem' => InvoiceItem,
|
52
52
|
'invoice' => Invoice,
|
53
|
-
'plan' => Plan
|
53
|
+
'plan' => Plan,
|
54
|
+
'coupon' => Coupon
|
54
55
|
}
|
55
56
|
case resp
|
56
57
|
when Array
|
@@ -142,6 +143,8 @@ module Stripe
|
|
142
143
|
end
|
143
144
|
|
144
145
|
class StripeObject
|
146
|
+
include Enumerable
|
147
|
+
|
145
148
|
attr_accessor :api_key
|
146
149
|
@@permanent_attributes = Set.new([:api_key])
|
147
150
|
@@ignored_attributes = Set.new([:id, :api_key, :object])
|
@@ -235,6 +238,8 @@ module Stripe
|
|
235
238
|
def keys; @values.keys; end
|
236
239
|
def values; @values.values; end
|
237
240
|
def to_json(*a); @values.to_json(*a); end
|
241
|
+
def to_hash; @values; end
|
242
|
+
def each(&blk); @values.each(&blk); end
|
238
243
|
|
239
244
|
protected
|
240
245
|
|
@@ -424,6 +429,12 @@ module Stripe
|
|
424
429
|
include Stripe::APIOperations::List
|
425
430
|
end
|
426
431
|
|
432
|
+
class Coupon < APIResource
|
433
|
+
include Stripe::APIOperations::Create
|
434
|
+
include Stripe::APIOperations::Delete
|
435
|
+
include Stripe::APIOperations::List
|
436
|
+
end
|
437
|
+
|
427
438
|
class Token < APIResource
|
428
439
|
include Stripe::APIOperations::Create
|
429
440
|
end
|
data/lib/stripe/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stripe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
8
|
+
- 21
|
9
|
+
version: 1.5.21
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Ross Boucher
|
@@ -16,17 +15,16 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-21 00:00:00 -07:00
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: rest-client
|
23
23
|
prerelease: false
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
28
|
segments:
|
31
29
|
- 0
|
32
30
|
version: "0"
|
@@ -36,11 +34,9 @@ dependencies:
|
|
36
34
|
name: mocha
|
37
35
|
prerelease: false
|
38
36
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
37
|
requirements:
|
41
38
|
- - ">="
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
hash: 3
|
44
40
|
segments:
|
45
41
|
- 0
|
46
42
|
version: "0"
|
@@ -50,11 +46,9 @@ dependencies:
|
|
50
46
|
name: shoulda
|
51
47
|
prerelease: false
|
52
48
|
requirement: &id003 !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
49
|
requirements:
|
55
50
|
- - ">="
|
56
51
|
- !ruby/object:Gem::Version
|
57
|
-
hash: 3
|
58
52
|
segments:
|
59
53
|
- 0
|
60
54
|
version: "0"
|
@@ -64,11 +58,9 @@ dependencies:
|
|
64
58
|
name: test-unit
|
65
59
|
prerelease: false
|
66
60
|
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
61
|
requirements:
|
69
62
|
- - ">="
|
70
63
|
- !ruby/object:Gem::Version
|
71
|
-
hash: 3
|
72
64
|
segments:
|
73
65
|
- 0
|
74
66
|
version: "0"
|
@@ -94,6 +86,7 @@ files:
|
|
94
86
|
- vendor/stripe-json/lib/json/version.rb
|
95
87
|
- vendor/stripe-json/lib/json/pure/generator.rb
|
96
88
|
- vendor/stripe-json/lib/json/pure/parser.rb
|
89
|
+
has_rdoc: true
|
97
90
|
homepage: https://stripe.com/api
|
98
91
|
licenses: []
|
99
92
|
|
@@ -103,27 +96,23 @@ rdoc_options: []
|
|
103
96
|
require_paths:
|
104
97
|
- lib
|
105
98
|
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
99
|
requirements:
|
108
100
|
- - ">="
|
109
101
|
- !ruby/object:Gem::Version
|
110
|
-
hash: 3
|
111
102
|
segments:
|
112
103
|
- 0
|
113
104
|
version: "0"
|
114
105
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
-
none: false
|
116
106
|
requirements:
|
117
107
|
- - ">="
|
118
108
|
- !ruby/object:Gem::Version
|
119
|
-
hash: 3
|
120
109
|
segments:
|
121
110
|
- 0
|
122
111
|
version: "0"
|
123
112
|
requirements: []
|
124
113
|
|
125
114
|
rubyforge_project:
|
126
|
-
rubygems_version: 1.
|
115
|
+
rubygems_version: 1.3.6
|
127
116
|
signing_key:
|
128
117
|
specification_version: 3
|
129
118
|
summary: Ruby bindings for the Stripe API
|