chargebee 2.2.7 → 2.2.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ebed03245dd17530f4ec612fbddf23d80d2d4fc
4
- data.tar.gz: 976c09f5771072a4c2557ac437b8cb4f14f957ca
3
+ metadata.gz: 5bbae590ddfa795e02077a3d5b59efce0dd601f5
4
+ data.tar.gz: 49be8117dd9ac4e301edb5d901e1c0ae68eff0dd
5
5
  SHA512:
6
- metadata.gz: 26e094bee8119d88b4def5bf34d58718d2367f86720b4e4939d3465650a99174e5461e68b1f69cc3d004049a818fe04ef763517f1c332031de7d8daadde21f3c
7
- data.tar.gz: 29b1dc06022f263ad0eb7d753d35895a61a157e4a4252a9caae457f4cb321e0dd5ab8166e43ab8bbe921c530e832182e2dc566cabb7c3470f42fd2eb3595743d
6
+ metadata.gz: 5a63eddaabd3c63bebf3131dcd7aede7e8b79d35e28813a67f9c37f81faec546a42d129b137d380f90a3436ad1f459a588b3ca3b9aceccfe6819bb3c6e029afb
7
+ data.tar.gz: fe29ce26e1c99b17e3d2a28f3387c97a46c5891cd40041cbf40de5c6aff814e5b3434c2082f8b96846aef718b2213024c2799910c4e7f4fd3d2bbccbacbf265c
data/CHANGELOG.md CHANGED
@@ -1,3 +1,60 @@
1
+ ###v2.2.8 (2017-05-04)
2
+ * * *
3
+
4
+ ** APIs added**:
5
+ The new resources Payment Source has been added.
6
+ See: https://apidocs.chargebee.com/docs/api/payment_sources
7
+
8
+ The new resources Unbilled Charge has been added.
9
+ See : https://apidocs.chargebee.com/docs/api/unbilled_charges
10
+
11
+ The endpoint Assign payment role has been added to the Customer resource.
12
+ See : https://apidocs.chargebee.com/docs/api/customers#assign_payment_role
13
+
14
+ The endpoint Override Billing Profile has been added to the Subscription resource.
15
+ See : https://apidocs.chargebee.com/docs/api/subscriptions#override_billing_profile
16
+
17
+
18
+ ** APIs updated**:
19
+ The attribute payment_source_id has been added to the Card resource.
20
+ See : https://apidocs.chargebee.com/docs/api/cards#card_attributes
21
+
22
+ The attribute subscription_id has been added to the lineitems subresource in Invoice , Credit Note , Invoice estimate , Next invoice estimate and Credit Note estimate .
23
+ See : https://apidocs.chargebee.com/docs/api/invoices#invoice_attributes
24
+
25
+ The attributes consolidated_invoicing, primary_payment_source_id, backup_payment_source_id and the subresource list referral_urls have been added to the Customer resource.
26
+ See : https://apidocs.chargebee.com/docs/api/customers#customer_attributes
27
+
28
+ The attributes payment_source_id and auto_collection have been added to the Subscription resource.
29
+ See : https://apidocs.chargebee.com/docs/api/subscriptions#subscription_attributes
30
+
31
+ The subresource unbilled_charge_estimates has been added to the Estimate resource.
32
+ See : https://apidocs.chargebee.com/docs/api/estimates#unbilled_charge_estimate_attributes
33
+
34
+ The param consolidated_invoicing has been added to Create a customer and Update a customer APIs.
35
+ See : https://apidocs.chargebee.com/docs/api/customers#create_a_customer
36
+
37
+ The input params auto_collection, invoice_immediately and consolidated_invoicing have been added to Create subscription API.
38
+ See : https://apidocs.chargebee.com/docs/api/subscriptions#create_a_subscription
39
+
40
+ The input params auto_collection, payment_source_id and invoice_immediately have been added to Create subscription for customer API.
41
+ See : https://apidocs.chargebee.com/docs/api/subscriptions#create_subscription_for_customer
42
+
43
+ The input params credit_type and reference have been added to Add promotional credits for a customer , Deduct promotional credits for a customer and Set promotional credits for a customer APIs.
44
+ See : https://apidocs.chargebee.com/docs/api/customers#add_promotional_credits_to_a_customer
45
+
46
+ The input param invoice_immediately has been added to the Update a subscription , Reactivate subscription , Create subscription estimate , Create subscription for customer estimate and Update subscription estimate APIs.
47
+ See : https://apidocs.chargebee.com/docs/api/subscriptions#update_a_subscription
48
+
49
+ The input param auto_collection has been added to the Subscription subresource and consolidated_invoicing have been added to the Customer subresource in Checkout new subscription API.
50
+ See : https://apidocs.chargebee.com/docs/api/hosted_pages#checkout_new_subscription
51
+
52
+ The input param payment_source_id has been added to Import a subscription , Create an invoice , Create invoice for charge , Create invoice for addon and Collect payment for an invoice APIs.
53
+ See : https://apidocs.chargebee.com/docs/api/subscriptions#import_a_subscription
54
+
55
+ The event types payment_source_added, payment_source_updated and payment_source_deleted have been added.
56
+ See : https://apidocs.chargebee.com/docs/api/events#event_types
57
+
1
58
  ###v2.2.7 (2017-04-19)
