chargebee 2.27.1 → 2.28.0
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 +37 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/chargebee.gemspec +7 -4
- data/lib/chargebee/models/credit_note.rb +2 -2
- data/lib/chargebee/models/customer.rb +2 -2
- data/lib/chargebee/models/hosted_page.rb +4 -0
- data/lib/chargebee/models/invoice.rb +10 -6
- data/lib/chargebee/models/payment_reference_number.rb +10 -0
- data/lib/chargebee/result.rb +5 -0
- data/lib/chargebee.rb +1 -1
- metadata +6 -5
- data/README.rdoc +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05f9c3ec4f1ff2e33d378f56a27e511d0b399528
|
4
|
+
data.tar.gz: 2b719615782c37002f70d6f63e2458d89f841374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fc5b20f9d95df510c6b2323840c1b8db2788d0cb8bb88ab8444d8879b9ff49856150193d597a1264c8e5682a3d319c558adae4f802fcb13401f140991703d22
|
7
|
+
data.tar.gz: e6a3eccd9fa61cd526023a4cd01ba7b8a85e91082821a02f38335116f3e8b6041121b7ef364946949f393fcd9510fa541eb38b6230703ed8f3db3239d515a195
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,40 @@
|
|
1
|
+
### v2.28.0 (2023-06-30)
|
2
|
+
* * *
|
3
|
+
|
4
|
+
#### New endpoints:
|
5
|
+
* ViewVoucher#ViewVoucherRequest has been added to the HostedPage resource.
|
6
|
+
* InvoiceListPaymentReferenceNumbers#InvoiceListPaymentReferenceNumbersRequest has been added to the Invoice resource.
|
7
|
+
|
8
|
+
#### New Resource:
|
9
|
+
* PaymentReferenceNumber has been added.
|
10
|
+
|
11
|
+
#### New attributes:
|
12
|
+
* local_currency_exchange_rate has been added to the CreditNote and Invoice resource.
|
13
|
+
|
14
|
+
#### New Enum values:
|
15
|
+
* view_voucher has been added to Type enum in HostedPage resource.
|
16
|
+
* paused has been added in StoreStatus enum in InAppSubscription resource.
|
17
|
+
* metrics_global and windcave has been added in Gateway enum.
|
18
|
+
|
19
|
+
|
20
|
+
#### New Input parameters:
|
21
|
+
* payment_initiator has been added to Customers#CollectPaymentRequest.
|
22
|
+
* payment_initiator has been added to Invoice#CreateRequest.
|
23
|
+
* payment_initiator has been added to Invoice#ChargeRequest.
|
24
|
+
* payment_initiator has been added to Invoice#ChargeAddonRequest.
|
25
|
+
* payment_initiator has been added to Invoice#CollectPaymentRequest.
|
26
|
+
* payment_initiator has been added to Subscription#CreateRequest.
|
27
|
+
* payment_initiator has been added to Invoice#CreateForChargeItemRequest.
|
28
|
+
* payment_initiator has been added to Subscription#CreateForCustomerRequest.
|
29
|
+
* payment_initiator has been added to Subscription#CreateWithItemsRequest.
|
30
|
+
* payment_initiator has been added to Subscription#UpdateForItemsRequest.
|
31
|
+
* payment_initiator has been added to Subscription#ReactivateRequest.
|
32
|
+
* payment_initiator has been added to Subscription#ResumeRequest.
|
33
|
+
* payment_reference_numbers[id] has been added to Invoice#ImportInvoiceRequest.
|
34
|
+
* payment_reference_numbers[type] has been added to Invoice#ImportInvoiceRequest.
|
35
|
+
* payment_reference_numbers[number] has been added to Invoice#ImportInvoiceRequest.
|
36
|
+
|
37
|
+
|
1
38
|
### v2.27.0 (2023-05-31)
|
2
39
|
* * *
|
3
40
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Chargebee Ruby Client Library - API V2
|
2
2
|
|
3
|
-
[](https://rubygems.org/gems/chargebee)
|
4
|
+
[](https://rubygems.org/gems/chargebee)
|
5
5
|
|
6
6
|
This is the Ruby Library for integrating with Chargebee. Sign up for a Chargebee account [here](https://www.chargebee.com).
|
7
7
|
|
data/chargebee.gemspec
CHANGED
@@ -4,10 +4,13 @@ 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.
|
8
|
-
s.date = '2023-
|
7
|
+
s.version = '2.28.0'
|
8
|
+
s.date = '2023-06-30'
|
9
9
|
s.summary = "Ruby client for Chargebee API."
|
10
10
|
s.description = "Subscription Billing - Simple. Secure. Affordable. More details at www.chargebee.com."
|
11
|
+
s.metadata = {
|
12
|
+
"changelog_uri" => "https://github.com/chargebee/chargebee-ruby/blob/master/CHANGELOG.md"
|
13
|
+
}
|
11
14
|
|
12
15
|
s.authors = ['Rajaraman S', 'Thiyagarajan T']
|
13
16
|
s.email = ['rr@chargebee.com', 'thiyagu@chargebee.com']
|
@@ -17,7 +20,7 @@ Gem::Specification.new do |s|
|
|
17
20
|
s.require_paths = %w[lib]
|
18
21
|
|
19
22
|
s.rdoc_options = ["--charset=UTF-8"]
|
20
|
-
s.extra_rdoc_files = %w[README.
|
23
|
+
s.extra_rdoc_files = %w[README.md LICENSE]
|
21
24
|
|
22
25
|
s.add_dependency('json_pure', '~> 2.1')
|
23
26
|
s.add_dependency('rest-client', '>=1.8', '<=2.0.2')
|
@@ -32,7 +35,6 @@ Gem::Specification.new do |s|
|
|
32
35
|
Gemfile.lock
|
33
36
|
LICENSE
|
34
37
|
README.md
|
35
|
-
README.rdoc
|
36
38
|
Rakefile
|
37
39
|
chargebee.gemspec
|
38
40
|
lib/chargebee.rb
|
@@ -77,6 +79,7 @@ Gem::Specification.new do |s|
|
|
77
79
|
lib/chargebee/models/non_subscription.rb
|
78
80
|
lib/chargebee/models/order.rb
|
79
81
|
lib/chargebee/models/payment_intent.rb
|
82
|
+
lib/chargebee/models/payment_reference_number.rb
|
80
83
|
lib/chargebee/models/payment_source.rb
|
81
84
|
lib/chargebee/models/payment_voucher.rb
|
82
85
|
lib/chargebee/models/plan.rb
|
@@ -50,8 +50,8 @@ module ChargeBee
|
|
50
50
|
:amount_available, :refunded_at, :voided_at, :generated_at, :resource_version, :updated_at,
|
51
51
|
:channel, :einvoice, :sub_total, :sub_total_in_local_currency, :total_in_local_currency, :local_currency_code,
|
52
52
|
:round_off_amount, :fractional_correction, :line_items, :discounts, :line_item_discounts, :line_item_tiers,
|
53
|
-
:taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted, :
|
54
|
-
:business_entity_id, :shipping_address, :billing_address
|
53
|
+
:taxes, :line_item_taxes, :linked_refunds, :allocations, :deleted, :local_currency_exchange_rate,
|
54
|
+
:create_reason_code, :vat_number_prefix, :business_entity_id, :shipping_address, :billing_address
|
55
55
|
|
56
56
|
# OPERATIONS
|
57
57
|
#-----------
|
@@ -53,7 +53,7 @@ module ChargeBee
|
|
53
53
|
# OPERATIONS
|
54
54
|
#-----------
|
55
55
|
|
56
|
-
def self.create(params, env=nil, headers={})
|
56
|
+
def self.create(params={}, env=nil, headers={})
|
57
57
|
Request.send('post', uri_path("customers"), params, env, headers)
|
58
58
|
end
|
59
59
|
|
@@ -65,7 +65,7 @@ module ChargeBee
|
|
65
65
|
Request.send('get', uri_path("customers",id.to_s), {}, env, headers)
|
66
66
|
end
|
67
67
|
|
68
|
-
def self.update(id, params, env=nil, headers={})
|
68
|
+
def self.update(id, params={}, env=nil, headers={})
|
69
69
|
Request.send('post', uri_path("customers",id.to_s), params, env, headers)
|
70
70
|
end
|
71
71
|
|
@@ -102,5 +102,9 @@ module ChargeBee
|
|
102
102
|
Request.send('post', uri_path("hosted_pages","events"), params, env, headers)
|
103
103
|
end
|
104
104
|
|
105
|
+
def self.view_voucher(params, env=nil, headers={})
|
106
|
+
Request.send('post', uri_path("hosted_pages","view_voucher"), params, env, headers)
|
107
|
+
end
|
108
|
+
|
105
109
|
end # ~HostedPage
|
106
110
|
end # ~ChargeBee
|
@@ -69,12 +69,12 @@ module ChargeBee
|
|
69
69
|
:price_type, :date, :due_date, :net_term_days, :exchange_rate, :currency_code, :total, :amount_paid,
|
70
70
|
:amount_adjusted, :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status,
|
71
71
|
:next_retry_at, :voided_at, :resource_version, :updated_at, :sub_total, :sub_total_in_local_currency,
|
72
|
-
:total_in_local_currency, :local_currency_code, :tax, :
|
73
|
-
:
|
74
|
-
:
|
75
|
-
:
|
76
|
-
:
|
77
|
-
:vat_number_prefix, :channel, :business_entity_id
|
72
|
+
:total_in_local_currency, :local_currency_code, :tax, :local_currency_exchange_rate, :first_invoice,
|
73
|
+
:new_sales_amount, :has_advance_charges, :term_finalized, :is_gifted, :generated_at, :expected_payment_date,
|
74
|
+
:amount_to_collect, :round_off_amount, :line_items, :discounts, :line_item_discounts, :taxes,
|
75
|
+
:line_item_taxes, :line_item_tiers, :linked_payments, :dunning_attempts, :applied_credits, :adjustment_credit_notes,
|
76
|
+
:issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address, :einvoice,
|
77
|
+
:payment_owner, :void_reason_code, :deleted, :vat_number_prefix, :channel, :business_entity_id
|
78
78
|
|
79
79
|
# OPERATIONS
|
80
80
|
#-----------
|
@@ -147,6 +147,10 @@ module ChargeBee
|
|
147
147
|
Request.send('get', uri_path("invoices",id.to_s,"download_einvoice"), {}, env, headers)
|
148
148
|
end
|
149
149
|
|
150
|
+
def self.list_payment_reference_numbers(params={}, env=nil, headers={})
|
151
|
+
Request.send('get', uri_path("invoices","payment_reference_numbers"), params, env, headers)
|
152
|
+
end
|
153
|
+
|
150
154
|
def self.add_charge(id, params, env=nil, headers={})
|
151
155
|
Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env, headers)
|
152
156
|
end
|
data/lib/chargebee/result.rb
CHANGED
@@ -96,6 +96,11 @@ module ChargeBee
|
|
96
96
|
return invoice;
|
97
97
|
end
|
98
98
|
|
99
|
+
def payment_reference_number()
|
100
|
+
payment_reference_number = get(:payment_reference_number, PaymentReferenceNumber);
|
101
|
+
return payment_reference_number;
|
102
|
+
end
|
103
|
+
|
99
104
|
def tax_withheld()
|
100
105
|
tax_withheld = get(:tax_withheld, TaxWithheld);
|
101
106
|
return tax_withheld;
|
data/lib/chargebee.rb
CHANGED
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.
|
4
|
+
version: 2.28.0
|
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: 2023-
|
12
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -100,7 +100,7 @@ email:
|
|
100
100
|
executables: []
|
101
101
|
extensions: []
|
102
102
|
extra_rdoc_files:
|
103
|
-
- README.
|
103
|
+
- README.md
|
104
104
|
- LICENSE
|
105
105
|
files:
|
106
106
|
- CHANGELOG.md
|
@@ -108,7 +108,6 @@ files:
|
|
108
108
|
- Gemfile.lock
|
109
109
|
- LICENSE
|
110
110
|
- README.md
|
111
|
-
- README.rdoc
|
112
111
|
- Rakefile
|
113
112
|
- chargebee.gemspec
|
114
113
|
- lib/chargebee.rb
|
@@ -153,6 +152,7 @@ files:
|
|
153
152
|
- lib/chargebee/models/non_subscription.rb
|
154
153
|
- lib/chargebee/models/order.rb
|
155
154
|
- lib/chargebee/models/payment_intent.rb
|
155
|
+
- lib/chargebee/models/payment_reference_number.rb
|
156
156
|
- lib/chargebee/models/payment_source.rb
|
157
157
|
- lib/chargebee/models/payment_voucher.rb
|
158
158
|
- lib/chargebee/models/plan.rb
|
@@ -189,7 +189,8 @@ files:
|
|
189
189
|
homepage: https://apidocs.chargebee.com/api/docs?lang=ruby
|
190
190
|
licenses:
|
191
191
|
- MIT
|
192
|
-
metadata:
|
192
|
+
metadata:
|
193
|
+
changelog_uri: https://github.com/chargebee/chargebee-ruby/blob/master/CHANGELOG.md
|
193
194
|
post_install_message:
|
194
195
|
rdoc_options:
|
195
196
|
- --charset=UTF-8
|
data/README.rdoc
DELETED
@@ -1,41 +0,0 @@
|
|
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
|
-
|