Sha256: 75bb8112c777ecaa19e93fba6ed8f7da9e20b9ea0cedda00f19ca7b32b92b4ec

Contents?: true

Size: 1.28 KB

Versions: 5

Compression:

Stored size: 1.28 KB

Contents

module ChargeBee
  class Estimate < Model

  attr_accessor :created_at, :subscription_estimate, :invoice_estimate, :invoice_estimates, :next_invoice_estimate,
  :credit_note_estimates, :unbilled_charge_estimates

  # OPERATIONS
  #-----------

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

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

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

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

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

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

  end # ~Estimate
end # ~ChargeBee

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chargebee-2.3.5 lib/chargebee/models/estimate.rb
chargebee-2.3.4 lib/chargebee/models/estimate.rb
chargebee-2.3.3 lib/chargebee/models/estimate.rb
chargebee-2.3.2 lib/chargebee/models/estimate.rb
chargebee-2.3.1 lib/chargebee/models/estimate.rb