chargebee 2.5.9 → 2.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1e8806722f537a897b04ed429f572d62252f89c
4
- data.tar.gz: d61538bd2e7c9ba6d406c3b760c235b5678715f4
3
+ metadata.gz: d1f6428c73a090a0925805bb6bd9986b979c4746
4
+ data.tar.gz: 31c4e2c4f463c6b1b549881645868d17fbcec4c8
5
5
  SHA512:
6
- metadata.gz: 3f662d0a1a8685e6c3f2d447592ccdec09b57898d55c50d86e569642238b05f007ef5e1d2c47f4fbd330857fafd01377f17e24fefbbb50db61422ecb568438de
7
- data.tar.gz: 98128a553b7ed8d16c77a61259d6ea3edac3b43c70b71c7fc4b16834cbe101d618aefe048e551fd11d4f2f996ff99eba6a078477439858e26acab4e89b6ae016
6
+ metadata.gz: 10668ac51e1614162df405dd1c7e649e8163998635fcb27685f640e0f2eb86ac8df769e71201fe5735dbcd568676c57a74612a01d9ab28a5cc9a20f33c137947
7
+ data.tar.gz: 9e56e200d1c1cad632f3749ea5d99bc559894f692b9298f4d0a25773436192372b510eea06de58265588eb9fa08657447ea4afe3bf4eaaaf54d9a393e85d8c9a
@@ -1,3 +1,21 @@
1
+ ### v2.6.0 (2018-11-02)
2
+ * * *
3
+
4
+ * New resource 'Gift' with endpoints 'Create a gift', 'Retrieve a gift', 'Claim a gift', 'Cancel a gift' and 'List gifts' has been added.
5
+ * New event types gift_scheduled, gift_unclaimed, gift_claimed, gift_expired and gift_cancelled have been added.
6
+ * New endpoints 'Checkout gift' and 'Claim gift' have been added to Hosted page resource.
7
+ * Input param 'redirect_url' has been added in 'Manage payment sources' and 'Collect now' APIs.
8
+ * Hosted page types 'checkout_gift' and 'claim_gift' have been added.
9
+ * The attributes 'term_finalized' and 'is_gifted' have been added in Invoice attributes.
10
+ * The attributes 'is_gifted', 'gift_note' and 'gift_id' have been added in Orders attributes.
11
+ * The attribute 'sku' has been added in Gift attributes.
12
+ * The input parameter 'sku' has been added in Update orders API.
13
+ * The order status 'cancelled' has been added.
14
+ * The attributes 'giftable' and 'claim_url' have been added in Plan resource.
15
+ * The input parameters 'giftable' and 'claim_url' have been added in Create a plan API.
16
+ * List filter parameter 'giftable' has been added in List Plans API.
17
+ * The attribute 'gift_id' has been added to Subscription resource.
18
+
1
19
  ### v2.5.9 (2018-10-26)
2
20
  * * *
3
21
 
@@ -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.5.9'
8
- s.date = '2018-10-26'
7
+ s.version = '2.6.0'
8
+ s.date = '2018-11-02'
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/estimate.rb
55
55
  lib/chargebee/models/event.rb
56
56
  lib/chargebee/models/export.rb
57
+ lib/chargebee/models/gift.rb
57
58
  lib/chargebee/models/hosted_page.rb
58
59
  lib/chargebee/models/invoice.rb
59
60
  lib/chargebee/models/invoice_estimate.rb
@@ -39,11 +39,12 @@ require File.dirname(__FILE__) + '/chargebee/models/time_machine'
39
39
  require File.dirname(__FILE__) + '/chargebee/models/promotional_credit.rb'
40
40
  require File.dirname(__FILE__) + '/chargebee/models/virtual_bank_account.rb'
41
41
  require File.dirname(__FILE__) + '/chargebee/models/export'
42
+ require File.dirname(__FILE__) + '/chargebee/models/gift'
42
43
  require File.dirname(__FILE__) + '/chargebee/models/contact.rb'
43
44
 
44
45
  module ChargeBee
45
46
 
46
- VERSION = '2.5.9'
47
+ VERSION = '2.6.0'
47
48
 
