chargebee 2.4.1 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c280a92f484b70c40ebc28caaa6077287e8a71d5
4
- data.tar.gz: e65cdadff50cadc98cd8c7908dbfca4ae78bf3b6
3
+ metadata.gz: 4d9be451d4110e7c84b98e6ce72b26e9b5ad7598
4
+ data.tar.gz: 3230331a80a901ea12d0af9f533c352a94b53ae9
5
5
  SHA512:
6
- metadata.gz: a03c48b90c3fad334077a4e9d30b1c8c5c2e227eec4d21791d7d8dc32d9c5a79c6ba18ff31d8461dcbb3ef3c7d3b94711d996183a4a2cd23510648912c061853
7
- data.tar.gz: 366df2572d6ed7274847c275b0f7dcd5864dc48704e725fbea39710cb6a8208dbafa47595c3916434fed89d0119c6d6d5d0884c9669e5a8a732c49cfd078b342
6
+ metadata.gz: b2b634772f921fc9f52dfead2a1db626d06edb640ee7740e4e543ba64fe480ba4e15c3d3ddf1b7b5ca37d831827bede0e4967f033aa9ea716e00689a76d9502b
7
+ data.tar.gz: b606a0825014b4e441d00603ca5dc26f5ea0cb61551fc6cae4083057df7e9390fe5213056458e76a009297f3568935848c20a73563488cdda08761552bbbc0af
@@ -1,3 +1,16 @@
1
+ ### v2.4.2 (2017-11-27)
2
+ * * *
3
+
4
+ ** API changes **:
5
+ * The new resource [Promotional Credits](http://apidocs.chargebee.com/docs/api/promotional_credits) has been added
6
+
7
+ * The new sub resource [balances](https://apidocs.chargebee.com/docs/api/customers#customer_balances) has been added
8
+
9
+ * The API end point add_promotional_credits, deduct_promotional_credits and set_promotional_credits has been deprecated in customer resource
10
+
11
+ ** Events added**:
12
+ * New Event Type promotional_credits_added and promotional_credits_deducted has been added
13
+
1
14
  ### v2.4.1 (2017-11-13)
2
15
  * * *
3
16
 
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2011-2016 ChargeBee, Inc.
3
+ Copyright (c) 2011-2017 ChargeBee, Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person
6
6
  obtaining a copy of this software and associated documentation
@@ -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.4.1'
8
- s.date = '2017-11-13'
7
+ s.version = '2.4.2'
8
+ s.date = '2017-11-27'
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."
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.authors = ['Rajaraman S', 'Thiyagarajan T']
14
14
  s.email = ['rr@chargebee.com', 'thiyagu@chargebee.com']
15
15
  s.homepage = 'https://apidocs.chargebee.com/api/docs?lang=ruby'
16
-
16
+ s.license = 'MIT'
17
17
 
18
18
  s.require_paths = %w[lib]
19
19
 
@@ -58,6 +58,7 @@ Gem::Specification.new do |s|
58
58
  lib/chargebee/models/payment_source.rb
59
59
  lib/chargebee/models/plan.rb
60
60
  lib/chargebee/models/portal_session.rb
61
+ lib/chargebee/models/promotional_credit.rb
61
62
  lib/chargebee/models/resource_migration.rb
62
63
  lib/chargebee/models/site_migration_detail.rb
63
64
  lib/chargebee/models/subscription.rb
@@ -36,10 +36,11 @@ require File.dirname(__FILE__) + '/chargebee/models/resource_migration'
36
36
  require File.dirname(__FILE__) + '/chargebee/models/payment_source'
37
37
  require File.dirname(__FILE__) + '/chargebee/models/unbilled_charge'
38
38
  require File.dirname(__FILE__) + '/chargebee/models/time_machine'
39
+ require File.dirname(__FILE__) + '/chargebee/models/promotional_credit.rb'
39
40
 
40
41
  module ChargeBee
41
42
 
42
- VERSION = '2.4.1'
43
+ VERSION = '2.4.2'
43
44
 
44
45
  @@default_env = nil
45
46
  @@verify_ca_certs = true
@@ -17,13 +17,17 @@ module ChargeBee
17
17
  attr_accessor :type, :gateway, :gateway_account_id, :status, :reference_id
18
18
  end
19
19
 
20
+ class Balance < Model
21
+ attr_accessor :promotional_credits, :excess_payments, :refundable_credits, :unbilled_charges, :balance_currency_code
22
+ end
23
+
20
24
  attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
21
25
  :net_term_days, :allow_direct_debit, :created_at, :created_from_ip, :taxability, :entity_code,
22
26
  :exempt_number, :resource_version, :updated_at, :locale, :consolidated_invoicing, :billing_date,
23
27
  :billing_date_mode, :billing_day_of_week, :billing_day_of_week_mode, :card_status, :fraud_flag,
24
28
  :primary_payment_source_id, :backup_payment_source_id, :billing_address, :referral_urls, :contacts,
25
29
  :payment_method, :invoice_notes, :preferred_currency_code, :promotional_credits, :unbilled_charges,
26
- :refundable_credits, :excess_payments, :meta_data, :deleted, :registered_for_gst
30
+ :refundable_credits, :excess_payments, :balances, :meta_data, :deleted, :registered_for_gst
27
31
 
28
32
  # OPERATIONS
29
33
  #-----------
@@ -0,0 +1,31 @@
1
+ module ChargeBee
2
+ class PromotionalCredit < Model
3
+
4
+ attr_accessor :id, :customer_id, :type, :amount, :currency_code, :description, :credit_type,
5
+ :reference, :closing_balance, :created_at
6
+
7
+ # OPERATIONS
8
+ #-----------
9
+
10
+ def self.add(params, env=nil, headers={})
11
+ Request.send('post', uri_path("promotional_credits","add"), params, env, headers)
12
+ end
13
+
14
+ def self.deduct(params, env=nil, headers={})
15
+ Request.send('post', uri_path("promotional_credits","deduct"), params, env, headers)
16
+ end
17
+
18
+ def self.set(params, env=nil, headers={})
19
+ Request.send('post', uri_path("promotional_credits","set"), params, env, headers)
20
+ end
21
+
22
+ def self.list(params={}, env=nil, headers={})
23
+ Request.send_list_request('get', uri_path("promotional_credits"), params, env, headers)
24
+ end
25
+
26
+ def self.retrieve(id, env=nil, headers={})
27
+ Request.send('get', uri_path("promotional_credits",id.to_s), {}, env, headers)
28
+ end
29
+
30
+ end # ~PromotionalCredit
31
+ end # ~ChargeBee
@@ -13,7 +13,7 @@ module ChargeBee
13
13
 
14
14
  def customer()
15
15
  customer = get(:customer, Customer,
16
- {:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod});
16
+ {:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod, :balances => Customer::Balance});
17
17
  return customer;
18
18
  end
19
19
 
@@ -33,6 +33,11 @@ module ChargeBee
33
33
  return card;
34
34
  end
35
35
 
36
+ def promotional_credit()
37
+ promotional_credit = get(:promotional_credit, PromotionalCredit);
38
+ return promotional_credit;
39
+ end
40
+
36
41
  def invoice()
37
42
  invoice = get(:invoice, Invoice,
38
43
  {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :line_item_discounts => Invoice::LineItemDiscount, :taxes => Invoice::Tax, :line_item_taxes => Invoice::LineItemTax, :linked_payments => Invoice::LinkedPayment, :applied_credits => Invoice::AppliedCredit, :adjustment_credit_notes => Invoice::AdjustmentCreditNote, :issued_credit_notes => Invoice::IssuedCreditNote, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
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.1
4
+ version: 2.4.2
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: 2017-11-13 00:00:00.000000000 Z
12
+ date: 2017-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -113,6 +113,7 @@ files:
113
113
  - lib/chargebee/models/payment_source.rb
114
114
  - lib/chargebee/models/plan.rb
115
115
  - lib/chargebee/models/portal_session.rb
116
+ - lib/chargebee/models/promotional_credit.rb
116
117
  - lib/chargebee/models/resource_migration.rb
117
118
  - lib/chargebee/models/site_migration_detail.rb
118
119
  - lib/chargebee/models/subscription.rb
@@ -132,7 +133,8 @@ files:
132
133
  - spec/sample_response.rb
133
134
  - spec/spec_helper.rb
134
135
  homepage: https://apidocs.chargebee.com/api/docs?lang=ruby
135
- licenses: []
136
+ licenses:
137
+ - MIT
136
138
  metadata: {}
137
139
  post_install_message:
138
140
  rdoc_options: