chargebee 2.6.4 → 2.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1524 -1488
- data/LICENSE +24 -24
- data/README.rdoc +41 -41
- data/chargebee.gemspec +4 -3
- data/lib/chargebee.rb +85 -85
- data/lib/chargebee/environment.rb +28 -28
- data/lib/chargebee/errors.rb +43 -43
- data/lib/chargebee/models/addon.rb +45 -45
- data/lib/chargebee/models/address.rb +18 -18
- data/lib/chargebee/models/card.rb +32 -32
- data/lib/chargebee/models/comment.rb +25 -25
- data/lib/chargebee/models/contact.rb +10 -10
- data/lib/chargebee/models/coupon.rb +40 -40
- data/lib/chargebee/models/coupon_code.rb +25 -25
- data/lib/chargebee/models/coupon_set.rb +37 -37
- data/lib/chargebee/models/credit_note.rb +77 -77
- data/lib/chargebee/models/credit_note_estimate.rb +35 -35
- data/lib/chargebee/models/customer.rb +137 -120
- data/lib/chargebee/models/download.rb +9 -9
- data/lib/chargebee/models/estimate.rb +46 -46
- data/lib/chargebee/models/event.rb +45 -45
- data/lib/chargebee/models/export.rb +86 -86
- data/lib/chargebee/models/gift.rb +42 -42
- data/lib/chargebee/models/hierarchy.rb +10 -0
- data/lib/chargebee/models/hosted_page.rb +77 -77
- data/lib/chargebee/models/invoice.rb +172 -172
- data/lib/chargebee/models/invoice_estimate.rb +35 -35
- data/lib/chargebee/models/model.rb +101 -101
- data/lib/chargebee/models/order.rb +76 -76
- data/lib/chargebee/models/payment_source.rb +79 -71
- data/lib/chargebee/models/plan.rb +60 -59
- data/lib/chargebee/models/portal_session.rb +30 -30
- data/lib/chargebee/models/promotional_credit.rb +30 -30
- data/lib/chargebee/models/quote.rb +72 -72
- data/lib/chargebee/models/resource_migration.rb +13 -13
- data/lib/chargebee/models/site_migration_detail.rb +14 -14
- data/lib/chargebee/models/subscription.rb +137 -137
- data/lib/chargebee/models/subscription_estimate.rb +13 -13
- data/lib/chargebee/models/third_party_payment_method.rb +9 -9
- data/lib/chargebee/models/time_machine.rb +46 -46
- data/lib/chargebee/models/token.rb +11 -0
- data/lib/chargebee/models/transaction.rb +62 -62
- data/lib/chargebee/models/unbilled_charge.rb +31 -31
- data/lib/chargebee/models/virtual_bank_account.rb +30 -26
- data/lib/chargebee/request.rb +27 -27
- data/lib/chargebee/rest.rb +92 -92
- data/lib/chargebee/result.rb +255 -240
- data/spec/errors_spec.rb +23 -23
- data/spec/sample_response.rb +73 -73
- metadata +5 -4
- data/lib/chargebee/.DS_Store +0 -0
data/spec/errors_spec.rb
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe 'ChargeBee::InvalidRequestError' do
|
4
|
-
let(:invalid_request_json) do
|
5
|
-
{
|
6
|
-
message: 'id: The value chargebee_account is already present.',
|
7
|
-
type: 'invalid_request',
|
8
|
-
api_error_code: 'duplicate_entry',
|
9
|
-
param: 'id',
|
10
|
-
error_code: 'param_not_unique',
|
11
|
-
error_msg: 'The value chargebee_account is already present.',
|
12
|
-
error_param: 'id',
|
13
|
-
http_status_code: 400
|
14
|
-
}
|
15
|
-
end
|
16
|
-
|
17
|
-
it "provide message from error api response" do
|
18
|
-
error = ChargeBee::InvalidRequestError.new(400, invalid_request_json)
|
19
|
-
error.message.should eq 'id: The value chargebee_account is already present.'
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'ChargeBee::InvalidRequestError' do
|
4
|
+
let(:invalid_request_json) do
|
5
|
+
{
|
6
|
+
message: 'id: The value chargebee_account is already present.',
|
7
|
+
type: 'invalid_request',
|
8
|
+
api_error_code: 'duplicate_entry',
|
9
|
+
param: 'id',
|
10
|
+
error_code: 'param_not_unique',
|
11
|
+
error_msg: 'The value chargebee_account is already present.',
|
12
|
+
error_param: 'id',
|
13
|
+
http_status_code: 400
|
14
|
+
}
|
15
|
+
end
|
16
|
+
|
17
|
+
it "provide message from error api response" do
|
18
|
+
error = ChargeBee::InvalidRequestError.new(400, invalid_request_json)
|
19
|
+
error.message.should eq 'id: The value chargebee_account is already present.'
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
data/spec/sample_response.rb
CHANGED
@@ -1,73 +1,73 @@
|
|
1
|
-
|
2
|
-
def api_index_urls()
|
3
|
-
{
|
4
|
-
:urls => ["http://mannar-test.localcb.com:8080/api/v1/subscriptions",
|
5
|
-
"http://mannar-test.localcb.com:8080/api/v1/customers",
|
6
|
-
"http://mannar-test.localcb.com:8080/api/v1/cards",
|
7
|
-
"http://mannar-test.localcb.com:8080/api/v1/invoices",
|
8
|
-
"http://mannar-test.localcb.com:8080/api/v1/transactions",
|
9
|
-
"http://mannar-test.localcb.com:8080/api/v1/hosted_pages",
|
10
|
-
"http://mannar-test.localcb.com:8080/api/v1/events"],
|
11
|
-
:version => "v2"
|
12
|
-
}
|
13
|
-
end
|
14
|
-
|
15
|
-
def simple_subscription
|
16
|
-
{
|
17
|
-
:subscription => {
|
18
|
-
:id => 'simple_subscription',
|
19
|
-
:plan_id => 'basic'
|
20
|
-
},
|
21
|
-
:customer => {
|
22
|
-
:first_name => 'simple',
|
23
|
-
:last_name => 'subscription'
|
24
|
-
}
|
25
|
-
}
|
26
|
-
end
|
27
|
-
|
28
|
-
def nested_subscription
|
29
|
-
{
|
30
|
-
:subscription => {
|
31
|
-
:id => 'nested_subscription',
|
32
|
-
:plan_id => 'basic',
|
33
|
-
:addons => [
|
34
|
-
{:id => 'monitor', :quantity => '10'},
|
35
|
-
{:id => 'ssl'}
|
36
|
-
]
|
37
|
-
}
|
38
|
-
}
|
39
|
-
end
|
40
|
-
|
41
|
-
def test_subscription
|
42
|
-
{
|
43
|
-
:subscription => {
|
44
|
-
:id => "sample_subscription",
|
45
|
-
:plan_id => "basic"
|
46
|
-
}
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
def list_subscriptions()
|
51
|
-
{:list => [test_subscription, test_subscription]}
|
52
|
-
end
|
53
|
-
|
54
|
-
def sample_event()
|
55
|
-
{:event => {
|
56
|
-
:id => 'ev_KyVqDX__dev__NTgtUgx1',
|
57
|
-
:occurred_at => 1325356232,
|
58
|
-
:event_type => "payment_collected",
|
59
|
-
:webhook_status => "succeeded",
|
60
|
-
:content => {
|
61
|
-
:subscription => {
|
62
|
-
:id => 'sample_subscription',
|
63
|
-
:plan_id => 'basic',
|
64
|
-
:plan_quantity=> 1,
|
65
|
-
},
|
66
|
-
:customer => {
|
67
|
-
:first_name => "Sample",
|
68
|
-
:last_name => "Subscription",
|
69
|
-
},
|
70
|
-
}
|
71
|
-
}
|
72
|
-
}
|
73
|
-
end
|
1
|
+
|
2
|
+
def api_index_urls()
|
3
|
+
{
|
4
|
+
:urls => ["http://mannar-test.localcb.com:8080/api/v1/subscriptions",
|
5
|
+
"http://mannar-test.localcb.com:8080/api/v1/customers",
|
6
|
+
"http://mannar-test.localcb.com:8080/api/v1/cards",
|
7
|
+
"http://mannar-test.localcb.com:8080/api/v1/invoices",
|
8
|
+
"http://mannar-test.localcb.com:8080/api/v1/transactions",
|
9
|
+
"http://mannar-test.localcb.com:8080/api/v1/hosted_pages",
|
10
|
+
"http://mannar-test.localcb.com:8080/api/v1/events"],
|
11
|
+
:version => "v2"
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
def simple_subscription
|
16
|
+
{
|
17
|
+
:subscription => {
|
18
|
+
:id => 'simple_subscription',
|
19
|
+
:plan_id => 'basic'
|
20
|
+
},
|
21
|
+
:customer => {
|
22
|
+
:first_name => 'simple',
|
23
|
+
:last_name => 'subscription'
|
24
|
+
}
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
def nested_subscription
|
29
|
+
{
|
30
|
+
:subscription => {
|
31
|
+
:id => 'nested_subscription',
|
32
|
+
:plan_id => 'basic',
|
33
|
+
:addons => [
|
34
|
+
{:id => 'monitor', :quantity => '10'},
|
35
|
+
{:id => 'ssl'}
|
36
|
+
]
|
37
|
+
}
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_subscription
|
42
|
+
{
|
43
|
+
:subscription => {
|
44
|
+
:id => "sample_subscription",
|
45
|
+
:plan_id => "basic"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
def list_subscriptions()
|
51
|
+
{:list => [test_subscription, test_subscription]}
|
52
|
+
end
|
53
|
+
|
54
|
+
def sample_event()
|
55
|
+
{:event => {
|
56
|
+
:id => 'ev_KyVqDX__dev__NTgtUgx1',
|
57
|
+
:occurred_at => 1325356232,
|
58
|
+
:event_type => "payment_collected",
|
59
|
+
:webhook_status => "succeeded",
|
60
|
+
:content => {
|
61
|
+
:subscription => {
|
62
|
+
:id => 'sample_subscription',
|
63
|
+
:plan_id => 'basic',
|
64
|
+
:plan_quantity=> 1,
|
65
|
+
},
|
66
|
+
:customer => {
|
67
|
+
:first_name => "Sample",
|
68
|
+
:last_name => "Subscription",
|
69
|
+
},
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chargebee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajaraman S
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-07-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -90,7 +90,6 @@ files:
|
|
90
90
|
- chargebee.gemspec
|
91
91
|
- lib/.DS_Store
|
92
92
|
- lib/chargebee.rb
|
93
|
-
- lib/chargebee/.DS_Store
|
94
93
|
- lib/chargebee/environment.rb
|
95
94
|
- lib/chargebee/errors.rb
|
96
95
|
- lib/chargebee/list_result.rb
|
@@ -110,6 +109,7 @@ files:
|
|
110
109
|
- lib/chargebee/models/event.rb
|
111
110
|
- lib/chargebee/models/export.rb
|
112
111
|
- lib/chargebee/models/gift.rb
|
112
|
+
- lib/chargebee/models/hierarchy.rb
|
113
113
|
- lib/chargebee/models/hosted_page.rb
|
114
114
|
- lib/chargebee/models/invoice.rb
|
115
115
|
- lib/chargebee/models/invoice_estimate.rb
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/chargebee/models/subscription_estimate.rb
|
127
127
|
- lib/chargebee/models/third_party_payment_method.rb
|
128
128
|
- lib/chargebee/models/time_machine.rb
|
129
|
+
- lib/chargebee/models/token.rb
|
129
130
|
- lib/chargebee/models/transaction.rb
|
130
131
|
- lib/chargebee/models/unbilled_charge.rb
|
131
132
|
- lib/chargebee/models/virtual_bank_account.rb
|
@@ -160,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
161
|
version: '0'
|
161
162
|
requirements: []
|
162
163
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
164
|
+
rubygems_version: 2.4.5
|
164
165
|
signing_key:
|
165
166
|
specification_version: 2
|
166
167
|
summary: Ruby client for Chargebee API.
|
data/lib/chargebee/.DS_Store
DELETED
Binary file
|