chargebee 2.6.2 → 2.6.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1483 -1473
- data/LICENSE +24 -24
- data/README.rdoc +41 -41
- data/Rakefile +150 -150
- data/chargebee.gemspec +2 -2
- data/lib/.DS_Store +0 -0
- data/lib/chargebee.rb +85 -85
- data/lib/chargebee/environment.rb +28 -28
- data/lib/chargebee/errors.rb +43 -43
- data/lib/chargebee/list_result.rb +28 -28
- 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 +120 -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 -82
- data/lib/chargebee/models/gift.rb +42 -42
- data/lib/chargebee/models/hosted_page.rb +77 -73
- 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 +71 -70
- data/lib/chargebee/models/plan.rb +59 -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/transaction.rb +62 -58
- data/lib/chargebee/models/unbilled_charge.rb +31 -31
- data/lib/chargebee/models/virtual_bank_account.rb +26 -26
- data/lib/chargebee/request.rb +27 -27
- data/lib/chargebee/rest.rb +92 -90
- data/lib/chargebee/result.rb +240 -240
- data/lib/chargebee/util.rb +56 -56
- data/lib/ssl/ca-certs.crt +3385 -3385
- data/spec/chargebee/list_result_spec.rb +53 -53
- data/spec/chargebee_spec.rb +99 -99
- data/spec/errors_spec.rb +23 -23
- data/spec/sample_response.rb +73 -73
- data/spec/spec_helper.rb +24 -24
- metadata +2 -2
data/LICENSE
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
The MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2011-2019 ChargeBee, Inc.
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person
|
6
|
-
obtaining a copy of this software and associated documentation
|
7
|
-
files (the "Software"), to deal in the Software without
|
8
|
-
restriction, including without limitation the rights to use,
|
9
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
copies of the Software, and to permit persons to whom the
|
11
|
-
Software is furnished to do so, subject to the following
|
12
|
-
conditions:
|
13
|
-
|
14
|
-
The above copyright notice and this permission notice shall be
|
15
|
-
included in all copies or substantial portions of the Software.
|
16
|
-
|
17
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19
|
-
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21
|
-
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011-2019 ChargeBee, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
6
|
+
obtaining a copy of this software and associated documentation
|
7
|
+
files (the "Software"), to deal in the Software without
|
8
|
+
restriction, including without limitation the rights to use,
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
copies of the Software, and to permit persons to whom the
|
11
|
+
Software is furnished to do so, subject to the following
|
12
|
+
conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be
|
15
|
+
included in all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
CHANGED
@@ -1,41 +1,41 @@
|
|
1
|
-
= Chargebee Ruby Client Library - API V2
|
2
|
-
|
3
|
-
{<img src="https://img.shields.io/gem/v/chargebee.svg?maxAge=2592000"/>}[https://rubygems.org/gems/chargebee]
|
4
|
-
{<img src="https://img.shields.io/gem/dtv/chargebee.svg?maxAge=2592000"/>}[https://rubygems.org/gems/chargebee]
|
5
|
-
|
6
|
-
This is the Ruby Library for integrating with Chargebee. Sign up for a Chargebee account {here}[https://www.chargebee.com].
|
7
|
-
|
8
|
-
Chargebee now supports two API versions - {V1}[https://apidocs.chargebee.com/docs/api/v1] and {V2}[https://apidocs.chargebee.com/docs/api], of which V2 is the latest release and all future developments will happen in V2. This library is for <b>API version V2</b>. If you’re looking for V1, head to {chargebee-v1 branch}[https://github.com/chargebee/chargebee-ruby/tree/chargebee-v1].
|
9
|
-
|
10
|
-
== Installation
|
11
|
-
|
12
|
-
Install the latest version of the gem with the following command...
|
13
|
-
|
14
|
-
$ sudo gem install chargebee -v '~>2'
|
15
|
-
|
16
|
-
|
17
|
-
== Requirements
|
18
|
-
|
19
|
-
* Ruby 1.9.3 or above.
|
20
|
-
* rest-client
|
21
|
-
|
22
|
-
== Documentation
|
23
|
-
|
24
|
-
For API reference see {here}[https://apidocs.chargebee.com/docs/api?lang=ruby]
|
25
|
-
|
26
|
-
== Usage
|
27
|
-
|
28
|
-
To create a new subscription:
|
29
|
-
|
30
|
-
ChargeBee.configure({:api_key => "your_api_key" , :site => "your_site"})
|
31
|
-
result = ChargeBee::Subscription.create({
|
32
|
-
:id => "sub_KyVqDh__dev__NTn4VZZ1",
|
33
|
-
:plan_id => "basic",
|
34
|
-
})
|
35
|
-
subscription = result.subscription
|
36
|
-
puts "created subscription is #{subscription}"
|
37
|
-
|
38
|
-
== License
|
39
|
-
|
40
|
-
See the LICENSE file.
|
41
|
-
|
1
|
+
= Chargebee Ruby Client Library - API V2
|
2
|
+
|
3
|
+
{<img src="https://img.shields.io/gem/v/chargebee.svg?maxAge=2592000"/>}[https://rubygems.org/gems/chargebee]
|
4
|
+
{<img src="https://img.shields.io/gem/dtv/chargebee.svg?maxAge=2592000"/>}[https://rubygems.org/gems/chargebee]
|
5
|
+
|
6
|
+
This is the Ruby Library for integrating with Chargebee. Sign up for a Chargebee account {here}[https://www.chargebee.com].
|
7
|
+
|
8
|
+
Chargebee now supports two API versions - {V1}[https://apidocs.chargebee.com/docs/api/v1] and {V2}[https://apidocs.chargebee.com/docs/api], of which V2 is the latest release and all future developments will happen in V2. This library is for <b>API version V2</b>. If you’re looking for V1, head to {chargebee-v1 branch}[https://github.com/chargebee/chargebee-ruby/tree/chargebee-v1].
|
9
|
+
|
10
|
+
== Installation
|
11
|
+
|
12
|
+
Install the latest version of the gem with the following command...
|
13
|
+
|
14
|
+
$ sudo gem install chargebee -v '~>2'
|
15
|
+
|
16
|
+
|
17
|
+
== Requirements
|
18
|
+
|
19
|
+
* Ruby 1.9.3 or above.
|
20
|
+
* rest-client
|
21
|
+
|
22
|
+
== Documentation
|
23
|
+
|
24
|
+
For API reference see {here}[https://apidocs.chargebee.com/docs/api?lang=ruby]
|
25
|
+
|
26
|
+
== Usage
|
27
|
+
|
28
|
+
To create a new subscription:
|
29
|
+
|
30
|
+
ChargeBee.configure({:api_key => "your_api_key" , :site => "your_site"})
|
31
|
+
result = ChargeBee::Subscription.create({
|
32
|
+
:id => "sub_KyVqDh__dev__NTn4VZZ1",
|
33
|
+
:plan_id => "basic",
|
34
|
+
})
|
35
|
+
subscription = result.subscription
|
36
|
+
puts "created subscription is #{subscription}"
|
37
|
+
|
38
|
+
== License
|
39
|
+
|
40
|
+
See the LICENSE file.
|
41
|
+
|
data/Rakefile
CHANGED
@@ -1,150 +1,150 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
require 'date'
|
4
|
-
|
5
|
-
#############################################################################
|
6
|
-
#
|
7
|
-
# Helper functions
|
8
|
-
#
|
9
|
-
#############################################################################
|
10
|
-
|
11
|
-
def name
|
12
|
-
@name ||= Dir['*.gemspec'].first.split('.').first
|
13
|
-
end
|
14
|
-
|
15
|
-
def version
|
16
|
-
line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
|
17
|
-
line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
|
18
|
-
end
|
19
|
-
|
20
|
-
def date
|
21
|
-
Date.today.to_s
|
22
|
-
end
|
23
|
-
|
24
|
-
def rubyforge_project
|
25
|
-
name
|
26
|
-
end
|
27
|
-
|
28
|
-
def gemspec_file
|
29
|
-
"#{name}.gemspec"
|
30
|
-
end
|
31
|
-
|
32
|
-
def gem_file
|
33
|
-
"#{name}-#{version}.gem"
|
34
|
-
end
|
35
|
-
|
36
|
-
def replace_header(head, header_name)
|
37
|
-
head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
|
38
|
-
end
|
39
|
-
|
40
|
-
#############################################################################
|
41
|
-
#
|
42
|
-
# Standard tasks
|
43
|
-
#
|
44
|
-
#############################################################################
|
45
|
-
|
46
|
-
task :default => :test
|
47
|
-
|
48
|
-
require 'rake/testtask'
|
49
|
-
Rake::TestTask.new(:test) do |test|
|
50
|
-
test.libs << 'lib' << 'test'
|
51
|
-
test.pattern = 'test/**/test_*.rb'
|
52
|
-
test.verbose = true
|
53
|
-
end
|
54
|
-
|
55
|
-
desc "Generate RCov test coverage and open in your browser"
|
56
|
-
task :coverage do
|
57
|
-
require 'rcov'
|
58
|
-
sh "rm -fr coverage"
|
59
|
-
sh "rcov test/test_*.rb"
|
60
|
-
sh "open coverage/index.html"
|
61
|
-
end
|
62
|
-
|
63
|
-
# require 'rake/rdoctask'
|
64
|
-
# Rake::RDocTask.new do |rdoc|
|
65
|
-
# rdoc.rdoc_dir = 'rdoc'
|
66
|
-
# rdoc.title = "#{name} #{version}"
|
67
|
-
# rdoc.rdoc_files.include('README*')
|
68
|
-
# rdoc.rdoc_files.include('lib/**/*.rb')
|
69
|
-
# end
|
70
|
-
|
71
|
-
desc "Open an irb session preloaded with this library"
|
72
|
-
task :console do
|
73
|
-
sh "irb -rubygems -r ./lib/#{name}.rb"
|
74
|
-
end
|
75
|
-
|
76
|
-
#############################################################################
|
77
|
-
#
|
78
|
-
# Custom tasks (add your own tasks here)
|
79
|
-
#
|
80
|
-
#############################################################################
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
#############################################################################
|
85
|
-
#
|
86
|
-
# Packaging tasks
|
87
|
-
#
|
88
|
-
#############################################################################
|
89
|
-
|
90
|
-
desc "Create tag v#{version} and build and push #{gem_file} to Rubygems"
|
91
|
-
task :release => :build do
|
92
|
-
unless `git branch` =~ /^\* master$/
|
93
|
-
puts "You must be on the master branch to release!"
|
94
|
-
exit!
|
95
|
-
end
|
96
|
-
sh "git commit --allow-empty -a -m 'Release #{version}'"
|
97
|
-
sh "git tag v#{version}"
|
98
|
-
sh "git push origin master"
|
99
|
-
sh "git push origin v#{version}"
|
100
|
-
sh "gem push pkg/#{name}-#{version}.gem"
|
101
|
-
end
|
102
|
-
|
103
|
-
desc "Build #{gem_file} into the pkg directory"
|
104
|
-
task :build => :gemspec do
|
105
|
-
sh "mkdir -p pkg"
|
106
|
-
sh "gem build #{gemspec_file}"
|
107
|
-
sh "mv #{gem_file} pkg"
|
108
|
-
end
|
109
|
-
|
110
|
-
desc "Generate #{gemspec_file}"
|
111
|
-
task :gemspec => :validate do
|
112
|
-
# read spec file and split out manifest section
|
113
|
-
spec = File.read(gemspec_file)
|
114
|
-
head, manifest, tail = spec.split(" # = MANIFEST =\n")
|
115
|
-
|
116
|
-
# replace name version and date
|
117
|
-
replace_header(head, :name)
|
118
|
-
replace_header(head, :version)
|
119
|
-
replace_header(head, :date)
|
120
|
-
#comment this out if your rubyforge_project has a different name
|
121
|
-
replace_header(head, :rubyforge_project)
|
122
|
-
|
123
|
-
# determine file list from git ls-files
|
124
|
-
files = `git ls-files`.
|
125
|
-
split("\n").
|
126
|
-
sort.
|
127
|
-
reject { |file| file =~ /^\./ }.
|
128
|
-
reject { |file| file =~ /^(rdoc|pkg)/ }.
|
129
|
-
map { |file| " #{file}" }.
|
130
|
-
join("\n")
|
131
|
-
|
132
|
-
# piece file back together and write
|
133
|
-
manifest = " s.files = %w[\n#{files}\n ]\n"
|
134
|
-
spec = [head, manifest, tail].join(" # = MANIFEST =\n")
|
135
|
-
File.open(gemspec_file, 'w') { |io| io.write(spec) }
|
136
|
-
puts "Updated #{gemspec_file}"
|
137
|
-
end
|
138
|
-
|
139
|
-
desc "Validate #{gemspec_file}"
|
140
|
-
task :validate do
|
141
|
-
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}", "lib/ssl"]
|
142
|
-
unless libfiles.empty?
|
143
|
-
puts "Directory `lib` should only contain a `#{name}.rb` file, `#{name}` dir and `lib/ssl` dir."
|
144
|
-
exit!
|
145
|
-
end
|
146
|
-
unless Dir['VERSION*'].empty?
|
147
|
-
puts "A `VERSION` file at root level violates Gem best practices."
|
148
|
-
exit!
|
149
|
-
end
|
150
|
-
end
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
#############################################################################
|
6
|
+
#
|
7
|
+
# Helper functions
|
8
|
+
#
|
9
|
+
#############################################################################
|
10
|
+
|
11
|
+
def name
|
12
|
+
@name ||= Dir['*.gemspec'].first.split('.').first
|
13
|
+
end
|
14
|
+
|
15
|
+
def version
|
16
|
+
line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
|
17
|
+
line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
|
18
|
+
end
|
19
|
+
|
20
|
+
def date
|
21
|
+
Date.today.to_s
|
22
|
+
end
|
23
|
+
|
24
|
+
def rubyforge_project
|
25
|
+
name
|
26
|
+
end
|
27
|
+
|
28
|
+
def gemspec_file
|
29
|
+
"#{name}.gemspec"
|
30
|
+
end
|
31
|
+
|
32
|
+
def gem_file
|
33
|
+
"#{name}-#{version}.gem"
|
34
|
+
end
|
35
|
+
|
36
|
+
def replace_header(head, header_name)
|
37
|
+
head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
|
38
|
+
end
|
39
|
+
|
40
|
+
#############################################################################
|
41
|
+
#
|
42
|
+
# Standard tasks
|
43
|
+
#
|
44
|
+
#############################################################################
|
45
|
+
|
46
|
+
task :default => :test
|
47
|
+
|
48
|
+
require 'rake/testtask'
|
49
|
+
Rake::TestTask.new(:test) do |test|
|
50
|
+
test.libs << 'lib' << 'test'
|
51
|
+
test.pattern = 'test/**/test_*.rb'
|
52
|
+
test.verbose = true
|
53
|
+
end
|
54
|
+
|
55
|
+
desc "Generate RCov test coverage and open in your browser"
|
56
|
+
task :coverage do
|
57
|
+
require 'rcov'
|
58
|
+
sh "rm -fr coverage"
|
59
|
+
sh "rcov test/test_*.rb"
|
60
|
+
sh "open coverage/index.html"
|
61
|
+
end
|
62
|
+
|
63
|
+
# require 'rake/rdoctask'
|
64
|
+
# Rake::RDocTask.new do |rdoc|
|
65
|
+
# rdoc.rdoc_dir = 'rdoc'
|
66
|
+
# rdoc.title = "#{name} #{version}"
|
67
|
+
# rdoc.rdoc_files.include('README*')
|
68
|
+
# rdoc.rdoc_files.include('lib/**/*.rb')
|
69
|
+
# end
|
70
|
+
|
71
|
+
desc "Open an irb session preloaded with this library"
|
72
|
+
task :console do
|
73
|
+
sh "irb -rubygems -r ./lib/#{name}.rb"
|
74
|
+
end
|
75
|
+
|
76
|
+
#############################################################################
|
77
|
+
#
|
78
|
+
# Custom tasks (add your own tasks here)
|
79
|
+
#
|
80
|
+
#############################################################################
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
#############################################################################
|
85
|
+
#
|
86
|
+
# Packaging tasks
|
87
|
+
#
|
88
|
+
#############################################################################
|
89
|
+
|
90
|
+
desc "Create tag v#{version} and build and push #{gem_file} to Rubygems"
|
91
|
+
task :release => :build do
|
92
|
+
unless `git branch` =~ /^\* master$/
|
93
|
+
puts "You must be on the master branch to release!"
|
94
|
+
exit!
|
95
|
+
end
|
96
|
+
sh "git commit --allow-empty -a -m 'Release #{version}'"
|
97
|
+
sh "git tag v#{version}"
|
98
|
+
sh "git push origin master"
|
99
|
+
sh "git push origin v#{version}"
|
100
|
+
sh "gem push pkg/#{name}-#{version}.gem"
|
101
|
+
end
|
102
|
+
|
103
|
+
desc "Build #{gem_file} into the pkg directory"
|
104
|
+
task :build => :gemspec do
|
105
|
+
sh "mkdir -p pkg"
|
106
|
+
sh "gem build #{gemspec_file}"
|
107
|
+
sh "mv #{gem_file} pkg"
|
108
|
+
end
|
109
|
+
|
110
|
+
desc "Generate #{gemspec_file}"
|
111
|
+
task :gemspec => :validate do
|
112
|
+
# read spec file and split out manifest section
|
113
|
+
spec = File.read(gemspec_file)
|
114
|
+
head, manifest, tail = spec.split(" # = MANIFEST =\n")
|
115
|
+
|
116
|
+
# replace name version and date
|
117
|
+
replace_header(head, :name)
|
118
|
+
replace_header(head, :version)
|
119
|
+
replace_header(head, :date)
|
120
|
+
#comment this out if your rubyforge_project has a different name
|
121
|
+
replace_header(head, :rubyforge_project)
|
122
|
+
|
123
|
+
# determine file list from git ls-files
|
124
|
+
files = `git ls-files`.
|
125
|
+
split("\n").
|
126
|
+
sort.
|
127
|
+
reject { |file| file =~ /^\./ }.
|
128
|
+
reject { |file| file =~ /^(rdoc|pkg)/ }.
|
129
|
+
map { |file| " #{file}" }.
|
130
|
+
join("\n")
|
131
|
+
|
132
|
+
# piece file back together and write
|
133
|
+
manifest = " s.files = %w[\n#{files}\n ]\n"
|
134
|
+
spec = [head, manifest, tail].join(" # = MANIFEST =\n")
|
135
|
+
File.open(gemspec_file, 'w') { |io| io.write(spec) }
|
136
|
+
puts "Updated #{gemspec_file}"
|
137
|
+
end
|
138
|
+
|
139
|
+
desc "Validate #{gemspec_file}"
|
140
|
+
task :validate do
|
141
|
+
libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}", "lib/ssl"]
|
142
|
+
unless libfiles.empty?
|
143
|
+
puts "Directory `lib` should only contain a `#{name}.rb` file, `#{name}` dir and `lib/ssl` dir."
|
144
|
+
exit!
|
145
|
+
end
|
146
|
+
unless Dir['VERSION*'].empty?
|
147
|
+
puts "A `VERSION` file at root level violates Gem best practices."
|
148
|
+
exit!
|
149
|
+
end
|
150
|
+
end
|
data/chargebee.gemspec
CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.rubygems_version = '1.3.5'
|
5
5
|
s.required_ruby_version = '>= 1.9.3'
|
6
6
|
s.name = 'chargebee'
|
7
|
-
s.version = '2.6.
|
8
|
-
s.date = '2019-
|
7
|
+
s.version = '2.6.3'
|
8
|
+
s.date = '2019-03-07'
|
9
9
|
|
10
10
|
s.summary = "Ruby client for Chargebee API."
|
11
11
|
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
|
data/lib/.DS_Store
CHANGED
Binary file
|
data/lib/chargebee.rb
CHANGED
@@ -1,85 +1,85 @@
|
|
1
|
-
require File.dirname(__FILE__) + '/chargebee/environment'
|
2
|
-
require File.dirname(__FILE__) + '/chargebee/rest'
|
3
|
-
require File.dirname(__FILE__) + '/chargebee/util'
|
4
|
-
require File.dirname(__FILE__) + '/chargebee/request'
|
5
|
-
require File.dirname(__FILE__) + '/chargebee/result'
|
6
|
-
require File.dirname(__FILE__) + '/chargebee/list_result'
|
7
|
-
|
8
|
-
require File.dirname(__FILE__) + '/chargebee/errors'
|
9
|
-
|
10
|
-
require File.dirname(__FILE__) + '/chargebee/models/model'
|
11
|
-
require File.dirname(__FILE__) + '/chargebee/models/subscription'
|
12
|
-
require File.dirname(__FILE__) + '/chargebee/models/customer'
|
13
|
-
require File.dirname(__FILE__) + '/chargebee/models/card'
|
14
|
-
require File.dirname(__FILE__) + '/chargebee/models/third_party_payment_method'
|
15
|
-
require File.dirname(__FILE__) + '/chargebee/models/address'
|
16
|
-
require File.dirname(__FILE__) + '/chargebee/models/transaction'
|
17
|
-
require File.dirname(__FILE__) + '/chargebee/models/invoice'
|
18
|
-
require File.dirname(__FILE__) + '/chargebee/models/order'
|
19
|
-
require File.dirname(__FILE__) + '/chargebee/models/credit_note'
|
20
|
-
require File.dirname(__FILE__) + '/chargebee/models/estimate'
|
21
|
-
require File.dirname(__FILE__) + '/chargebee/models/subscription_estimate'
|
22
|
-
require File.dirname(__FILE__) + '/chargebee/models/invoice_estimate'
|
23
|
-
require File.dirname(__FILE__) + '/chargebee/models/credit_note_estimate'
|
24
|
-
require File.dirname(__FILE__) + '/chargebee/models/hosted_page'
|
25
|
-
require File.dirname(__FILE__) + '/chargebee/models/event'
|
26
|
-
require File.dirname(__FILE__) + '/chargebee/models/plan'
|
27
|
-
require File.dirname(__FILE__) + '/chargebee/models/addon'
|
28
|
-
require File.dirname(__FILE__) + '/chargebee/models/coupon'
|
29
|
-
require File.dirname(__FILE__) + '/chargebee/models/coupon_code'
|
30
|
-
require File.dirname(__FILE__) + '/chargebee/models/coupon_set'
|
31
|
-
require File.dirname(__FILE__) + '/chargebee/models/comment'
|
32
|
-
require File.dirname(__FILE__) + '/chargebee/models/portal_session'
|
33
|
-
require File.dirname(__FILE__) + '/chargebee/models/download'
|
34
|
-
require File.dirname(__FILE__) + '/chargebee/models/site_migration_detail'
|
35
|
-
require File.dirname(__FILE__) + '/chargebee/models/resource_migration'
|
36
|
-
require File.dirname(__FILE__) + '/chargebee/models/payment_source'
|
37
|
-
require File.dirname(__FILE__) + '/chargebee/models/unbilled_charge'
|
38
|
-
require File.dirname(__FILE__) + '/chargebee/models/time_machine'
|
39
|
-
require File.dirname(__FILE__) + '/chargebee/models/promotional_credit.rb'
|
40
|
-
require File.dirname(__FILE__) + '/chargebee/models/virtual_bank_account.rb'
|
41
|
-
require File.dirname(__FILE__) + '/chargebee/models/export'
|
42
|
-
require File.dirname(__FILE__) + '/chargebee/models/gift'
|
43
|
-
require File.dirname(__FILE__) + '/chargebee/models/quote'
|
44
|
-
require File.dirname(__FILE__) + '/chargebee/models/contact.rb'
|
45
|
-
|
46
|
-
module ChargeBee
|
47
|
-
|
48
|
-
VERSION = '2.6.
|
49
|
-
|
50
|
-
@@default_env = nil
|
51
|
-
@@verify_ca_certs = true
|
52
|
-
@@ca_cert_path = File.join(File.dirname(__FILE__), '/ssl/ca-certs.crt')
|
53
|
-
@@user_agent = "Chargebee-Ruby-Client v#{self::VERSION}"
|
54
|
-
|
55
|
-
def self.configure(options)
|
56
|
-
@@default_env = Environment.new(options)
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.default_env
|
60
|
-
@@default_env
|
61
|
-
end
|
62
|
-
|
63
|
-
def self.verify_ca_certs=(verify)
|
64
|
-
@@verify_ca_certs = verify
|
65
|
-
end
|
66
|
-
|
67
|
-
def self.verify_ca_certs?
|
68
|
-
@@verify_ca_certs
|
69
|
-
end
|
70
|
-
|
71
|
-
def self.ca_cert_path
|
72
|
-
@@ca_cert_path
|
73
|
-
end
|
74
|
-
|
75
|
-
|
76
|
-
def self.source(source)
|
77
|
-
@@user_agent = @@user_agent + ' ' + source unless source.nil?
|
78
|
-
end
|
79
|
-
|
80
|
-
def self.user_agent
|
81
|
-
@@user_agent
|
82
|
-
end
|
83
|
-
|
84
|
-
end
|
85
|
-
|
1
|
+
require File.dirname(__FILE__) + '/chargebee/environment'
|
2
|
+
require File.dirname(__FILE__) + '/chargebee/rest'
|
3
|
+
require File.dirname(__FILE__) + '/chargebee/util'
|
4
|
+
require File.dirname(__FILE__) + '/chargebee/request'
|
5
|
+
require File.dirname(__FILE__) + '/chargebee/result'
|
6
|
+
require File.dirname(__FILE__) + '/chargebee/list_result'
|
7
|
+
|
8
|
+
require File.dirname(__FILE__) + '/chargebee/errors'
|
9
|
+
|
10
|
+
require File.dirname(__FILE__) + '/chargebee/models/model'
|
11
|
+
require File.dirname(__FILE__) + '/chargebee/models/subscription'
|
12
|
+
require File.dirname(__FILE__) + '/chargebee/models/customer'
|
13
|
+
require File.dirname(__FILE__) + '/chargebee/models/card'
|
14
|
+
require File.dirname(__FILE__) + '/chargebee/models/third_party_payment_method'
|
15
|
+
require File.dirname(__FILE__) + '/chargebee/models/address'
|
16
|
+
require File.dirname(__FILE__) + '/chargebee/models/transaction'
|
17
|
+
require File.dirname(__FILE__) + '/chargebee/models/invoice'
|
18
|
+
require File.dirname(__FILE__) + '/chargebee/models/order'
|
19
|
+
require File.dirname(__FILE__) + '/chargebee/models/credit_note'
|
20
|
+
require File.dirname(__FILE__) + '/chargebee/models/estimate'
|
21
|
+
require File.dirname(__FILE__) + '/chargebee/models/subscription_estimate'
|
22
|
+
require File.dirname(__FILE__) + '/chargebee/models/invoice_estimate'
|
23
|
+
require File.dirname(__FILE__) + '/chargebee/models/credit_note_estimate'
|
24
|
+
require File.dirname(__FILE__) + '/chargebee/models/hosted_page'
|
25
|
+
require File.dirname(__FILE__) + '/chargebee/models/event'
|
26
|
+
require File.dirname(__FILE__) + '/chargebee/models/plan'
|
27
|
+
require File.dirname(__FILE__) + '/chargebee/models/addon'
|
28
|
+
require File.dirname(__FILE__) + '/chargebee/models/coupon'
|
29
|
+
require File.dirname(__FILE__) + '/chargebee/models/coupon_code'
|
30
|
+
require File.dirname(__FILE__) + '/chargebee/models/coupon_set'
|
31
|
+
require File.dirname(__FILE__) + '/chargebee/models/comment'
|
32
|
+
require File.dirname(__FILE__) + '/chargebee/models/portal_session'
|
33
|
+
require File.dirname(__FILE__) + '/chargebee/models/download'
|
34
|
+
require File.dirname(__FILE__) + '/chargebee/models/site_migration_detail'
|
35
|
+
require File.dirname(__FILE__) + '/chargebee/models/resource_migration'
|
36
|
+
require File.dirname(__FILE__) + '/chargebee/models/payment_source'
|
37
|
+
require File.dirname(__FILE__) + '/chargebee/models/unbilled_charge'
|
38
|
+
require File.dirname(__FILE__) + '/chargebee/models/time_machine'
|
39
|
+
require File.dirname(__FILE__) + '/chargebee/models/promotional_credit.rb'
|
40
|
+
require File.dirname(__FILE__) + '/chargebee/models/virtual_bank_account.rb'
|
41
|
+
require File.dirname(__FILE__) + '/chargebee/models/export'
|
42
|
+
require File.dirname(__FILE__) + '/chargebee/models/gift'
|
43
|
+
require File.dirname(__FILE__) + '/chargebee/models/quote'
|
44
|
+
require File.dirname(__FILE__) + '/chargebee/models/contact.rb'
|
45
|
+
|
46
|
+
module ChargeBee
|
47
|
+
|
48
|
+
VERSION = '2.6.3'
|
49
|
+
|
50
|
+
@@default_env = nil
|
51
|
+
@@verify_ca_certs = true
|
52
|
+
@@ca_cert_path = File.join(File.dirname(__FILE__), '/ssl/ca-certs.crt')
|
53
|
+
@@user_agent = "Chargebee-Ruby-Client v#{self::VERSION}"
|
54
|
+
|
55
|
+
def self.configure(options)
|
56
|
+
@@default_env = Environment.new(options)
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.default_env
|
60
|
+
@@default_env
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.verify_ca_certs=(verify)
|
64
|
+
@@verify_ca_certs = verify
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.verify_ca_certs?
|
68
|
+
@@verify_ca_certs
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.ca_cert_path
|
72
|
+
@@ca_cert_path
|
73
|
+
end
|
74
|
+
|
75
|
+
|
76
|
+
def self.source(source)
|
77
|
+
@@user_agent = @@user_agent + ' ' + source unless source.nil?
|
78
|
+
end
|
79
|
+
|
80
|
+
def self.user_agent
|
81
|
+
@@user_agent
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|
85
|
+
|