Class: ChargeBee::Estimate

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

Defined Under Namespace

Classes: Discount, LineItem, Tax

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Model

construct, #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

#amountObject

Returns the value of attribute amount.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def amount
  @amount
end

#collect_nowObject

Returns the value of attribute collect_now.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def collect_now
  @collect_now
end

#created_atObject

Returns the value of attribute created_at.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def created_at
  @created_at
end

#discountsObject

Returns the value of attribute discounts.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def discounts
  @discounts
end

#line_itemsObject

Returns the value of attribute line_items.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def line_items
  @line_items
end

#recurringObject

Returns the value of attribute recurring.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def recurring
  @recurring
end

#sub_totalObject

Returns the value of attribute sub_total.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def sub_total
  @sub_total
end

#subscription_idObject

Returns the value of attribute subscription_id.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def subscription_id
  @subscription_id
end

#subscription_statusObject

Returns the value of attribute subscription_status.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def subscription_status
  @subscription_status
end

#taxesObject

Returns the value of attribute taxes.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def taxes
  @taxes
end

#term_ends_atObject

Returns the value of attribute term_ends_at.



16
17
18
# File 'lib/chargebee/models/estimate.rb', line 16

def term_ends_at
  @term_ends_at
end

Class Method Details

.create_subscription(params, env = nil) ⇒ Object

OPERATIONS




22
23
24
# File 'lib/chargebee/models/estimate.rb', line 22

def self.create_subscription(params, env=nil)
  Request.send('post', uri_path("estimates","create_subscription"), params, env)
end

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



30
31
32
# File 'lib/chargebee/models/estimate.rb', line 30

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

.update_subscription(params, env = nil) ⇒ Object



26
27
28
# File 'lib/chargebee/models/estimate.rb', line 26

def self.update_subscription(params, env=nil)
  Request.send('post', uri_path("estimates","update_subscription"), params, env)
end