2
59
  * * *
3
60
 
data/chargebee.gemspec CHANGED
@@ -4,8 +4,8 @@ Gem::Specification.new do |s|
4
4
  s.rubygems_version = '1.3.5'
5
5
 
6
6
  s.name = 'chargebee'
7
- s.version = '2.2.7'
8
- s.date = '2017-04-19'
7
+ s.version = '2.2.8'
8
+ s.date = '2017-05-04'
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."
@@ -54,6 +54,7 @@ Gem::Specification.new do |s|
54
54
  lib/chargebee/models/invoice_estimate.rb
55
55
  lib/chargebee/models/model.rb
56
56
  lib/chargebee/models/order.rb
57
+ lib/chargebee/models/payment_source.rb
57
58
  lib/chargebee/models/plan.rb
58
59
  lib/chargebee/models/portal_session.rb
59
60
  lib/chargebee/models/resource_migration.rb
@@ -62,6 +63,7 @@ Gem::Specification.new do |s|
62
63
  lib/chargebee/models/subscription_estimate.rb
63
64
  lib/chargebee/models/third_party_payment_method.rb
64
65
  lib/chargebee/models/transaction.rb
66
+ lib/chargebee/models/unbilled_charge.rb
65
67
  lib/chargebee/request.rb
66
68
  lib/chargebee/rest.rb
67
69
  lib/chargebee/result.rb
data/lib/chargebee.rb CHANGED
@@ -32,10 +32,12 @@ require File.dirname(__FILE__) + '/chargebee/models/portal_session'
32
32
  require File.dirname(__FILE__) + '/chargebee/models/download'
33
33
  require File.dirname(__FILE__) + '/chargebee/models/site_migration_detail'
34
34
  require File.dirname(__FILE__) + '/chargebee/models/resource_migration'
35
+ require File.dirname(__FILE__) + '/chargebee/models/payment_source'
36
+ require File.dirname(__FILE__) + '/chargebee/models/unbilled_charge'
35
37
 
36
38
  module ChargeBee
37
39
 
38
- VERSION = '2.2.7'
40
+ VERSION = '2.2.8'
39
41
 
40
42
  @@default_env = nil
41
43
  @@verify_ca_certs = true
@@ -1,10 +1,10 @@
1
1
  module ChargeBee
2
2
  class Card < Model
3
3
 
4
- attr_accessor :customer_id, :status, :gateway, :gateway_account_id, :first_name, :last_name,
4
+ attr_accessor :payment_source_id, :status, :gateway, :gateway_account_id, :first_name, :last_name,
5
5
  :iin, :last4, :card_type, :funding_type, :expiry_month, :expiry_year, :billing_addr1, :billing_addr2,
6
6
  :billing_city, :billing_state_code, :billing_state, :billing_country, :billing_zip, :ip_address,
7
- :masked_number
7
+ :customer_id, :masked_number
8
8
 
9
9
  # OPERATIONS
10
10
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNote < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class CreditNoteEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -5,6 +5,10 @@ module ChargeBee
5
5
  attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
6
6
  end
7
7
 
8
+ class ReferralUrl < Model
9
+ attr_accessor :external_customer_id, :referral_sharing_url, :created_at, :updated_at, :referral_campaign_id, :referral_account_id, :referral_external_campaign_id, :referral_system
10
+ end
11
+
8
12
  class Contact < Model
9
13
  attr_accessor :id, :first_name, :last_name, :email, :phone, :label, :enabled, :send_account_email, :send_billing_email
10
14
  end
@@ -15,7 +19,8 @@ module ChargeBee
15
19
 
16
20
  attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
17
21
  :net_term_days, :allow_direct_debit, :created_at, :created_from_ip, :taxability, :entity_code,
18
- :exempt_number, :resource_version, :updated_at, :locale, :card_status, :fraud_flag, :billing_address,
22
+ :exempt_number, :resource_version, :updated_at, :locale, :consolidated_invoicing, :card_status,
23
+ :fraud_flag, :primary_payment_source_id, :backup_payment_source_id, :billing_address, :referral_urls,
19
24
  :contacts, :payment_method, :invoice_notes, :preferred_currency_code, :promotional_credits,
20
25
  :refundable_credits, :excess_payments, :meta_data, :deleted
21
26
 
@@ -46,6 +51,10 @@ module ChargeBee
46
51
  Request.send('post', uri_path("customers",id.to_s,"update_billing_info"), params, env, headers)
47
52
  end
48
53
 
54
+ def self.assign_payment_role(id, params, env=nil, headers={})
55
+ Request.send('post', uri_path("customers",id.to_s,"assign_payment_role"), params, env, headers)
56
+ end
57
+
49
58
  def self.add_contact(id, params, env=nil, headers={})
50
59
  Request.send('post', uri_path("customers",id.to_s,"add_contact"), params, env, headers)
51
60
  end
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Estimate < Model
3
3
 
4
4
  attr_accessor :created_at, :subscription_estimate, :invoice_estimate, :next_invoice_estimate,
5
- :credit_note_estimates
5
+ :credit_note_estimates, :unbilled_charge_estimates
6
6
 
7
7
  # OPERATIONS
8
8
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Invoice < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class InvoiceEstimate < Model
3
3
 
4
4
  class LineItem < Model
5
- attr_accessor :id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :is_taxed, :tax_amount, :tax_rate, :amount, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
6
6
  end
7
7
 
8
8
  class Discount < Model
@@ -0,0 +1,59 @@
1
+ module ChargeBee
2
+ class PaymentSource < Model
3
+
4
+ class Card < Model
5
+ attr_accessor :first_name, :last_name, :iin, :last4, :brand, :funding_type, :expiry_month, :expiry_year, :billing_addr1, :billing_addr2, :billing_city, :billing_state_code, :billing_state, :billing_country, :billing_zip, :masked_number
6
+ end
7
+
8
+ class BankAccount < Model
9
+ attr_accessor :name_on_account, :bank_name, :mandate_id, :account_type
10
+ end
11
+
12
+ class AmazonPayment < Model
13
+ attr_accessor :email, :agreement_id
14
+ end
15
+
16
+ class Paypal < Model
17
+ attr_accessor :email, :agreement_id
18
+ end
19
+
20
+ attr_accessor :id, :customer_id, :type, :reference_id, :status, :gateway, :gateway_account_id,
21
+ :ip_address, :card, :bank_account, :amazon_payment, :paypal
22
+
23
+ # OPERATIONS
24
+ #-----------
25
+
26
+ def self.create_using_temp_token(params, env=nil, headers={})
27
+ Request.send('post', uri_path("payment_sources","create_using_temp_token"), params, env, headers)
28
+ end
29
+
30
+ def self.create_using_permanent_token(params, env=nil, headers={})
31
+ Request.send('post', uri_path("payment_sources","create_using_permanent_token"), params, env, headers)
32
+ end
33
+
34
+ def self.create_card(params, env=nil, headers={})
35
+ Request.send('post', uri_path("payment_sources","create_card"), params, env, headers)
36
+ end
37
+
38
+ def self.retrieve(id, env=nil, headers={})
39
+ Request.send('get', uri_path("payment_sources",id.to_s), {}, env, headers)
40
+ end
41
+
42
+ def self.list(params={}, env=nil, headers={})
43
+ Request.send_list_request('get', uri_path("payment_sources"), params, env, headers)
44
+ end
45
+
46
+ def self.switch_gateway_account(id, params, env=nil, headers={})
47
+ Request.send('post', uri_path("payment_sources",id.to_s,"switch_gateway_account"), params, env, headers)
48
+ end
49
+
50
+ def self.export_payment_source(id, params, env=nil, headers={})
51
+ Request.send('post', uri_path("payment_sources",id.to_s,"export_payment_source"), params, env, headers)
52
+ end
53
+
54
+ def self.delete(id, env=nil, headers={})
55
+ Request.send('post', uri_path("payment_sources",id.to_s,"delete"), {}, env, headers)
56
+ end
57
+
58
+ end # ~PaymentSource
59
+ end # ~ChargeBee
@@ -13,13 +13,17 @@ module ChargeBee
13
13
  attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
14
14
  end
15
15
 
16
+ class ReferralInfo < Model
17
+ attr_accessor :referral_code, :coupon_code, :referrer_id, :external_reference_id, :reward_status, :referral_system, :account_id, :campaign_id, :external_campaign_id, :friend_offer_type, :referrer_reward_type, :notify_referral_system, :destination_url, :post_purchase_widget_enabled
18
+ end
19
+
16
20
  attr_accessor :id, :customer_id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price,
17
21
  :setup_fee, :billing_period, :billing_period_unit, :plan_free_quantity, :status, :start_date,
18
22
  :trial_start, :trial_end, :current_term_start, :current_term_end, :next_billing_at, :remaining_billing_cycles,
19
23
  :po_number, :created_at, :started_at, :activated_at, :cancelled_at, :cancel_reason, :affiliate_token,
20
- :created_from_ip, :resource_version, :updated_at, :has_scheduled_changes, :due_invoices_count,
21
- :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons, :coupon, :coupons,
22
- :shipping_address, :invoice_notes, :meta_data, :deleted
24
+ :created_from_ip, :resource_version, :updated_at, :has_scheduled_changes, :payment_source_id,
25
+ :auto_collection, :due_invoices_count, :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code,
26
+ :addons, :coupon, :coupons, :shipping_address, :referral_info, :invoice_notes, :meta_data, :deleted
23
27
 
24
28
  # OPERATIONS
25
29
  #-----------
@@ -96,6 +100,10 @@ module ChargeBee
96
100
  Request.send('post', uri_path("customers",id.to_s,"import_subscription"), params, env, headers)
97
101
  end
98
102
 
103
+ def self.override_billing_profile(id, params={}, env=nil, headers={})
104
+ Request.send('post', uri_path("subscriptions",id.to_s,"override_billing_profile"), params, env, headers)
105
+ end
106
+
99
107
  def self.delete(id, env=nil, headers={})
100
108
  Request.send('post', uri_path("subscriptions",id.to_s,"delete"), {}, env, headers)
101
109
  end
@@ -0,0 +1,24 @@
1
+ module ChargeBee
2
+ class UnbilledCharge < Model
3
+
4
+ attr_accessor :id, :customer_id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity,
5
+ :amount, :currency_code, :discount_amount, :description, :entity_type, :entity_id, :is_voided,
6
+ :voided_at
7
+
8
+ # OPERATIONS
9
+ #-----------
10
+
11
+ def self.invoice_unbilled_charges(params={}, env=nil, headers={})
12
+ Request.send('post', uri_path("unbilled_charges","invoice_unbilled_charges"), params, env, headers)
13
+ end
14
+
15
+ def self.delete(id, env=nil, headers={})
16
+ Request.send('post', uri_path("unbilled_charges",id.to_s,"delete"), {}, env, headers)
17
+ end
18
+
19
+ def self.list(params={}, env=nil, headers={})
20
+ Request.send_list_request('get', uri_path("unbilled_charges"), params, env, headers)
21
+ end
22
+
23
+ end # ~UnbilledCharge
24
+ end # ~ChargeBee
@@ -7,19 +7,20 @@ module ChargeBee
7
7
 
8
8
  def subscription()
9
9
  subscription = get(:subscription, Subscription,
10
- {:addons => Subscription::Addon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress});
10
+ {:addons => Subscription::Addon, :coupons => Subscription::Coupon, :shipping_address => Subscription::ShippingAddress, :referral_info => Subscription::ReferralInfo});
11
11
  return subscription;
12
12
  end
13
13
 
14
14
  def customer()
15
15
  customer = get(:customer, Customer,
16
- {:billing_address => Customer::BillingAddress, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod});
16
+ {:billing_address => Customer::BillingAddress, :referral_urls => Customer::ReferralUrl, :contacts => Customer::Contact, :payment_method => Customer::PaymentMethod});
17
17
  return customer;
18
18
  end
19
19
 
20
- def card()
21
- card = get(:card, Card);
22
- return card;
20
+ def payment_source()
21
+ payment_source = get(:payment_source, PaymentSource,
22
+ {:card => PaymentSource::Card, :bank_account => PaymentSource::BankAccount, :amazon_payment => PaymentSource::AmazonPayment, :paypal => PaymentSource::Paypal});
23
+ return payment_source;
23
24
  end
24
25
 
25
26
  def third_party_payment_method()