48
49
  @@default_env = nil
49
50
  @@verify_ca_certs = true
@@ -0,0 +1,43 @@
1
+ module ChargeBee
2
+ class Gift < Model
3
+
4
+ class Gifter < Model
5
+ attr_accessor :customer_id, :invoice_id, :signature, :note
6
+ end
7
+
8
+ class GiftReceiver < Model
9
+ attr_accessor :customer_id, :subscription_id, :first_name, :last_name, :email
10
+ end
11
+
12
+ class GiftTimeline < Model
13
+ attr_accessor :status, :occurred_at
14
+ end
15
+
16
+ attr_accessor :id, :status, :scheduled_at, :auto_claim, :claim_expiry_date, :resource_version,
17
+ :updated_at, :gifter, :gift_receiver, :gift_timelines
18
+
19
+ # OPERATIONS
20
+ #-----------
21
+
22
+ def self.create(params, env=nil, headers={})
23
+ Request.send('post', uri_path("gifts"), params, env, headers)
24
+ end
25
+
26
+ def self.retrieve(id, env=nil, headers={})
27
+ Request.send('get', uri_path("gifts",id.to_s), {}, env, headers)
28
+ end
29
+
30
+ def self.list(params={}, env=nil, headers={})
31
+ Request.send_list_request('get', uri_path("gifts"), params, env, headers)
32
+ end
33
+
34
+ def self.claim(id, env=nil, headers={})
35
+ Request.send('post', uri_path("gifts",id.to_s,"claim"), {}, env, headers)
36
+ end
37
+
38
+ def self.cancel(id, env=nil, headers={})
39
+ Request.send('post', uri_path("gifts",id.to_s,"cancel"), {}, env, headers)
40
+ end
41
+
42
+ end # ~Gift
43
+ end # ~ChargeBee
@@ -46,6 +46,14 @@ module ChargeBee
46
46
  Request.send('post', uri_path("hosted_pages","extend_subscription"), params, env, headers)
47
47
  end
48
48
 
49
+ def self.checkout_gift(params, env=nil, headers={})
50
+ Request.send('post', uri_path("hosted_pages","checkout_gift"), params, env, headers)
51
+ end
52
+
53
+ def self.claim_gift(params, env=nil, headers={})
54
+ Request.send('post', uri_path("hosted_pages","claim_gift"), params, env, headers)
55
+ end
56
+
49
57
  def self.retrieve_agreement_pdf(params, env=nil, headers={})
50
58
  Request.send('post', uri_path("hosted_pages","retrieve_agreement_pdf"), params, env, headers)
51
59
  end
@@ -61,9 +61,10 @@ module ChargeBee
61
61
  :price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
62
62
  :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
63
63
  :voided_at, :resource_version, :updated_at, :sub_total, :tax, :first_invoice, :has_advance_charges,
64
- :expected_payment_date, :amount_to_collect, :round_off_amount, :line_items, :discounts, :line_item_discounts,
65
- :taxes, :line_item_taxes, :line_item_tiers, :linked_payments, :applied_credits, :adjustment_credit_notes,
66
- :issued_credit_notes, :linked_orders, :notes, :shipping_address, :billing_address, :deleted
64
+ :term_finalized, :is_gifted, :expected_payment_date, :amount_to_collect, :round_off_amount,
65
+ :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
66
+ :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address,
67
+ :billing_address, :deleted
67
68
 
68
69
  # OPERATIONS
69
70
  #-----------
@@ -2,7 +2,7 @@ module ChargeBee
2
2
  class Order < Model
3
3
 
4
4
  class OrderLineItem < Model
5
- attr_accessor :id, :invoice_id, :invoice_line_item_id, :unit_price, :description, :amount, :fulfillment_quantity, :fulfillment_amount, :tax_amount, :amount_paid, :amount_adjusted, :refundable_credits_issued, :refundable_credits, :is_shippable, :status, :entity_type, :item_level_discount_amount, :discount_amount, :entity_id
5
+ attr_accessor :id, :invoice_id, :invoice_line_item_id, :unit_price, :description, :amount, :fulfillment_quantity, :fulfillment_amount, :tax_amount, :amount_paid, :amount_adjusted, :refundable_credits_issued, :refundable_credits, :is_shippable, :sku, :status, :entity_type, :item_level_discount_amount, :discount_amount, :entity_id
6
6
  end
7
7
 
8
8
  class ShippingAddress < Model
@@ -32,7 +32,7 @@ module ChargeBee
32
32
  :paid_on, :shipping_cut_off_date, :created_at, :status_update_at, :delivered_at, :shipped_at,
33
33
  :resource_version, :updated_at, :cancelled_at, :order_line_items, :shipping_address, :billing_address,
34
34
  :discount, :sub_total, :total, :line_item_taxes, :line_item_discounts, :linked_credit_notes,
35
- :deleted, :currency_code
35
+ :deleted, :currency_code, :is_gifted, :gift_note, :gift_id
36
36
 
37
37
  # OPERATIONS
38
38
  #-----------
@@ -22,8 +22,8 @@ module ChargeBee
22
22
  :downgrade_penalty, :status, :archived_at, :billing_cycles, :redirect_url, :enabled_in_hosted_pages,
23
23
  :enabled_in_portal, :addon_applicability, :tax_code, :sku, :accounting_code, :accounting_category1,
24
24
  :accounting_category2, :is_shippable, :shipping_frequency_period, :shipping_frequency_period_unit,
25
- :resource_version, :updated_at, :invoice_notes, :taxable, :tax_profile_id, :meta_data, :tiers,
26
- :applicable_addons, :attached_addons, :event_based_addons
25
+ :resource_version, :updated_at, :giftable, :claim_url, :invoice_notes, :taxable, :tax_profile_id,
26
+ :meta_data, :tiers, :applicable_addons, :attached_addons, :event_based_addons
27
27
 
28
28
  # OPERATIONS
29
29
  #-----------
@@ -28,7 +28,7 @@ module ChargeBee
28
28
  attr_accessor :id, :customer_id, :currency_code, :plan_id, :plan_quantity, :plan_unit_price,
29
29
  :setup_fee, :plan_amount, :billing_period, :billing_period_unit, :plan_free_quantity, :status,
30
30
  :start_date, :trial_start, :trial_end, :current_term_start, :current_term_end, :next_billing_at,
31
- :remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :pause_date,
31
+ :remaining_billing_cycles, :po_number, :created_at, :started_at, :activated_at, :gift_id, :pause_date,
32
32
  :resume_date, :cancelled_at, :cancel_reason, :affiliate_token, :created_from_ip, :resource_version,
33
33
  :updated_at, :has_scheduled_changes, :payment_source_id, :auto_collection, :due_invoices_count,
34
34
  :due_since, :total_dues, :mrr, :exchange_rate, :base_currency_code, :addons, :event_based_addons,
@@ -72,6 +72,12 @@ module ChargeBee
72
72
  return order;
73
73
  end
74
74
 
75
+ def gift()
76
+ gift = get(:gift, Gift,
77
+ {:gifter => Gift::Gifter, :gift_receiver => Gift::GiftReceiver, :gift_timelines => Gift::GiftTimeline});
78
+ return gift;
79
+ end
80
+
75
81
  def transaction()
76
82
  transaction = get(:transaction, Transaction,
77
83
  {:linked_invoices => Transaction::LinkedInvoice, :linked_credit_notes => Transaction::LinkedCreditNote, :linked_refunds => Transaction::LinkedRefund, :linked_payments => Transaction::LinkedPayment});
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.5.9
4
+ version: 2.6.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: 2018-10-26 00:00:00.000000000 Z
12
+ date: 2018-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
@@ -109,6 +109,7 @@ files:
109
109
  - lib/chargebee/models/estimate.rb
110
110
  - lib/chargebee/models/event.rb
111
111
  - lib/chargebee/models/export.rb
112
+ - lib/chargebee/models/gift.rb
112
113
  - lib/chargebee/models/hosted_page.rb
113
114
  - lib/chargebee/models/invoice.rb
114
115
  - lib/chargebee/models/invoice_estimate.rb