chargebee 2.6.4 → 2.6.5

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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1501 -1488
  3. data/LICENSE +24 -24
  4. data/README.rdoc +41 -41
  5. data/chargebee.gemspec +2 -3
  6. data/lib/chargebee/environment.rb +28 -28
  7. data/lib/chargebee/errors.rb +43 -43
  8. data/lib/chargebee/models/addon.rb +45 -45
  9. data/lib/chargebee/models/address.rb +18 -18
  10. data/lib/chargebee/models/card.rb +32 -32
  11. data/lib/chargebee/models/comment.rb +25 -25
  12. data/lib/chargebee/models/contact.rb +10 -10
  13. data/lib/chargebee/models/coupon.rb +40 -40
  14. data/lib/chargebee/models/coupon_code.rb +25 -25
  15. data/lib/chargebee/models/coupon_set.rb +37 -37
  16. data/lib/chargebee/models/credit_note.rb +77 -77
  17. data/lib/chargebee/models/credit_note_estimate.rb +35 -35
  18. data/lib/chargebee/models/customer.rb +120 -120
  19. data/lib/chargebee/models/download.rb +9 -9
  20. data/lib/chargebee/models/estimate.rb +46 -46
  21. data/lib/chargebee/models/event.rb +45 -45
  22. data/lib/chargebee/models/export.rb +86 -86
  23. data/lib/chargebee/models/gift.rb +42 -42
  24. data/lib/chargebee/models/hosted_page.rb +77 -77
  25. data/lib/chargebee/models/invoice.rb +172 -172
  26. data/lib/chargebee/models/invoice_estimate.rb +35 -35
  27. data/lib/chargebee/models/model.rb +101 -101
  28. data/lib/chargebee/models/order.rb +76 -76
  29. data/lib/chargebee/models/payment_source.rb +75 -71
  30. data/lib/chargebee/models/plan.rb +60 -59
  31. data/lib/chargebee/models/portal_session.rb +30 -30
  32. data/lib/chargebee/models/promotional_credit.rb +30 -30
  33. data/lib/chargebee/models/quote.rb +72 -72
  34. data/lib/chargebee/models/resource_migration.rb +13 -13
  35. data/lib/chargebee/models/site_migration_detail.rb +14 -14
  36. data/lib/chargebee/models/subscription.rb +137 -137
  37. data/lib/chargebee/models/subscription_estimate.rb +13 -13
  38. data/lib/chargebee/models/third_party_payment_method.rb +9 -9
  39. data/lib/chargebee/models/time_machine.rb +46 -46
  40. data/lib/chargebee/models/transaction.rb +62 -62
  41. data/lib/chargebee/models/unbilled_charge.rb +31 -31
  42. data/lib/chargebee/models/virtual_bank_account.rb +30 -26
  43. data/lib/chargebee/request.rb +27 -27
  44. data/lib/chargebee/rest.rb +92 -92
  45. data/lib/chargebee/result.rb +240 -240
  46. data/lib/chargebee.rb +85 -85
  47. data/spec/errors_spec.rb +23 -23
  48. data/spec/sample_response.rb +73 -73
  49. metadata +3 -4
  50. 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
+
@@ -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
4
+ version: 2.6.5
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-03-22 00:00:00.000000000 Z
12
+ date: 2019-04-11 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
@@ -160,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
159
  version: '0'
161
160
  requirements: []
162
161
  rubyforge_project:
163
- rubygems_version: 2.0.14.1
162
+ rubygems_version: 2.4.5
164
163
  signing_key:
165
164
  specification_version: 2
166
165
  summary: Ruby client for Chargebee API.
Binary file