rspreedly 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/.gitignore +5 -0
- data/LICENSE +20 -0
- data/README.rdoc +78 -0
- data/Rakefile +48 -0
- data/VERSION +1 -0
- data/lib/rspreedly/base.rb +76 -0
- data/lib/rspreedly/complimentary_subscription.rb +5 -0
- data/lib/rspreedly/complimentary_time_extension.rb +5 -0
- data/lib/rspreedly/config.rb +84 -0
- data/lib/rspreedly/error.rb +9 -0
- data/lib/rspreedly/invoice.rb +61 -0
- data/lib/rspreedly/line_item.rb +5 -0
- data/lib/rspreedly/payment_method.rb +7 -0
- data/lib/rspreedly/subscriber.rb +153 -0
- data/lib/rspreedly/subscription_plan.rb +40 -0
- data/lib/rspreedly.rb +29 -0
- data/spec/config_spec.rb +144 -0
- data/spec/fixtures/complimentary_failed_active.xml +1 -0
- data/spec/fixtures/complimentary_failed_inactive.xml +1 -0
- data/spec/fixtures/complimentary_not_valid.xml +3 -0
- data/spec/fixtures/complimentary_success.xml +25 -0
- data/spec/fixtures/create_subscriber.xml +25 -0
- data/spec/fixtures/existing_subscriber.xml +1 -0
- data/spec/fixtures/free_plan_not_elligable.xml +1 -0
- data/spec/fixtures/free_plan_not_free.xml +1 -0
- data/spec/fixtures/free_plan_not_set.xml +1 -0
- data/spec/fixtures/free_plan_success.xml +25 -0
- data/spec/fixtures/invalid_subscriber.xml +1 -0
- data/spec/fixtures/invalid_update.xml +1 -0
- data/spec/fixtures/invoice_created.xml +43 -0
- data/spec/fixtures/invoice_invalid.xml +1 -0
- data/spec/fixtures/no_plans.xml +2 -0
- data/spec/fixtures/no_subscribers.xml +2 -0
- data/spec/fixtures/payment_already_paid.xml +1 -0
- data/spec/fixtures/payment_invalid.xml +1 -0
- data/spec/fixtures/payment_not_found.xml +1 -0
- data/spec/fixtures/payment_success.xml +43 -0
- data/spec/fixtures/plan_disabled.xml +1 -0
- data/spec/fixtures/plan_not_found.xml +1 -0
- data/spec/fixtures/subscriber.xml +25 -0
- data/spec/fixtures/subscriber_not_found.xml +1 -0
- data/spec/fixtures/subscribers.xml +75 -0
- data/spec/fixtures/subscription_plan_list.xml +91 -0
- data/spec/invoice_spec.rb +129 -0
- data/spec/spec_helper.rb +44 -0
- data/spec/subscriber_spec.rb +442 -0
- data/spec/subscription_plan_spec.rb +36 -0
- metadata +107 -0
data/spec/config_spec.rb
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe RSpreedly::Config do
|
4
|
+
|
5
|
+
before :each do
|
6
|
+
|
7
|
+
RSpreedly::Config.clear
|
8
|
+
RSpreedly::Config.setup do |c|
|
9
|
+
c[:one] = 1
|
10
|
+
c[:two] = 2
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
14
|
+
|
15
|
+
describe "logger" do
|
16
|
+
|
17
|
+
before :each do
|
18
|
+
Object.send(:remove_const, :RAILS_DEFAULT_LOGGER) if defined?(RAILS_DEFAULT_LOGGER)
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should default to RAILS_DEFAULT_LOGGER if defined" do
|
22
|
+
RAILS_DEFAULT_LOGGER = "something"
|
23
|
+
RSpreedly::Config.reset
|
24
|
+
RSpreedly::Config.logger.should == "something"
|
25
|
+
end
|
26
|
+
|
27
|
+
it "should default to a Logger if RAILS_DEFAULT_LOGGER is not defined" do
|
28
|
+
RSpreedly::Config.reset
|
29
|
+
RSpreedly::Config.logger.should be_a(Logger)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "configuration" do
|
35
|
+
|
36
|
+
it "should return the configuration hash" do
|
37
|
+
RSpreedly::Config.configuration.should == {:one => 1, :two => 2}
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "[]" do
|
43
|
+
|
44
|
+
it "should return the config option matching the key" do
|
45
|
+
RSpreedly::Config[:one].should == 1
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should return nil if the key doesn't exist" do
|
49
|
+
RSpreedly::Config[:monkey].should be_nil
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
54
|
+
describe "[]=" do
|
55
|
+
|
56
|
+
it "should set the config option for the key" do
|
57
|
+
lambda{
|
58
|
+
RSpreedly::Config[:banana] = :yellow
|
59
|
+
}.should change(RSpreedly::Config, :banana).from(nil).to(:yellow)
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "delete" do
|
65
|
+
|
66
|
+
it "should delete the config option for the key" do
|
67
|
+
lambda{
|
68
|
+
RSpreedly::Config.delete(:one)
|
69
|
+
}.should change(RSpreedly::Config, :one).from(1).to(nil)
|
70
|
+
end
|
71
|
+
|
72
|
+
it "should leave the config the same if the key doesn't exist" do
|
73
|
+
lambda{
|
74
|
+
RSpreedly::Config.delete(:test)
|
75
|
+
}.should_not change(RSpreedly::Config, :configuration)
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
|
80
|
+
describe "fetch" do
|
81
|
+
|
82
|
+
it "should return the config option matching the key if it exists" do
|
83
|
+
RSpreedly::Config.fetch(:one, 100).should == 1
|
84
|
+
end
|
85
|
+
|
86
|
+
it "should return the config default if the key doesn't exist" do
|
87
|
+
RSpreedly::Config.fetch(:other, 100).should == 100
|
88
|
+
end
|
89
|
+
|
90
|
+
end
|
91
|
+
|
92
|
+
describe "to_hash" do
|
93
|
+
|
94
|
+
it "should return a hash of the configuration" do
|
95
|
+
RSpreedly::Config.to_hash.should == {:one => 1, :two => 2}
|
96
|
+
end
|
97
|
+
|
98
|
+
end
|
99
|
+
|
100
|
+
describe "setup" do
|
101
|
+
|
102
|
+
it "should yield self" do
|
103
|
+
RSpreedly::Config.setup do |c|
|
104
|
+
c.should == RSpreedly::Config
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
it "should let you set items on the configuration object as a hash" do
|
109
|
+
lambda{
|
110
|
+
RSpreedly::Config.setup do |c|
|
111
|
+
c[:bananas] = 100
|
112
|
+
end
|
113
|
+
}.should change(RSpreedly::Config, :bananas).from(nil).to(100)
|
114
|
+
end
|
115
|
+
|
116
|
+
it "should let you set items on the configuration object as a method" do
|
117
|
+
lambda{
|
118
|
+
RSpreedly::Config.setup do |c|
|
119
|
+
c.monkeys = 100
|
120
|
+
end
|
121
|
+
}.should change(RSpreedly::Config, :monkeys).from(nil).to(100)
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
|
126
|
+
describe "calling a missing method" do
|
127
|
+
|
128
|
+
it "should retreive the config if the method matches a key" do
|
129
|
+
RSpreedly::Config.one.should == 1
|
130
|
+
end
|
131
|
+
|
132
|
+
it "should retreive nil if the method doesn't match a key" do
|
133
|
+
RSpreedly::Config.moo.should be_nil
|
134
|
+
end
|
135
|
+
|
136
|
+
it "should set the value of the config item matching the method name if it's an assignment" do
|
137
|
+
lambda{
|
138
|
+
RSpreedly::Config.trees = 3
|
139
|
+
}.should change(RSpreedly::Config, :trees).from(nil).to(3)
|
140
|
+
end
|
141
|
+
|
142
|
+
end
|
143
|
+
|
144
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Complimentary subscriptions cannot be given to active subscribers.
|
@@ -0,0 +1 @@
|
|
1
|
+
Complimentary subscriptions cannot be given to inactive subscribers.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<subscriber>
|
3
|
+
<active-until type="datetime" nil="true">2010-02-21T19:04:28Z</active-until>
|
4
|
+
<billing-first-name nil="true"></billing-first-name>
|
5
|
+
<billing-last-name nil="true"></billing-last-name>
|
6
|
+
<created-at type="datetime">2009-10-28T22:27:38Z</created-at>
|
7
|
+
<customer-id>42</customer-id>
|
8
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
9
|
+
<email>new@email.com</email>
|
10
|
+
<grace-until type="datetime">2013-05-02T00:07:37Z</grace-until>
|
11
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
12
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
13
|
+
<screen-name>bob</screen-name>
|
14
|
+
<store-credit type="decimal">0.0</store-credit>
|
15
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
16
|
+
<token>81ba778a5849f461ebc0d77e78b9221af2210c6b</token>
|
17
|
+
<updated-at type="datetime">2009-10-28T22:55:37Z</updated-at>
|
18
|
+
<recurring type="boolean">false</recurring>
|
19
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
20
|
+
<subscription-plan-name></subscription-plan-name>
|
21
|
+
<active type="boolean">false</active>
|
22
|
+
<in_grace_period type="boolean"></in_grace_period>
|
23
|
+
<on-trial type="boolean">false</on-trial>
|
24
|
+
<feature-level type="string">Pro</feature-level>
|
25
|
+
</subscriber>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<subscriber>
|
3
|
+
<active-until type="datetime" nil="true"></active-until>
|
4
|
+
<billing-first-name nil="true"></billing-first-name>
|
5
|
+
<billing-last-name nil="true"></billing-last-name>
|
6
|
+
<created-at type="datetime">2009-10-28T22:16:20Z</created-at>
|
7
|
+
<customer-id>8889</customer-id>
|
8
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
9
|
+
<email nil="true"></email>
|
10
|
+
<grace-until type="datetime" nil="true"></grace-until>
|
11
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
12
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
13
|
+
<screen-name>freddy</screen-name>
|
14
|
+
<store-credit type="decimal">0.0</store-credit>
|
15
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
16
|
+
<token>6af9994a57e420345897b1abb4c27a9db27fa4d0</token>
|
17
|
+
<updated-at type="datetime">2009-10-28T22:16:20Z</updated-at>
|
18
|
+
<recurring type="boolean">false</recurring>
|
19
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
20
|
+
<subscription-plan-name></subscription-plan-name>
|
21
|
+
<active type="boolean">false</active>
|
22
|
+
<in_grace_period type="boolean"></in_grace_period>
|
23
|
+
<on-trial type="boolean">false</on-trial>
|
24
|
+
<feature-level type="string"></feature-level>
|
25
|
+
</subscriber>
|
@@ -0,0 +1 @@
|
|
1
|
+
A subscriber with a customer-id of 8889 already exists.
|
@@ -0,0 +1 @@
|
|
1
|
+
The subscriber is not eligible for a free trial
|
@@ -0,0 +1 @@
|
|
1
|
+
The subscription plan must be a free trial plan.
|
@@ -0,0 +1 @@
|
|
1
|
+
You must specify the subscription plan id
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<subscriber>
|
3
|
+
<active-until type="datetime" nil="true"></active-until>
|
4
|
+
<billing-first-name nil="true"></billing-first-name>
|
5
|
+
<billing-last-name nil="true"></billing-last-name>
|
6
|
+
<created-at type="datetime">2009-10-28T22:27:38Z</created-at>
|
7
|
+
<customer-id>42</customer-id>
|
8
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
9
|
+
<email>new@email.com</email>
|
10
|
+
<grace-until type="datetime" nil="true">2013-05-02T00:07:37Z</grace-until>
|
11
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
12
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
13
|
+
<screen-name>bob</screen-name>
|
14
|
+
<store-credit type="decimal">0.0</store-credit>
|
15
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
16
|
+
<token>81ba778a5849f461ebc0d77e78b9221af2210c6b</token>
|
17
|
+
<updated-at type="datetime">2009-10-28T22:55:37Z</updated-at>
|
18
|
+
<recurring type="boolean">false</recurring>
|
19
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
20
|
+
<subscription-plan-name></subscription-plan-name>
|
21
|
+
<active type="boolean">false</active>
|
22
|
+
<in_grace_period type="boolean"></in_grace_period>
|
23
|
+
<on-trial type="boolean">true</on-trial>
|
24
|
+
<feature-level type="string"></feature-level>
|
25
|
+
</subscriber>
|
@@ -0,0 +1 @@
|
|
1
|
+
undefined method `delete' for nil:NilClass
|
@@ -0,0 +1 @@
|
|
1
|
+
You must specify subscriber parameters
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<invoice>
|
3
|
+
<closed type="boolean">false</closed>
|
4
|
+
<created-at type="datetime">2009-10-29T02:04:10Z</created-at>
|
5
|
+
<token>d06df8274ba261c203f62f7a64c2b18d6dff588e</token>
|
6
|
+
<updated-at type="datetime">2009-10-29T02:04:10Z</updated-at>
|
7
|
+
<price>$0.00</price>
|
8
|
+
<amount type="decimal">0.0</amount>
|
9
|
+
<currency-code>USD</currency-code>
|
10
|
+
<subscriber>
|
11
|
+
<active-until type="datetime" nil="true"></active-until>
|
12
|
+
<billing-first-name nil="true"></billing-first-name>
|
13
|
+
<billing-last-name nil="true"></billing-last-name>
|
14
|
+
<created-at type="datetime">2009-10-29T02:04:10Z</created-at>
|
15
|
+
<customer-id>44</customer-id>
|
16
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
17
|
+
<email>joe@example.com</email>
|
18
|
+
<grace-until type="datetime" nil="true"></grace-until>
|
19
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
20
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
21
|
+
<screen-name>joe</screen-name>
|
22
|
+
<store-credit type="decimal">0.0</store-credit>
|
23
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
24
|
+
<token>784d2d4199d6de062a27c2b84f0ad71aad1e14f1</token>
|
25
|
+
<updated-at type="datetime">2009-10-29T02:04:10Z</updated-at>
|
26
|
+
<recurring type="boolean">false</recurring>
|
27
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
28
|
+
<subscription-plan-name></subscription-plan-name>
|
29
|
+
<active type="boolean">false</active>
|
30
|
+
<in_grace_period type="boolean"></in_grace_period>
|
31
|
+
<on-trial type="boolean">false</on-trial>
|
32
|
+
<feature-level type="string"></feature-level>
|
33
|
+
</subscriber>
|
34
|
+
<line-items type="array">
|
35
|
+
<line-item>
|
36
|
+
<amount type="decimal">0.0</amount>
|
37
|
+
<currency-code>USD</currency-code>
|
38
|
+
<description>Initial 1 month</description>
|
39
|
+
<notes>Subsequent Time Periods are $19.00 every 1 month</notes>
|
40
|
+
<price>$0.00</price>
|
41
|
+
</line-item>
|
42
|
+
</line-items>
|
43
|
+
</invoice>
|
@@ -0,0 +1 @@
|
|
1
|
+
You must specify both the subscription plan id and subscriber information.
|
@@ -0,0 +1 @@
|
|
1
|
+
Unable to pay an invoice which has already been closed.
|
@@ -0,0 +1 @@
|
|
1
|
+
You must specify credit card parameters for the payment.
|
@@ -0,0 +1 @@
|
|
1
|
+
Unable to find invoice "5b1af186651dd988865c6573921ec87fa4bec23b8"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<invoice>
|
3
|
+
<closed type="boolean">true</closed>
|
4
|
+
<created-at type="datetime">2009-10-29T02:34:14Z</created-at>
|
5
|
+
<token>5b1f186651dd988865c6573921ec87fa4bec23b8</token>
|
6
|
+
<updated-at type="datetime">2009-10-29T02:42:47Z</updated-at>
|
7
|
+
<price>$0.00</price>
|
8
|
+
<amount type="decimal">0.0</amount>
|
9
|
+
<currency-code>USD</currency-code>
|
10
|
+
<subscriber>
|
11
|
+
<active-until type="datetime">2009-11-29T02:42:47Z</active-until>
|
12
|
+
<billing-first-name>Joe</billing-first-name>
|
13
|
+
<billing-last-name>Bob</billing-last-name>
|
14
|
+
<created-at type="datetime">2009-10-29T02:34:14Z</created-at>
|
15
|
+
<customer-id>400</customer-id>
|
16
|
+
<eligible-for-free-trial type="boolean">false</eligible-for-free-trial>
|
17
|
+
<email>test@example.com</email>
|
18
|
+
<grace-until type="datetime">2009-12-02T02:42:47Z</grace-until>
|
19
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
20
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
21
|
+
<screen-name>bob</screen-name>
|
22
|
+
<store-credit type="decimal">0.0</store-credit>
|
23
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
24
|
+
<token>c385a23a76d85400371d82cb24f383759cb28721</token>
|
25
|
+
<updated-at type="datetime">2009-10-29T02:42:47Z</updated-at>
|
26
|
+
<recurring type="boolean">true</recurring>
|
27
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
28
|
+
<subscription-plan-name>Personal</subscription-plan-name>
|
29
|
+
<active type="boolean">true</active>
|
30
|
+
<in_grace_period type="boolean">false</in_grace_period>
|
31
|
+
<on-trial type="boolean">false</on-trial>
|
32
|
+
<feature-level type="string">personal</feature-level>
|
33
|
+
</subscriber>
|
34
|
+
<line-items type="array">
|
35
|
+
<line-item>
|
36
|
+
<amount type="decimal">0.0</amount>
|
37
|
+
<currency-code>USD</currency-code>
|
38
|
+
<description>Initial 1 month</description>
|
39
|
+
<notes>Subsequent Time Periods are $19.00 every 1 month</notes>
|
40
|
+
<price>$0.00</price>
|
41
|
+
</line-item>
|
42
|
+
</line-items>
|
43
|
+
</invoice>
|
@@ -0,0 +1 @@
|
|
1
|
+
The subscription plan is temporarily unavailable for purchase. Please try again later.
|
@@ -0,0 +1 @@
|
|
1
|
+
There is no subscription plan with an ID of 9 for the site you're accessing
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<subscriber>
|
3
|
+
<active-until type="datetime" nil="true"></active-until>
|
4
|
+
<billing-first-name nil="true"></billing-first-name>
|
5
|
+
<billing-last-name nil="true"></billing-last-name>
|
6
|
+
<created-at type="datetime">2009-10-28T22:27:38Z</created-at>
|
7
|
+
<customer-id>42</customer-id>
|
8
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
9
|
+
<email>new@email.com</email>
|
10
|
+
<grace-until type="datetime" nil="true"></grace-until>
|
11
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
12
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
13
|
+
<screen-name>bob</screen-name>
|
14
|
+
<store-credit type="decimal">0.0</store-credit>
|
15
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
16
|
+
<token>81ba778a5849f461ebc0d77e78b9221af2210c6b</token>
|
17
|
+
<updated-at type="datetime">2009-10-28T22:55:37Z</updated-at>
|
18
|
+
<recurring type="boolean">false</recurring>
|
19
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
20
|
+
<subscription-plan-name></subscription-plan-name>
|
21
|
+
<active type="boolean">false</active>
|
22
|
+
<in_grace_period type="boolean"></in_grace_period>
|
23
|
+
<on-trial type="boolean">false</on-trial>
|
24
|
+
<feature-level type="string"></feature-level>
|
25
|
+
</subscriber>
|
@@ -0,0 +1 @@
|
|
1
|
+
There is no subscriber with a customer id of 401
|
@@ -0,0 +1,75 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<subscribers type="array">
|
3
|
+
<subscriber>
|
4
|
+
<active-until type="datetime" nil="true"></active-until>
|
5
|
+
<billing-first-name nil="true"></billing-first-name>
|
6
|
+
<billing-last-name nil="true"></billing-last-name>
|
7
|
+
<created-at type="datetime">2009-10-28T22:16:20Z</created-at>
|
8
|
+
<customer-id>8889</customer-id>
|
9
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
10
|
+
<email nil="true"></email>
|
11
|
+
<grace-until type="datetime" nil="true"></grace-until>
|
12
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
13
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
14
|
+
<screen-name>freddy</screen-name>
|
15
|
+
<store-credit type="decimal">0.0</store-credit>
|
16
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
17
|
+
<token>6af9994a57e420345897b1abb4c27a9db27fa4d0</token>
|
18
|
+
<updated-at type="datetime">2009-10-28T22:16:20Z</updated-at>
|
19
|
+
<recurring type="boolean">false</recurring>
|
20
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
21
|
+
<subscription-plan-name></subscription-plan-name>
|
22
|
+
<active type="boolean">false</active>
|
23
|
+
<in_grace_period type="boolean"></in_grace_period>
|
24
|
+
<on-trial type="boolean">false</on-trial>
|
25
|
+
<feature-level type="string"></feature-level>
|
26
|
+
</subscriber>
|
27
|
+
<subscriber>
|
28
|
+
<active-until type="datetime" nil="true"></active-until>
|
29
|
+
<billing-first-name nil="true"></billing-first-name>
|
30
|
+
<billing-last-name nil="true"></billing-last-name>
|
31
|
+
<created-at type="datetime">2009-10-28T22:26:57Z</created-at>
|
32
|
+
<customer-id>1889</customer-id>
|
33
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
34
|
+
<email nil="true"></email>
|
35
|
+
<grace-until type="datetime" nil="true"></grace-until>
|
36
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
37
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
38
|
+
<screen-name>freddy</screen-name>
|
39
|
+
<store-credit type="decimal">0.0</store-credit>
|
40
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
41
|
+
<token>9638cba1d938e1bd8e18b8075e077775a0bb9d21</token>
|
42
|
+
<updated-at type="datetime">2009-10-28T22:26:57Z</updated-at>
|
43
|
+
<recurring type="boolean">false</recurring>
|
44
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
45
|
+
<subscription-plan-name></subscription-plan-name>
|
46
|
+
<active type="boolean">false</active>
|
47
|
+
<in_grace_period type="boolean"></in_grace_period>
|
48
|
+
<on-trial type="boolean">false</on-trial>
|
49
|
+
<feature-level type="string"></feature-level>
|
50
|
+
</subscriber>
|
51
|
+
<subscriber>
|
52
|
+
<active-until type="datetime" nil="true"></active-until>
|
53
|
+
<billing-first-name nil="true"></billing-first-name>
|
54
|
+
<billing-last-name nil="true"></billing-last-name>
|
55
|
+
<created-at type="datetime">2009-10-28T22:27:38Z</created-at>
|
56
|
+
<customer-id>42</customer-id>
|
57
|
+
<eligible-for-free-trial type="boolean">true</eligible-for-free-trial>
|
58
|
+
<email>new@email.com</email>
|
59
|
+
<grace-until type="datetime" nil="true"></grace-until>
|
60
|
+
<lifetime-subscription type="boolean">false</lifetime-subscription>
|
61
|
+
<ready-to-renew type="boolean">false</ready-to-renew>
|
62
|
+
<screen-name>bob</screen-name>
|
63
|
+
<store-credit type="decimal">0.0</store-credit>
|
64
|
+
<store-credit-currency-code>USD</store-credit-currency-code>
|
65
|
+
<token>81ba778a5849f461ebc0d77e78b9221af2210c6b</token>
|
66
|
+
<updated-at type="datetime">2009-10-28T22:55:37Z</updated-at>
|
67
|
+
<recurring type="boolean">false</recurring>
|
68
|
+
<card-expires-before-next-auto-renew type="boolean">false</card-expires-before-next-auto-renew>
|
69
|
+
<subscription-plan-name></subscription-plan-name>
|
70
|
+
<active type="boolean">false</active>
|
71
|
+
<in_grace_period type="boolean"></in_grace_period>
|
72
|
+
<on-trial type="boolean">false</on-trial>
|
73
|
+
<feature-level type="string"></feature-level>
|
74
|
+
</subscriber>
|
75
|
+
</subscribers>
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<subscription-plans type="array">
|
3
|
+
<subscription-plan>
|
4
|
+
<amount type="decimal">19.0</amount>
|
5
|
+
<charge-after-first-period type="boolean">true</charge-after-first-period>
|
6
|
+
<charge-later-duration-quantity type="integer">1</charge-later-duration-quantity>
|
7
|
+
<charge-later-duration-units>months</charge-later-duration-units>
|
8
|
+
<created-at type="datetime">2009-10-26T00:28:41Z</created-at>
|
9
|
+
<currency-code>USD</currency-code>
|
10
|
+
<description></description>
|
11
|
+
<duration-quantity type="integer">1</duration-quantity>
|
12
|
+
<duration-units>months</duration-units>
|
13
|
+
<enabled type="boolean">true</enabled>
|
14
|
+
<feature-level>personal</feature-level>
|
15
|
+
<force-recurring type="boolean">true</force-recurring>
|
16
|
+
<id type="integer">42</id>
|
17
|
+
<name>Personal</name>
|
18
|
+
<needs-to-be-renewed type="boolean">true</needs-to-be-renewed>
|
19
|
+
<plan-type>regular</plan-type>
|
20
|
+
<return-url>http://example.com</return-url>
|
21
|
+
<updated-at type="datetime">2009-10-26T00:28:41Z</updated-at>
|
22
|
+
<terms type="string">1 month</terms>
|
23
|
+
<price type="decimal">19.0</price>
|
24
|
+
</subscription-plan>
|
25
|
+
<subscription-plan>
|
26
|
+
<amount type="decimal">49.0</amount>
|
27
|
+
<charge-after-first-period type="boolean">true</charge-after-first-period>
|
28
|
+
<charge-later-duration-quantity type="integer">1</charge-later-duration-quantity>
|
29
|
+
<charge-later-duration-units>months</charge-later-duration-units>
|
30
|
+
<created-at type="datetime">2009-10-26T00:29:07Z</created-at>
|
31
|
+
<currency-code>USD</currency-code>
|
32
|
+
<description></description>
|
33
|
+
<duration-quantity type="integer">1</duration-quantity>
|
34
|
+
<duration-units>months</duration-units>
|
35
|
+
<enabled type="boolean">true</enabled>
|
36
|
+
<feature-level>team</feature-level>
|
37
|
+
<force-recurring type="boolean">true</force-recurring>
|
38
|
+
<id type="integer">43</id>
|
39
|
+
<name>Team</name>
|
40
|
+
<needs-to-be-renewed type="boolean">true</needs-to-be-renewed>
|
41
|
+
<plan-type>regular</plan-type>
|
42
|
+
<return-url>http://example.com</return-url>
|
43
|
+
<updated-at type="datetime">2009-10-26T00:29:07Z</updated-at>
|
44
|
+
<terms type="string">1 month</terms>
|
45
|
+
<price type="decimal">49.0</price>
|
46
|
+
</subscription-plan>
|
47
|
+
<subscription-plan>
|
48
|
+
<amount type="decimal">99.0</amount>
|
49
|
+
<charge-after-first-period type="boolean">true</charge-after-first-period>
|
50
|
+
<charge-later-duration-quantity type="integer">1</charge-later-duration-quantity>
|
51
|
+
<charge-later-duration-units>months</charge-later-duration-units>
|
52
|
+
<created-at type="datetime">2009-10-26T00:29:39Z</created-at>
|
53
|
+
<currency-code>USD</currency-code>
|
54
|
+
<description></description>
|
55
|
+
<duration-quantity type="integer">1</duration-quantity>
|
56
|
+
<duration-units>months</duration-units>
|
57
|
+
<enabled type="boolean">true</enabled>
|
58
|
+
<feature-level>corporate</feature-level>
|
59
|
+
<force-recurring type="boolean">true</force-recurring>
|
60
|
+
<id type="integer">44</id>
|
61
|
+
<name>Corporate</name>
|
62
|
+
<needs-to-be-renewed type="boolean">true</needs-to-be-renewed>
|
63
|
+
<plan-type>regular</plan-type>
|
64
|
+
<return-url>http://example.com</return-url>
|
65
|
+
<updated-at type="datetime">2009-10-26T00:29:39Z</updated-at>
|
66
|
+
<terms type="string">1 month</terms>
|
67
|
+
<price type="decimal">99.0</price>
|
68
|
+
</subscription-plan>
|
69
|
+
<subscription-plan>
|
70
|
+
<amount type="decimal">0.0</amount>
|
71
|
+
<charge-after-first-period type="boolean">false</charge-after-first-period>
|
72
|
+
<charge-later-duration-quantity type="integer" nil="true"></charge-later-duration-quantity>
|
73
|
+
<charge-later-duration-units nil="true"></charge-later-duration-units>
|
74
|
+
<created-at type="datetime">2009-10-29T00:31:15Z</created-at>
|
75
|
+
<currency-code>USD</currency-code>
|
76
|
+
<description></description>
|
77
|
+
<duration-quantity type="integer">0</duration-quantity>
|
78
|
+
<duration-units>days</duration-units>
|
79
|
+
<enabled type="boolean">true</enabled>
|
80
|
+
<feature-level>free</feature-level>
|
81
|
+
<force-recurring type="boolean">false</force-recurring>
|
82
|
+
<id type="integer">45</id>
|
83
|
+
<name>Free Trial</name>
|
84
|
+
<needs-to-be-renewed type="boolean">false</needs-to-be-renewed>
|
85
|
+
<plan-type>free_trial</plan-type>
|
86
|
+
<return-url>http://example.com</return-url>
|
87
|
+
<updated-at type="datetime">2009-10-29T00:31:15Z</updated-at>
|
88
|
+
<terms type="string">Lifetime</terms>
|
89
|
+
<price type="decimal">0.0</price>
|
90
|
+
</subscription-plan>
|
91
|
+
</subscription-plans>
|