cameroncox-mousetrap 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/mousetrap/plan.rb +4 -2
- data/lib/mousetrap/subscription.rb +3 -1
- data/script/authenticate.rb +1 -1
- data/script/console +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.3
|
data/lib/mousetrap/plan.rb
CHANGED
@@ -2,7 +2,8 @@ module Mousetrap
|
|
2
2
|
class Plan < Resource
|
3
3
|
attr_accessor \
|
4
4
|
:code,
|
5
|
-
:name
|
5
|
+
:name,
|
6
|
+
:items
|
6
7
|
|
7
8
|
def self.all
|
8
9
|
response = get_resources plural_resource_name
|
@@ -23,7 +24,8 @@ module Mousetrap
|
|
23
24
|
def self.attributes_from_api(attributes)
|
24
25
|
{
|
25
26
|
:code => attributes['code'],
|
26
|
-
:name => attributes['name']
|
27
|
+
:name => attributes['name'],
|
28
|
+
:items => attributes['items']
|
27
29
|
}
|
28
30
|
end
|
29
31
|
end
|
@@ -20,7 +20,8 @@ module Mousetrap
|
|
20
20
|
:created_at,
|
21
21
|
:credit_card_expiration_date,
|
22
22
|
:credit_card_last_four_digits,
|
23
|
-
:credit_card_type
|
23
|
+
:credit_card_type,
|
24
|
+
:items
|
24
25
|
|
25
26
|
def self.[](code)
|
26
27
|
raise_api_unsupported_error
|
@@ -123,6 +124,7 @@ module Mousetrap
|
|
123
124
|
:credit_card_expiration_date => attributes['ccExpirationDate'],
|
124
125
|
:credit_card_last_four_digits => attributes['ccLastFour'],
|
125
126
|
:credit_card_type => attributes['ccType'],
|
127
|
+
:items => attributes['items']
|
126
128
|
}
|
127
129
|
end
|
128
130
|
end
|
data/script/authenticate.rb
CHANGED
data/script/console
CHANGED
@@ -1 +1 @@
|
|
1
|
-
irb -r ubygems -r lib/mousetrap.rb -r
|
1
|
+
irb -r ubygems -r lib/mousetrap.rb -r script/authenticate.rb
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cameroncox-mousetrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Larkowski
|
@@ -12,7 +12,7 @@ autorequire:
|
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
14
|
|
15
|
-
date: 2009-11-
|
15
|
+
date: 2009-11-19 00:00:00 -05:00
|
16
16
|
default_executable:
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|