Class: ChargeBee::Subscription
- Defined in:
- lib/chargebee/models/subscription.rb
Defined Under Namespace
Classes: Addon, ChargedEventBasedAddon, Coupon, EventBasedAddon, ReferralInfo, ShippingAddress
Instance Attribute Summary collapse
-
#activated_at ⇒ Object
Returns the value of attribute activated_at.
-
#addons ⇒ Object
Returns the value of attribute addons.
-
#affiliate_token ⇒ Object
Returns the value of attribute affiliate_token.
-
#auto_collection ⇒ Object
Returns the value of attribute auto_collection.
-
#base_currency_code ⇒ Object
Returns the value of attribute base_currency_code.
-
#billing_period ⇒ Object
Returns the value of attribute billing_period.
-
#billing_period_unit ⇒ Object
Returns the value of attribute billing_period_unit.
-
#cancel_reason ⇒ Object
Returns the value of attribute cancel_reason.
-
#cancelled_at ⇒ Object
Returns the value of attribute cancelled_at.
-
#charged_event_based_addons ⇒ Object
Returns the value of attribute charged_event_based_addons.
-
#coupon ⇒ Object
Returns the value of attribute coupon.
-
#coupons ⇒ Object
Returns the value of attribute coupons.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_from_ip ⇒ Object
Returns the value of attribute created_from_ip.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#current_term_end ⇒ Object
Returns the value of attribute current_term_end.
-
#current_term_start ⇒ Object
Returns the value of attribute current_term_start.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#deleted ⇒ Object
Returns the value of attribute deleted.
-
#due_invoices_count ⇒ Object
Returns the value of attribute due_invoices_count.
-
#due_since ⇒ Object
Returns the value of attribute due_since.
-
#event_based_addons ⇒ Object
Returns the value of attribute event_based_addons.
-
#exchange_rate ⇒ Object
Returns the value of attribute exchange_rate.
-
#gift_id ⇒ Object
Returns the value of attribute gift_id.
-
#has_scheduled_changes ⇒ Object
Returns the value of attribute has_scheduled_changes.
-
#id ⇒ Object
Returns the value of attribute id.
-
#invoice_notes ⇒ Object
Returns the value of attribute invoice_notes.
-
#meta_data ⇒ Object
Returns the value of attribute meta_data.
-
#mrr ⇒ Object
Returns the value of attribute mrr.
-
#next_billing_at ⇒ Object
Returns the value of attribute next_billing_at.
-
#override_relationship ⇒ Object
Returns the value of attribute override_relationship.
-
#pause_date ⇒ Object
Returns the value of attribute pause_date.
-
#payment_source_id ⇒ Object
Returns the value of attribute payment_source_id.
-
#plan_amount ⇒ Object
Returns the value of attribute plan_amount.
-
#plan_free_quantity ⇒ Object
Returns the value of attribute plan_free_quantity.
-
#plan_id ⇒ Object
Returns the value of attribute plan_id.
-
#plan_quantity ⇒ Object
Returns the value of attribute plan_quantity.
-
#plan_unit_price ⇒ Object
Returns the value of attribute plan_unit_price.
-
#po_number ⇒ Object
Returns the value of attribute po_number.
-
#referral_info ⇒ Object
Returns the value of attribute referral_info.
-
#remaining_billing_cycles ⇒ Object
Returns the value of attribute remaining_billing_cycles.
-
#resource_version ⇒ Object
Returns the value of attribute resource_version.
-
#resume_date ⇒ Object
Returns the value of attribute resume_date.
-
#setup_fee ⇒ Object
Returns the value of attribute setup_fee.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#status ⇒ Object
Returns the value of attribute status.
-
#total_dues ⇒ Object
Returns the value of attribute total_dues.
-
#trial_end ⇒ Object
Returns the value of attribute trial_end.
-
#trial_start ⇒ Object
Returns the value of attribute trial_start.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
- .add_charge_at_term_end(id, params, env = nil, headers = {}) ⇒ Object
- .cancel(id, params = {}, env = nil, headers = {}) ⇒ Object
- .change_term_end(id, params, env = nil, headers = {}) ⇒ Object
- .charge_addon_at_term_end(id, params, env = nil, headers = {}) ⇒ Object
- .charge_future_renewals(id, params = {}, env = nil, headers = {}) ⇒ Object
-
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS -----------.
- .create_for_customer(id, params, env = nil, headers = {}) ⇒ Object
- .delete(id, env = nil, headers = {}) ⇒ Object
- .import_for_customer(id, params, env = nil, headers = {}) ⇒ Object
- .import_subscription(params, env = nil, headers = {}) ⇒ Object
- .list(params = {}, env = nil, headers = {}) ⇒ Object
- .override_billing_profile(id, params = {}, env = nil, headers = {}) ⇒ Object
- .pause(id, params = {}, env = nil, headers = {}) ⇒ Object
- .reactivate(id, params = {}, env = nil, headers = {}) ⇒ Object
- .remove_coupons(id, params = {}, env = nil, headers = {}) ⇒ Object
- .remove_scheduled_cancellation(id, params = {}, env = nil, headers = {}) ⇒ Object
- .remove_scheduled_changes(id, env = nil, headers = {}) ⇒ Object
- .remove_scheduled_pause(id, env = nil, headers = {}) ⇒ Object
- .remove_scheduled_resumption(id, env = nil, headers = {}) ⇒ Object
- .resume(id, params = {}, env = nil, headers = {}) ⇒ Object
- .retrieve(id, env = nil, headers = {}) ⇒ Object
- .retrieve_with_scheduled_changes(id, env = nil, headers = {}) ⇒ Object
- .subscriptions_for_customer(id, params = {}, env = nil, headers = {}) ⇒ Object
- .update(id, params = {}, env = nil, headers = {}) ⇒ Object
Methods inherited from Model
construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #to_s, uri_path
Constructor Details
This class inherits a constructor from ChargeBee::Model
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ChargeBee::Model
Instance Attribute Details
#activated_at ⇒ Object
Returns the value of attribute activated_at.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def activated_at @activated_at end |
#addons ⇒ Object
Returns the value of attribute addons.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def addons @addons end |
#affiliate_token ⇒ Object
Returns the value of attribute affiliate_token.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def affiliate_token @affiliate_token end |
#auto_collection ⇒ Object
Returns the value of attribute auto_collection.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def auto_collection @auto_collection end |
#base_currency_code ⇒ Object
Returns the value of attribute base_currency_code.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def base_currency_code @base_currency_code end |
#billing_period ⇒ Object
Returns the value of attribute billing_period.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def billing_period @billing_period end |
#billing_period_unit ⇒ Object
Returns the value of attribute billing_period_unit.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def billing_period_unit @billing_period_unit end |
#cancel_reason ⇒ Object
Returns the value of attribute cancel_reason.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def cancel_reason @cancel_reason end |
#cancelled_at ⇒ Object
Returns the value of attribute cancelled_at.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def cancelled_at @cancelled_at end |
#charged_event_based_addons ⇒ Object
Returns the value of attribute charged_event_based_addons.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def charged_event_based_addons @charged_event_based_addons end |
#coupon ⇒ Object
Returns the value of attribute coupon.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def coupon @coupon end |
#coupons ⇒ Object
Returns the value of attribute coupons.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def coupons @coupons end |
#created_at ⇒ Object
Returns the value of attribute created_at.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def created_at @created_at end |
#created_from_ip ⇒ Object
Returns the value of attribute created_from_ip.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def created_from_ip @created_from_ip end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def currency_code @currency_code end |
#current_term_end ⇒ Object
Returns the value of attribute current_term_end.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def current_term_end @current_term_end end |
#current_term_start ⇒ Object
Returns the value of attribute current_term_start.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def current_term_start @current_term_start end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def customer_id @customer_id end |
#deleted ⇒ Object
Returns the value of attribute deleted.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def deleted @deleted end |
#due_invoices_count ⇒ Object
Returns the value of attribute due_invoices_count.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def due_invoices_count @due_invoices_count end |
#due_since ⇒ Object
Returns the value of attribute due_since.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def due_since @due_since end |
#event_based_addons ⇒ Object
Returns the value of attribute event_based_addons.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def event_based_addons @event_based_addons end |
#exchange_rate ⇒ Object
Returns the value of attribute exchange_rate.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def exchange_rate @exchange_rate end |
#gift_id ⇒ Object
Returns the value of attribute gift_id.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def gift_id @gift_id end |
#has_scheduled_changes ⇒ Object
Returns the value of attribute has_scheduled_changes.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def has_scheduled_changes @has_scheduled_changes end |
#id ⇒ Object
Returns the value of attribute id.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def id @id end |
#invoice_notes ⇒ Object
Returns the value of attribute invoice_notes.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def invoice_notes @invoice_notes end |
#meta_data ⇒ Object
Returns the value of attribute meta_data.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def @meta_data end |
#mrr ⇒ Object
Returns the value of attribute mrr.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def mrr @mrr end |
#next_billing_at ⇒ Object
Returns the value of attribute next_billing_at.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def next_billing_at @next_billing_at end |
#override_relationship ⇒ Object
Returns the value of attribute override_relationship.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def override_relationship @override_relationship end |
#pause_date ⇒ Object
Returns the value of attribute pause_date.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def pause_date @pause_date end |
#payment_source_id ⇒ Object
Returns the value of attribute payment_source_id.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def payment_source_id @payment_source_id end |
#plan_amount ⇒ Object
Returns the value of attribute plan_amount.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def plan_amount @plan_amount end |
#plan_free_quantity ⇒ Object
Returns the value of attribute plan_free_quantity.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def plan_free_quantity @plan_free_quantity end |
#plan_id ⇒ Object
Returns the value of attribute plan_id.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def plan_id @plan_id end |
#plan_quantity ⇒ Object
Returns the value of attribute plan_quantity.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def plan_quantity @plan_quantity end |
#plan_unit_price ⇒ Object
Returns the value of attribute plan_unit_price.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def plan_unit_price @plan_unit_price end |
#po_number ⇒ Object
Returns the value of attribute po_number.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def po_number @po_number end |
#referral_info ⇒ Object
Returns the value of attribute referral_info.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def referral_info @referral_info end |
#remaining_billing_cycles ⇒ Object
Returns the value of attribute remaining_billing_cycles.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def remaining_billing_cycles @remaining_billing_cycles end |
#resource_version ⇒ Object
Returns the value of attribute resource_version.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def resource_version @resource_version end |
#resume_date ⇒ Object
Returns the value of attribute resume_date.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def resume_date @resume_date end |
#setup_fee ⇒ Object
Returns the value of attribute setup_fee.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def setup_fee @setup_fee end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def shipping_address @shipping_address end |
#start_date ⇒ Object
Returns the value of attribute start_date.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def start_date @start_date end |
#started_at ⇒ Object
Returns the value of attribute started_at.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def started_at @started_at end |
#status ⇒ Object
Returns the value of attribute status.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def status @status end |
#total_dues ⇒ Object
Returns the value of attribute total_dues.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def total_dues @total_dues end |
#trial_end ⇒ Object
Returns the value of attribute trial_end.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def trial_end @trial_end end |
#trial_start ⇒ Object
Returns the value of attribute trial_start.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def trial_start @trial_start end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
28 29 30 |
# File 'lib/chargebee/models/subscription.rb', line 28 def updated_at @updated_at end |
Class Method Details
.add_charge_at_term_end(id, params, env = nil, headers = {}) ⇒ Object
93 94 95 |
# File 'lib/chargebee/models/subscription.rb', line 93 def self.add_charge_at_term_end(id, params, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"add_charge_at_term_end"), params, env, headers) end |
.cancel(id, params = {}, env = nil, headers = {}) ⇒ Object
85 86 87 |
# File 'lib/chargebee/models/subscription.rb', line 85 def self.cancel(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"cancel"), params, env, headers) end |
.change_term_end(id, params, env = nil, headers = {}) ⇒ Object
81 82 83 |
# File 'lib/chargebee/models/subscription.rb', line 81 def self.change_term_end(id, params, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"change_term_end"), params, env, headers) end |
.charge_addon_at_term_end(id, params, env = nil, headers = {}) ⇒ Object
97 98 99 |
# File 'lib/chargebee/models/subscription.rb', line 97 def self.charge_addon_at_term_end(id, params, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"charge_addon_at_term_end"), params, env, headers) end |
.charge_future_renewals(id, params = {}, env = nil, headers = {}) ⇒ Object
101 102 103 |
# File 'lib/chargebee/models/subscription.rb', line 101 def self.charge_future_renewals(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"charge_future_renewals"), params, env, headers) end |
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS
41 42 43 |
# File 'lib/chargebee/models/subscription.rb', line 41 def self.create(params, env=nil, headers={}) Request.send('post', uri_path("subscriptions"), params, env, headers) end |
.create_for_customer(id, params, env = nil, headers = {}) ⇒ Object
45 46 47 |
# File 'lib/chargebee/models/subscription.rb', line 45 def self.create_for_customer(id, params, env=nil, headers={}) Request.send('post', uri_path("customers",id.to_s,"subscriptions"), params, env, headers) end |
.delete(id, env = nil, headers = {}) ⇒ Object
117 118 119 |
# File 'lib/chargebee/models/subscription.rb', line 117 def self.delete(id, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"delete"), {}, env, headers) end |
.import_for_customer(id, params, env = nil, headers = {}) ⇒ Object
109 110 111 |
# File 'lib/chargebee/models/subscription.rb', line 109 def self.import_for_customer(id, params, env=nil, headers={}) Request.send('post', uri_path("customers",id.to_s,"import_subscription"), params, env, headers) end |
.import_subscription(params, env = nil, headers = {}) ⇒ Object
105 106 107 |
# File 'lib/chargebee/models/subscription.rb', line 105 def self.import_subscription(params, env=nil, headers={}) Request.send('post', uri_path("subscriptions","import_subscription"), params, env, headers) end |
.list(params = {}, env = nil, headers = {}) ⇒ Object
49 50 51 |
# File 'lib/chargebee/models/subscription.rb', line 49 def self.list(params={}, env=nil, headers={}) Request.send_list_request('get', uri_path("subscriptions"), params, env, headers) end |
.override_billing_profile(id, params = {}, env = nil, headers = {}) ⇒ Object
113 114 115 |
# File 'lib/chargebee/models/subscription.rb', line 113 def self.override_billing_profile(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"override_billing_profile"), params, env, headers) end |
.pause(id, params = {}, env = nil, headers = {}) ⇒ Object
121 122 123 |
# File 'lib/chargebee/models/subscription.rb', line 121 def self.pause(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"pause"), params, env, headers) end |
.reactivate(id, params = {}, env = nil, headers = {}) ⇒ Object
89 90 91 |
# File 'lib/chargebee/models/subscription.rb', line 89 def self.reactivate(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"reactivate"), params, env, headers) end |
.remove_coupons(id, params = {}, env = nil, headers = {}) ⇒ Object
73 74 75 |
# File 'lib/chargebee/models/subscription.rb', line 73 def self.remove_coupons(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"remove_coupons"), params, env, headers) end |
.remove_scheduled_cancellation(id, params = {}, env = nil, headers = {}) ⇒ Object
69 70 71 |
# File 'lib/chargebee/models/subscription.rb', line 69 def self.remove_scheduled_cancellation(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_cancellation"), params, env, headers) end |
.remove_scheduled_changes(id, env = nil, headers = {}) ⇒ Object
65 66 67 |
# File 'lib/chargebee/models/subscription.rb', line 65 def self.remove_scheduled_changes(id, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_changes"), {}, env, headers) end |
.remove_scheduled_pause(id, env = nil, headers = {}) ⇒ Object
129 130 131 |
# File 'lib/chargebee/models/subscription.rb', line 129 def self.remove_scheduled_pause(id, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_pause"), {}, env, headers) end |
.remove_scheduled_resumption(id, env = nil, headers = {}) ⇒ Object
133 134 135 |
# File 'lib/chargebee/models/subscription.rb', line 133 def self.remove_scheduled_resumption(id, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"remove_scheduled_resumption"), {}, env, headers) end |
.resume(id, params = {}, env = nil, headers = {}) ⇒ Object
125 126 127 |
# File 'lib/chargebee/models/subscription.rb', line 125 def self.resume(id, params={}, env=nil, headers={}) Request.send('post', uri_path("subscriptions",id.to_s,"resume"), params, env, headers) end |
.retrieve(id, env = nil, headers = {}) ⇒ Object
57 58 59 |
# File 'lib/chargebee/models/subscription.rb', line 57 def self.retrieve(id, env=nil, headers={}) Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers) end |
.retrieve_with_scheduled_changes(id, env = nil, headers = {}) ⇒ Object
61 62 63 |
# File 'lib/chargebee/models/subscription.rb', line 61 def self.retrieve_with_scheduled_changes(id, env=nil, headers={}) Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_with_scheduled_changes"), {}, env, headers) end |
.subscriptions_for_customer(id, params = {}, env = nil, headers = {}) ⇒ Object
53 54 55 |
# File 'lib/chargebee/models/subscription.rb', line 53 def self.subscriptions_for_customer(id, params={}, env=nil, headers={}) Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers) end |