chargebee 1.7.0 → 1.7.1

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: 274b6f2ede671660a1f36044d0cee5bde3e12306
4
- data.tar.gz: c07bdf958e72ad91c941979218d5a6bfa59f5ee9
3
+ metadata.gz: 8d4e46e16695c6b232e7e47a317c4f3ccdb4dec0
4
+ data.tar.gz: 5bc2f62fa3bb5a7c04919360255099ee61879859
5
5
  SHA512:
6
- metadata.gz: 66cb3f5257590378d1d4c99b11cb5303b8a21469a2fb770d5e9f794a8cd27c998046a9644f5fec8ca76f6a01b235558452fef87f0bf5f8018a97cf704ea73317
7
- data.tar.gz: 67a0c8d604f0708b39de132818c567b579fb07099e76e3f7cf2dd506a434531665fd4158189ccb0ea51750731bbfba78a750902b6b20a121dd66c3698a82d227
6
+ metadata.gz: 8600c5a09a56fc5a847a56a025c4e350a9b99e0776a45d778538804e2e9c7df0f2367f883d8dce94b202a022596fc135d19a3f187a48a304b33d192865c8bd2f
7
+ data.tar.gz: 507b31290f2812ce2fd6c269497e5ddc77f2470048de00f864bea50c16b1d3791aa0992dd33d8a576179d5107df6c4686eeed2425234202c78ced706ecb0ca35
@@ -1,3 +1,23 @@
1
+ ### v1.7.1 (2016-03-22)
2
+ * * *
3
+
4
+ ** APIs updated**:
5
+
6
+ Support to specify additional information as "meta_data" in json format for Customer, Subscription, Plan, Addon & Coupon resources.
7
+ Now, create & update customer, subscription, create subscription for customer, create & update plan, addon and create coupon APIs accept the "meta_data"" parameter in json format. See create customer API here : https://apidocs.chargebee.com/docs/api/customers#create_a_customer
8
+
9
+ New attribute for "meta_data" is returned as part of Customer, Subscription, Plan, Addon and Coupon resources. See customer attributes here: https://apidocs.chargebee.com/docs/api/customers#customer_attributes
10
+
11
+
12
+ ** APIs added**:
13
+
14
+ Support to change card gateway for a customer. New api endpoint to switch gateway for a customer is added to Card resources. See: https://apidocs.chargebee.com/docs/api/cards#switch_gateway
15
+
16
+
17
+ ** Issue Fixed**:
18
+
19
+ Wrong keys in json response is now fixed for 'linked_transactions', 'linked_orders' & 'notes' in Invoice resource and for 'linked_invoices' & 'linked_refunds' in Transaction resource. See: invoice attributes here: https://apidocs.chargebee.com/docs/api/invoices
20
+
1
21
  ### v1.7.0 (2016-03-10)
2
22
  * * *
3
23
 
@@ -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 = '1.7.0'
8
- s.date = '2016-03-10'
7
+ s.version = '1.7.1'
8
+ s.date = '2016-03-22'
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."
@@ -28,7 +28,7 @@ require File.dirname(__FILE__) + '/chargebee/models/download'
28
28
 
29
29
  module ChargeBee
30
30
 
31
- VERSION = '1.7.0'
31
+ VERSION = '1.7.1'
32
32
 
33
33
  @@default_env = nil
34
34
  @@verify_ca_certs = true
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Addon < Model
3
3
 
4
4
  attr_accessor :id, :name, :invoice_name, :description, :type, :charge_type, :price, :period,
5
- :period_unit, :unit, :status, :archived_at, :enabled_in_portal, :invoice_notes, :taxable
5
+ :period_unit, :unit, :status, :archived_at, :enabled_in_portal, :invoice_notes, :taxable, :meta_data
6
6
 
7
7
  # OPERATIONS
8
8
  #-----------
@@ -16,6 +16,10 @@ module ChargeBee
16
16
  Request.send('post', uri_path("customers",id.to_s,"credit_card"), params, env, headers)
17
17
  end
18
18
 
19
+ def self.switch_gateway_for_customer(id, params, env=nil, headers={})
20
+ Request.send('post', uri_path("customers",id.to_s,"switch_gateway"), params, env, headers)
21
+ end
22
+
19
23
  def self.delete_card_for_customer(id, env=nil, headers={})