@@ -27,6 +28,11 @@ module ChargeBee
27
28
  return third_party_payment_method;
28
29
  end
29
30
 
31
+ def card()
32
+ card = get(:card, Card);
33
+ return card;
34
+ end
35
+
30
36
  def invoice()
31
37
  invoice = get(:invoice, Invoice,
32
38
  {: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});
@@ -39,6 +45,11 @@ module ChargeBee
39
45
  return credit_note;
40
46
  end
41
47
 
48
+ def unbilled_charge()
49
+ unbilled_charge = get(:unbilled_charge, UnbilledCharge);
50
+ return unbilled_charge;
51
+ end
52
+
42
53
  def order()
43
54
  order = get(:order, Order);
44
55
  return order;
@@ -57,7 +68,7 @@ module ChargeBee
57
68
 
58
69
  def estimate()
59
70
  estimate = get(:estimate, Estimate, {},
60
- {:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate});
71
+ {:subscription_estimate => SubscriptionEstimate, :invoice_estimate => InvoiceEstimate, :next_invoice_estimate => InvoiceEstimate, :credit_note_estimates => CreditNoteEstimate, :unbilled_charge_estimates => UnbilledCharge});
61
72
  estimate.init_dependant(@response[:estimate], :subscription_estimate,
62
73
  {:shipping_address => SubscriptionEstimate::ShippingAddress});
63
74
  estimate.init_dependant(@response[:estimate], :invoice_estimate,
@@ -66,6 +77,8 @@ module ChargeBee
66
77
  {:line_items => InvoiceEstimate::LineItem, :discounts => InvoiceEstimate::Discount, :taxes => InvoiceEstimate::Tax, :line_item_taxes => InvoiceEstimate::LineItemTax, :line_item_discounts => InvoiceEstimate::LineItemDiscount});
67
78
  estimate.init_dependant_list(@response[:estimate], :credit_note_estimates,
68
79
  {:line_items => CreditNoteEstimate::LineItem, :discounts => CreditNoteEstimate::Discount, :taxes => CreditNoteEstimate::Tax, :line_item_taxes => CreditNoteEstimate::LineItemTax, :line_item_discounts => CreditNoteEstimate::LineItemDiscount});
80
+ estimate.init_dependant_list(@response[:estimate], :unbilled_charge_estimates,
81
+ {});
69
82
  return estimate;
70
83
  end
71
84
 
@@ -127,12 +140,24 @@ module ChargeBee
127
140
  end
128
141
 
129
142
 
143
+ def unbilled_charges()
144
+ unbilled_charges = get_list(:unbilled_charges, UnbilledCharge,
145
+ {});
146
+ return unbilled_charges;
147
+ end
148
+
130
149
  def credit_notes()
131
150
  credit_notes = get_list(:credit_notes, CreditNote,
132
151
  {:line_items => CreditNote::LineItem, :discounts => CreditNote::Discount, :line_item_discounts => CreditNote::LineItemDiscount, :taxes => CreditNote::Tax, :line_item_taxes => CreditNote::LineItemTax, :linked_refunds => CreditNote::LinkedRefund, :allocations => CreditNote::Allocation});
133
152
  return credit_notes;
134
153
  end
135
154
 
155
+ def invoices()
156
+ invoices = get_list(:invoices, Invoice,
157
+ {: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});
158
+ return invoices;
159
+ end
160
+
136
161
 
137
162
  private
138
163
  def get_list(type, klass, sub_types = {}, dependant_types = {}, dependant_sub_types = {})
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.2.7
4
+ version: 2.2.8
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-04-19 00:00:00.000000000 Z
12
+ date: 2017-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -103,6 +103,7 @@ files:
103
103
  - lib/chargebee/models/invoice_estimate.rb
104
104
  - lib/chargebee/models/model.rb
105
105
  - lib/chargebee/models/order.rb
106
+ - lib/chargebee/models/payment_source.rb
106
107
  - lib/chargebee/models/plan.rb
107
108
  - lib/chargebee/models/portal_session.rb
108
109
  - lib/chargebee/models/resource_migration.rb
@@ -111,6 +112,7 @@ files:
111
112
  - lib/chargebee/models/subscription_estimate.rb
112
113
  - lib/chargebee/models/third_party_payment_method.rb
113
114
  - lib/chargebee/models/transaction.rb
115
+ - lib/chargebee/models/unbilled_charge.rb
114
116
  - lib/chargebee/request.rb
115
117
  - lib/chargebee/rest.rb
116
118
  - lib/chargebee/result.rb