chargebee 2.26.1 → 2.27.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +22 -2
- data/Gemfile.lock +1 -1
- data/LICENSE +1 -1
- data/README.md +2 -2
- data/chargebee.gemspec +3 -2
- data/lib/chargebee/models/customer.rb +2 -2
- data/lib/chargebee/models/hosted_page.rb +4 -0
- data/lib/chargebee/models/item_price.rb +1 -1
- data/lib/chargebee/models/payment_source.rb +13 -1
- data/lib/chargebee/models/payment_voucher.rb +32 -0
- data/lib/chargebee/result.rb +7 -1
- data/lib/chargebee.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9e3b484d27a54b2d9f61499b7564d1977a181ce
|
4
|
+
data.tar.gz: a593b6873269dad17647d2d0d8a666c3c7218378
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b21345c220461ae7aa6c89129d7fcbb84857924e256fbad7f861028d5dfd0f0fb86917c2ad73164d670589c5dc935ea4b5a9e64c13fe7dc76569ec1ecd7111ca
|
7
|
+
data.tar.gz: e4149744cf10a05235a587609c2c6ace3dfaf6affabbf3b90136c6f017362dc439715c641c958e1e37a7825ea13ee19234e77faf59cbc2092c3c7eaf58d06666
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,27 @@
|
|
1
|
-
### v2.
|
1
|
+
### v2.27.0 (2023-05-31)
|
2
2
|
* * *
|
3
3
|
|
4
|
-
|
4
|
+
#### New endpoints:
|
5
|
+
* PaymentSource#CreateVoucherPaymentSource has been added to the PaymentSource resource.
|
6
|
+
* EventsRequest#HostedPage has been added to the PaymentSource resource.
|
7
|
+
|
8
|
+
#### New Resource:
|
9
|
+
* PaymentVoucher has been added.
|
10
|
+
|
11
|
+
#### New attributes:
|
12
|
+
* boleto and billing_address has been added to the PaymentSource resource.
|
13
|
+
* product_id has been added to the ItemPrice resource.
|
14
|
+
|
15
|
+
#### New Enum Class:
|
16
|
+
* EventNameEnum has been added.
|
17
|
+
* PaymentVoucherTypeEnum has been added.
|
18
|
+
* VoucherTypeEnum has been added.
|
19
|
+
|
20
|
+
#### New Enum values:
|
21
|
+
* product and variant has been added to EntityType enum.
|
22
|
+
* product_created, product_updated, product_deleted, variant_created, variant_updated and variant_deleted enums have been added in EventType enum.
|
23
|
+
* voucher_created, voucher_expired and voucher_create_failed have been added in EventType enum.
|
24
|
+
* boleto has been added in PaymentMethod and OfflinePaymentMethod and PaymentMethodTypeEnum#PaymentIntent.
|
5
25
|
|
6
26
|
|
7
27
|
### v2.26.0 (2023-05-16)
|
data/Gemfile.lock
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[](https://rubygems.org/gems/chargebee)
|
4
4
|
[](https://rubygems.org/gems/chargebee)
|
5
5
|
|
6
|
-
This is the Ruby Library for integrating with Chargebee. Sign up for a Chargebee account
|
6
|
+
This is the Ruby Library for integrating with Chargebee. Sign up for a Chargebee account [here](https://www.chargebee.com).
|
7
7
|
|
8
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
9
|
|
@@ -39,7 +39,7 @@ puts "created subscription is #{subscription}"
|
|
39
39
|
|
40
40
|
### Create an Idempotent Request
|
41
41
|
|
42
|
-
[Idempotency keys](https://apidocs.chargebee.com/docs/api) are passed along with request headers to allow a safe retry of POST requests.
|
42
|
+
[Idempotency keys](https://apidocs.chargebee.com/docs/api/idempotency?prod_cat_ver=2) are passed along with request headers to allow a safe retry of POST requests.
|
43
43
|
|
44
44
|
```ruby
|
45
45
|
require 'chargebee'
|
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.
|
8
|
-
s.date = '2023-05-
|
7
|
+
s.version = '2.27.1'
|
8
|
+
s.date = '2023-05-31'
|
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
11
|
|
@@ -78,6 +78,7 @@ Gem::Specification.new do |s|
|
|
78
78
|
lib/chargebee/models/order.rb
|
79
79
|
lib/chargebee/models/payment_intent.rb
|
80
80
|
lib/chargebee/models/payment_source.rb
|
81
|
+
lib/chargebee/models/payment_voucher.rb
|
81
82
|
lib/chargebee/models/plan.rb
|
82
83
|
lib/chargebee/models/portal_session.rb
|
83
84
|
lib/chargebee/models/promotional_credit.rb
|
@@ -53,7 +53,7 @@ module ChargeBee
|
|
53
53
|
# OPERATIONS
|
54
54
|
#-----------
|
55
55
|
|
56
|
-
def self.create(params
|
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
|
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
|
|
@@ -98,5 +98,9 @@ module ChargeBee
|
|
98
98
|
Request.send('post', uri_path("hosted_pages","pre_cancel"), params, env, headers)
|
99
99
|
end
|
100
100
|
|
101
|
+
def self.events(params, env=nil, headers={})
|
102
|
+
Request.send('post', uri_path("hosted_pages","events"), params, env, headers)
|
103
|
+
end
|
104
|
+
|
101
105
|
end # ~HostedPage
|
102
106
|
end # ~ChargeBee
|
@@ -13,7 +13,7 @@ module ChargeBee
|
|
13
13
|
attr_accessor :sku, :accounting_code, :accounting_category1, :accounting_category2, :accounting_category3, :accounting_category4
|
14
14
|
end
|
15
15
|
|
16
|
-
attr_accessor :id, :name, :item_family_id, :item_id, :description, :status, :external_name,
|
16
|
+
attr_accessor :id, :name, :item_family_id, :product_id, :item_id, :description, :status, :external_name,
|
17
17
|
:pricing_model, :price, :price_in_decimal, :period, :currency_code, :period_unit, :trial_period,
|
18
18
|
:trial_period_unit, :trial_end_action, :shipping_period, :shipping_period_unit, :billing_cycles,
|
19
19
|
:free_quantity, :free_quantity_in_decimal, :channel, :resource_version, :updated_at, :created_at,
|
@@ -9,6 +9,14 @@ module ChargeBee
|
|
9
9
|
attr_accessor :last4, :name_on_account, :first_name, :last_name, :bank_name, :mandate_id, :account_type, :echeck_type, :account_holder_type, :email
|
10
10
|
end
|
11
11
|
|
12
|
+
class CustVoucherSource < Model
|
13
|
+
attr_accessor :last4, :first_name, :last_name, :email
|
14
|
+
end
|
15
|
+
|
16
|
+
class BillingAddress < Model
|
17
|
+
attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
|
18
|
+
end
|
19
|
+
|
12
20
|
class AmazonPayment < Model
|
13
21
|
attr_accessor :email, :agreement_id
|
14
22
|
end
|
@@ -27,7 +35,7 @@ module ChargeBee
|
|
27
35
|
|
28
36
|
attr_accessor :id, :resource_version, :updated_at, :created_at, :customer_id, :type, :reference_id,
|
29
37
|
:status, :gateway, :gateway_account_id, :ip_address, :issuing_country, :card, :bank_account,
|
30
|
-
:amazon_payment, :upi, :paypal, :mandates, :deleted, :business_entity_id
|
38
|
+
:boleto, :billing_address, :amazon_payment, :upi, :paypal, :mandates, :deleted, :business_entity_id
|
31
39
|
|
32
40
|
# OPERATIONS
|
33
41
|
#-----------
|
@@ -48,6 +56,10 @@ module ChargeBee
|
|
48
56
|
Request.send('post', uri_path("payment_sources","create_using_payment_intent"), params, env, headers)
|
49
57
|
end
|
50
58
|
|
59
|
+
def self.create_voucher_payment_source(params, env=nil, headers={})
|
60
|
+
Request.send('post', uri_path("payment_sources","create_voucher_payment_source"), params, env, headers)
|
61
|
+
end
|
62
|
+
|
51
63
|
def self.create_card(params, env=nil, headers={})
|
52
64
|
Request.send('post', uri_path("payment_sources","create_card"), params, env, headers)
|
53
65
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module ChargeBee
|
2
|
+
class PaymentVoucher < Model
|
3
|
+
|
4
|
+
class LinkedInvoice < Model
|
5
|
+
attr_accessor :invoice_id, :txn_id, :applied_at
|
6
|
+
end
|
7
|
+
|
8
|
+
attr_accessor :id, :id_at_gateway, :payment_voucher_type, :expires_at, :status, :subscription_id,
|
9
|
+
:currency_code, :amount, :gateway_account_id, :payment_source_id, :gateway, :payload, :error_code,
|
10
|
+
:error_text, :url, :date, :resource_version, :updated_at, :customer_id, :linked_invoices
|
11
|
+
|
12
|
+
# OPERATIONS
|
13
|
+
#-----------
|
14
|
+
|
15
|
+
def self.create(params, env=nil, headers={})
|
16
|
+
Request.send('post', uri_path("payment_vouchers"), params, env, headers)
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.retrieve(id, env=nil, headers={})
|
20
|
+
Request.send('get', uri_path("payment_vouchers",id.to_s), {}, env, headers)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.payment_vouchers_for_invoice(id, params={}, env=nil, headers={})
|
24
|
+
Request.send('get', uri_path("invoices",id.to_s,"payment_vouchers"), params, env, headers)
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.payment_vouchers_for_customer(id, params={}, env=nil, headers={})
|
28
|
+
Request.send('get', uri_path("customers",id.to_s,"payment_vouchers"), params, env, headers)
|
29
|
+
end
|
30
|
+
|
31
|
+
end # ~PaymentVoucher
|
32
|
+
end # ~ChargeBee
|
data/lib/chargebee/result.rb
CHANGED
@@ -66,7 +66,7 @@ module ChargeBee
|
|
66
66
|
|
67
67
|
def payment_source()
|
68
68
|
payment_source = get(:payment_source, PaymentSource,
|
69
|
-
{:card => PaymentSource::Card, :bank_account => PaymentSource::BankAccount, :amazon_payment => PaymentSource::AmazonPayment, :upi => PaymentSource::Upi, :paypal => PaymentSource::Paypal, :mandates => PaymentSource::Mandate});
|
69
|
+
{:card => PaymentSource::Card, :bank_account => PaymentSource::BankAccount, :cust_voucher_source => PaymentSource::CustVoucherSource, :billing_address => PaymentSource::BillingAddress, :amazon_payment => PaymentSource::AmazonPayment, :upi => PaymentSource::Upi, :paypal => PaymentSource::Paypal, :mandates => PaymentSource::Mandate});
|
70
70
|
return payment_source;
|
71
71
|
end
|
72
72
|
|
@@ -344,6 +344,12 @@ module ChargeBee
|
|
344
344
|
return purchase;
|
345
345
|
end
|
346
346
|
|
347
|
+
def payment_voucher()
|
348
|
+
payment_voucher = get(:payment_voucher, PaymentVoucher,
|
349
|
+
{:linked_invoices => PaymentVoucher::LinkedInvoice});
|
350
|
+
return payment_voucher;
|
351
|
+
end
|
352
|
+
|
347
353
|
|
348
354
|
def unbilled_charges()
|
349
355
|
unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
|
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.27.1
|
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-05-
|
12
|
+
date: 2023-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json_pure
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/chargebee/models/order.rb
|
155
155
|
- lib/chargebee/models/payment_intent.rb
|
156
156
|
- lib/chargebee/models/payment_source.rb
|
157
|
+
- lib/chargebee/models/payment_voucher.rb
|
157
158
|
- lib/chargebee/models/plan.rb
|
158
159
|
- lib/chargebee/models/portal_session.rb
|
159
160
|
- lib/chargebee/models/promotional_credit.rb
|