20
24
  Request.send('post', uri_path("customers",id.to_s,"delete_card"), {}, env, headers)
21
25
  end
@@ -4,7 +4,7 @@ module ChargeBee
4
4
  attr_accessor :id, :name, :invoice_name, :discount_type, :discount_percentage, :discount_amount,
5
5
  :discount_quantity, :duration_type, :duration_month, :valid_till, :max_redemptions, :status,
6
6
  :apply_discount_on, :apply_on, :plan_constraint, :addon_constraint, :created_at, :archived_at,
7
- :plan_ids, :addon_ids, :redemptions, :invoice_notes
7
+ :plan_ids, :addon_ids, :redemptions, :invoice_notes, :meta_data
8
8
 
9
9
  # OPERATIONS
10
10
  #-----------
@@ -15,7 +15,8 @@ module ChargeBee
15
15
 
16
16
  attr_accessor :id, :first_name, :last_name, :email, :phone, :company, :vat_number, :auto_collection,
17
17
  :allow_direct_debit, :created_at, :created_from_ip, :taxability, :card_status, :billing_address,
18
- :contacts, :payment_method, :invoice_notes, :account_credits, :refundable_credits, :excess_payments
18
+ :contacts, :payment_method, :invoice_notes, :account_credits, :refundable_credits, :excess_payments,
19
+ :meta_data
19
20
 
20
21
  # OPERATIONS
21
22
  #-----------
@@ -4,7 +4,7 @@ module ChargeBee
4
4
  attr_accessor :id, :name, :invoice_name, :description, :price, :period, :period_unit, :trial_period,
5
5
  :trial_period_unit, :charge_model, :free_quantity, :setup_cost, :downgrade_penalty, :status,
6
6
  :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages, :enabled_in_portal,
7
- :invoice_notes, :taxable
7
+ :invoice_notes, :taxable, :meta_data
8
8
 
9
9
  # OPERATIONS
10
10
  #-----------
@@ -17,7 +17,7 @@ module ChargeBee
17
17
  :current_term_start, :current_term_end, :remaining_billing_cycles, :po_number, :created_at,
18
18
  :started_at, :activated_at, :cancelled_at, :cancel_reason, :affiliate_token, :created_from_ip,
19
19
  :has_scheduled_changes, :due_invoices_count, :due_since, :total_dues, :addons, :coupon, :coupons,
20
- :shipping_address, :invoice_notes
20
+ :shipping_address, :invoice_notes, :meta_data
21
21
 
22
22
  # OPERATIONS
23
23
  #-----------
@@ -21,7 +21,7 @@ module ChargeBee
21
21
 
22
22
  def invoice()
23
23
  get(:invoice, Invoice,
24
- {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :invoice_transactions => Invoice::LinkedTransaction, :orders => Invoice::LinkedOrder, :invoice_notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
24
+ {:line_items => Invoice::LineItem, :discounts => Invoice::Discount, :taxes => Invoice::Tax, :linked_transactions => Invoice::LinkedTransaction, :linked_orders => Invoice::LinkedOrder, :notes => Invoice::Note, :shipping_address => Invoice::ShippingAddress, :billing_address => Invoice::BillingAddress});
25
25
  end
26
26
 
27
27
  def order()
@@ -30,7 +30,7 @@ module ChargeBee
30
30
 
31
31
  def transaction()
32
32
  get(:transaction, Transaction,
33
- {:invoice_transactions => Transaction::LinkedInvoice, :txn_refunds_and_reversals => Transaction::LinkedRefund});
33
+ {:linked_invoices => Transaction::LinkedInvoice, :linked_refunds => Transaction::LinkedRefund});
34
34
  end
35
35
 
36
36
  def hosted_page()
@@ -81,14 +81,15 @@ module ChargeBee
81
81
  end
82
82
 
83
83
 
84
- def to_s(*args)
85
- JSON.pretty_generate(@response)
86
- end
87
84
 
88
85
  private
89
86
  def get(type, klass, sub_types = {})
90
87
  klass.construct(@response[type], sub_types)
91
88
  end
92
89
 
90
+ def to_s(*args)
91
+ JSON.pretty_generate(@response)
92
+ end
93
+
93
94
  end
94
95
  end
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: 1.7.0
4
+ version: 1.7.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: 2016-03-10 00:00:00.000000000 Z
12
+ date: 2016-03-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure