Class: ChargeBee::Subscription

Inherits:
Model
  • Object
show all
Defined in:
lib/chargebee/models/subscription.rb

Defined Under Namespace

Classes: Addon, ChargedEventBasedAddon, ChargedItem, ContractTerm, Coupon, Discount, EventBasedAddon, ItemTier, ReferralInfo, ShippingAddress, SubscriptionItem

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #replace_white_space_with_underscore, #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_atObject

Returns the value of attribute activated_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def activated_at
  @activated_at
end

#active_idObject

Returns the value of attribute active_id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def active_id
  @active_id
end

#addonsObject

Returns the value of attribute addons.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def addons
  @addons
end

#affiliate_tokenObject

Returns the value of attribute affiliate_token.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def affiliate_token
  @affiliate_token
end

#arrObject

Returns the value of attribute arr.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def arr
  @arr
end

#auto_close_invoicesObject

Returns the value of attribute auto_close_invoices.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def auto_close_invoices
  @auto_close_invoices
end

#auto_collectionObject

Returns the value of attribute auto_collection.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def auto_collection
  @auto_collection
end

#base_currency_codeObject

Returns the value of attribute base_currency_code.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def base_currency_code
  @base_currency_code
end

#billing_periodObject

Returns the value of attribute billing_period.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def billing_period
  @billing_period
end

#billing_period_unitObject

Returns the value of attribute billing_period_unit.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def billing_period_unit
  @billing_period_unit
end

#business_entity_idObject

Returns the value of attribute business_entity_id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def business_entity_id
  @business_entity_id
end

#cancel_reasonObject

Returns the value of attribute cancel_reason.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def cancel_reason
  @cancel_reason
end

#cancel_reason_codeObject

Returns the value of attribute cancel_reason_code.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def cancel_reason_code
  @cancel_reason_code
end

#cancel_schedule_created_atObject

Returns the value of attribute cancel_schedule_created_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def cancel_schedule_created_at
  @cancel_schedule_created_at
end

#cancelled_atObject

Returns the value of attribute cancelled_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def cancelled_at
  @cancelled_at
end

#changes_scheduled_atObject

Returns the value of attribute changes_scheduled_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def changes_scheduled_at
  @changes_scheduled_at
end

#channelObject

Returns the value of attribute channel.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def channel
  @channel
end

#charged_event_based_addonsObject

Returns the value of attribute charged_event_based_addons.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def charged_event_based_addons
  @charged_event_based_addons
end

#charged_itemsObject

Returns the value of attribute charged_items.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def charged_items
  @charged_items
end

#contract_termObject

Returns the value of attribute contract_term.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def contract_term
  @contract_term
end

#contract_term_billing_cycle_on_renewalObject

Returns the value of attribute contract_term_billing_cycle_on_renewal.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def contract_term_billing_cycle_on_renewal
  @contract_term_billing_cycle_on_renewal
end

#couponObject

Returns the value of attribute coupon.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def coupon
  @coupon
end

#couponsObject

Returns the value of attribute coupons.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def coupons
  @coupons
end

#create_pending_invoicesObject

Returns the value of attribute create_pending_invoices.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def create_pending_invoices
  @create_pending_invoices
end

#created_atObject

Returns the value of attribute created_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def created_at
  @created_at
end

#created_from_ipObject

Returns the value of attribute created_from_ip.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def created_from_ip
  @created_from_ip
end

#currency_codeObject

Returns the value of attribute currency_code.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def currency_code
  @currency_code
end

#current_term_endObject

Returns the value of attribute current_term_end.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def current_term_end
  @current_term_end
end

#current_term_startObject

Returns the value of attribute current_term_start.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def current_term_start
  @current_term_start
end

#customer_idObject

Returns the value of attribute customer_id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def customer_id
  @customer_id
end

#deletedObject

Returns the value of attribute deleted.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def deleted
  @deleted
end

#discountsObject

Returns the value of attribute discounts.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def discounts
  @discounts
end

#due_invoices_countObject

Returns the value of attribute due_invoices_count.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def due_invoices_count
  @due_invoices_count
end

#due_sinceObject

Returns the value of attribute due_since.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def due_since
  @due_since
end

#event_based_addonsObject

Returns the value of attribute event_based_addons.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def event_based_addons
  @event_based_addons
end

#exchange_rateObject

Returns the value of attribute exchange_rate.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def exchange_rate
  @exchange_rate
end

#free_periodObject

Returns the value of attribute free_period.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def free_period
  @free_period
end

#free_period_unitObject

Returns the value of attribute free_period_unit.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def free_period_unit
  @free_period_unit
end

#gift_idObject

Returns the value of attribute gift_id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def gift_id
  @gift_id
end

#has_scheduled_advance_invoicesObject

Returns the value of attribute has_scheduled_advance_invoices.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def has_scheduled_advance_invoices
  @has_scheduled_advance_invoices
end

#has_scheduled_changesObject

Returns the value of attribute has_scheduled_changes.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def has_scheduled_changes
  @has_scheduled_changes
end

#idObject

Returns the value of attribute id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def id
  @id
end

#invoice_notesObject

Returns the value of attribute invoice_notes.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def invoice_notes
  @invoice_notes
end

#item_tiersObject

Returns the value of attribute item_tiers.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def item_tiers
  @item_tiers
end

#meta_dataObject

Returns the value of attribute meta_data.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def 
  @meta_data
end

#metadataObject

Returns the value of attribute metadata.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def 
  @metadata
end

#mrrObject

Returns the value of attribute mrr.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def mrr
  @mrr
end

#net_term_daysObject

Returns the value of attribute net_term_days.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def net_term_days
  @net_term_days
end

#next_billing_atObject

Returns the value of attribute next_billing_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def next_billing_at
  @next_billing_at
end

#offline_payment_methodObject

Returns the value of attribute offline_payment_method.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def offline_payment_method
  @offline_payment_method
end

#override_relationshipObject

Returns the value of attribute override_relationship.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def override_relationship
  @override_relationship
end

#pause_dateObject

Returns the value of attribute pause_date.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def pause_date
  @pause_date
end

#payment_source_idObject

Returns the value of attribute payment_source_id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def payment_source_id
  @payment_source_id
end

#plan_amountObject

Returns the value of attribute plan_amount.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_amount
  @plan_amount
end

#plan_amount_in_decimalObject

Returns the value of attribute plan_amount_in_decimal.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_amount_in_decimal
  @plan_amount_in_decimal
end

#plan_free_quantityObject

Returns the value of attribute plan_free_quantity.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_free_quantity
  @plan_free_quantity
end

#plan_free_quantity_in_decimalObject

Returns the value of attribute plan_free_quantity_in_decimal.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_free_quantity_in_decimal
  @plan_free_quantity_in_decimal
end

#plan_idObject

Returns the value of attribute plan_id.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_id
  @plan_id
end

#plan_quantityObject

Returns the value of attribute plan_quantity.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_quantity
  @plan_quantity
end

#plan_quantity_in_decimalObject

Returns the value of attribute plan_quantity_in_decimal.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_quantity_in_decimal
  @plan_quantity_in_decimal
end

#plan_unit_priceObject

Returns the value of attribute plan_unit_price.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_unit_price
  @plan_unit_price
end

#plan_unit_price_in_decimalObject

Returns the value of attribute plan_unit_price_in_decimal.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def plan_unit_price_in_decimal
  @plan_unit_price_in_decimal
end

#po_numberObject

Returns the value of attribute po_number.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def po_number
  @po_number
end

#referral_infoObject

Returns the value of attribute referral_info.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def referral_info
  @referral_info
end

#remaining_billing_cyclesObject

Returns the value of attribute remaining_billing_cycles.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def remaining_billing_cycles
  @remaining_billing_cycles
end

#resource_versionObject

Returns the value of attribute resource_version.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def resource_version
  @resource_version
end

#resume_dateObject

Returns the value of attribute resume_date.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def resume_date
  @resume_date
end

#setup_feeObject

Returns the value of attribute setup_fee.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def setup_fee
  @setup_fee
end

#shipping_addressObject

Returns the value of attribute shipping_address.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def shipping_address
  @shipping_address
end

#start_dateObject

Returns the value of attribute start_date.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def start_date
  @start_date
end

#started_atObject

Returns the value of attribute started_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def started_at
  @started_at
end

#statusObject

Returns the value of attribute status.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def status
  @status
end

#subscription_itemsObject

Returns the value of attribute subscription_items.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def subscription_items
  @subscription_items
end

#total_duesObject

Returns the value of attribute total_dues.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def total_dues
  @total_dues
end

#trial_endObject

Returns the value of attribute trial_end.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def trial_end
  @trial_end
end

#trial_end_actionObject

Returns the value of attribute trial_end_action.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def trial_end_action
  @trial_end_action
end

#trial_startObject

Returns the value of attribute trial_start.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def trial_start
  @trial_start
end

#updated_atObject

Returns the value of attribute updated_at.



48
49
50
# File 'lib/chargebee/models/subscription.rb', line 48

def updated_at
  @updated_at
end

Class Method Details

.add_charge_at_term_end(id, params, env = nil, headers = {}) ⇒ Object



134
135
136
# File 'lib/chargebee/models/subscription.rb', line 134

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



194
195
196
# File 'lib/chargebee/models/subscription.rb', line 194

def self.cancel(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"cancel"), params, env, headers)
end

.cancel_for_items(id, params = {}, env = nil, headers = {}) ⇒ Object



198
199
200
# File 'lib/chargebee/models/subscription.rb', line 198

def self.cancel_for_items(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"cancel_for_items"), params, env, headers)
end

.change_term_end(id, params, env = nil, headers = {}) ⇒ Object



126
127
128
# File 'lib/chargebee/models/subscription.rb', line 126

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



138
139
140
# File 'lib/chargebee/models/subscription.rb', line 138

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



142
143
144
# File 'lib/chargebee/models/subscription.rb', line 142

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

.contract_terms_for_subscription(id, params = {}, env = nil, headers = {}) ⇒ Object



90
91
92
# File 'lib/chargebee/models/subscription.rb', line 90

def self.contract_terms_for_subscription(id, params={}, env=nil, headers={})
  Request.send('get', uri_path("subscriptions",id.to_s,"contract_terms"), params, env, headers)
end

.create(params, env = nil, headers = {}) ⇒ Object

OPERATIONS




70
71
72
# File 'lib/chargebee/models/subscription.rb', line 70

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



74
75
76
# File 'lib/chargebee/models/subscription.rb', line 74

def self.create_for_customer(id, params, env=nil, headers={})
  Request.send('post', uri_path("customers",id.to_s,"subscriptions"), params, env, headers)
end

.create_with_items(id, params, env = nil, headers = {}) ⇒ Object



78
79
80
# File 'lib/chargebee/models/subscription.rb', line 78

def self.create_with_items(id, params, env=nil, headers={})
  Request.send('post', uri_path("customers",id.to_s,"subscription_for_items"), params, env, headers)
end

.delete(id, env = nil, headers = {}) ⇒ Object



186
187
188
# File 'lib/chargebee/models/subscription.rb', line 186

def self.delete(id, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"delete"), {}, env, headers)
end

.edit_advance_invoice_schedule(id, params = {}, env = nil, headers = {}) ⇒ Object



146
147
148
# File 'lib/chargebee/models/subscription.rb', line 146

def self.edit_advance_invoice_schedule(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"edit_advance_invoice_schedule"), params, env, headers)
end

.import_contract_term(id, params = {}, env = nil, headers = {}) ⇒ Object



170
171
172
# File 'lib/chargebee/models/subscription.rb', line 170

def self.import_contract_term(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"import_contract_term"), params, env, headers)
end

.import_for_customer(id, params, env = nil, headers = {}) ⇒ Object



166
167
168
# File 'lib/chargebee/models/subscription.rb', line 166

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_for_items(id, params, env = nil, headers = {}) ⇒ Object



178
179
180
# File 'lib/chargebee/models/subscription.rb', line 178

def self.import_for_items(id, params, env=nil, headers={})
  Request.send('post', uri_path("customers",id.to_s,"import_for_items"), params, env, headers)
end

.import_subscription(params, env = nil, headers = {}) ⇒ Object



162
163
164
# File 'lib/chargebee/models/subscription.rb', line 162

def self.import_subscription(params, env=nil, headers={})
  Request.send('post', uri_path("subscriptions","import_subscription"), params, env, headers)
end

.import_unbilled_charges(id, params, env = nil, headers = {}) ⇒ Object



174
175
176
# File 'lib/chargebee/models/subscription.rb', line 174

def self.import_unbilled_charges(id, params, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"import_unbilled_charges"), params, env, headers)
end

.list(params = {}, env = nil, headers = {}) ⇒ Object



82
83
84
# File 'lib/chargebee/models/subscription.rb', line 82

def self.list(params={}, env=nil, headers={})
  Request.send_list_request('get', uri_path("subscriptions"), params, env, headers)
end

.list_discounts(id, params = {}, env = nil, headers = {}) ⇒ Object



94
95
96
# File 'lib/chargebee/models/subscription.rb', line 94

def self.list_discounts(id, params={}, env=nil, headers={})
  Request.send('get', uri_path("subscriptions",id.to_s,"discounts"), params, env, headers)
end

.move(id, params, env = nil, headers = {}) ⇒ Object



214
215
216
# File 'lib/chargebee/models/subscription.rb', line 214

def self.move(id, params, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"move"), params, env, headers)
end

.override_billing_profile(id, params = {}, env = nil, headers = {}) ⇒ Object



182
183
184
# File 'lib/chargebee/models/subscription.rb', line 182

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



190
191
192
# File 'lib/chargebee/models/subscription.rb', line 190

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



130
131
132
# File 'lib/chargebee/models/subscription.rb', line 130

def self.reactivate(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"reactivate"), params, env, headers)
end

.regenerate_invoice(id, params = {}, env = nil, headers = {}) ⇒ Object



158
159
160
# File 'lib/chargebee/models/subscription.rb', line 158

def self.regenerate_invoice(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"regenerate_invoice"), params, env, headers)
end

.remove_advance_invoice_schedule(id, params = {}, env = nil, headers = {}) ⇒ Object



154
155
156
# File 'lib/chargebee/models/subscription.rb', line 154

def self.remove_advance_invoice_schedule(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"remove_advance_invoice_schedule"), params, env, headers)
end

.remove_coupons(id, params = {}, env = nil, headers = {}) ⇒ Object



114
115
116
# File 'lib/chargebee/models/subscription.rb', line 114

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



110
111
112
# File 'lib/chargebee/models/subscription.rb', line 110

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



106
107
108
# File 'lib/chargebee/models/subscription.rb', line 106

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



206
207
208
# File 'lib/chargebee/models/subscription.rb', line 206

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



210
211
212
# File 'lib/chargebee/models/subscription.rb', line 210

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



202
203
204
# File 'lib/chargebee/models/subscription.rb', line 202

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



98
99
100
# File 'lib/chargebee/models/subscription.rb', line 98

def self.retrieve(id, env=nil, headers={})
  Request.send('get', uri_path("subscriptions",id.to_s), {}, env, headers)
end

.retrieve_advance_invoice_schedule(id, env = nil, headers = {}) ⇒ Object



150
151
152
# File 'lib/chargebee/models/subscription.rb', line 150

def self.retrieve_advance_invoice_schedule(id, env=nil, headers={})
  Request.send('get', uri_path("subscriptions",id.to_s,"retrieve_advance_invoice_schedule"), {}, env, headers)
end

.retrieve_with_scheduled_changes(id, env = nil, headers = {}) ⇒ Object



102
103
104
# File 'lib/chargebee/models/subscription.rb', line 102

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



86
87
88
# File 'lib/chargebee/models/subscription.rb', line 86

def self.subscriptions_for_customer(id, params={}, env=nil, headers={})
  Request.send('get', uri_path("customers",id.to_s,"subscriptions"), params, env, headers)
end

.update(id, params = {}, env = nil, headers = {}) ⇒ Object



118
119
120
# File 'lib/chargebee/models/subscription.rb', line 118

def self.update(id, params={}, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s), params, env, headers)
end

.update_for_items(id, params, env = nil, headers = {}) ⇒ Object



122
123
124
# File 'lib/chargebee/models/subscription.rb', line 122

def self.update_for_items(id, params, env=nil, headers={})
  Request.send('post', uri_path("subscriptions",id.to_s,"update_for_items"), params, env, headers)
end