Class: ChargeBee::CreditNote

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

Defined Under Namespace

Classes: Allocation, Discount, LineItem, LineItemTax, LinkedRefund, Tax

Instance Attribute Summary collapse

Class Method Summary collapse

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

#allocationsObject

Returns the value of attribute allocations.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def allocations
  @allocations
end

#amount_allocatedObject

Returns the value of attribute amount_allocated.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def amount_allocated
  @amount_allocated
end

#amount_availableObject

Returns the value of attribute amount_available.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def amount_available
  @amount_available
end

#amount_refundedObject

Returns the value of attribute amount_refunded.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def amount_refunded
  @amount_refunded
end

#customer_idObject

Returns the value of attribute customer_id.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def customer_id
  @customer_id
end

#dateObject

Returns the value of attribute date.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def date
  @date
end

#discountsObject

Returns the value of attribute discounts.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def discounts
  @discounts
end

#idObject

Returns the value of attribute id.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def id
  @id
end

#line_item_taxesObject

Returns the value of attribute line_item_taxes.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def line_item_taxes
  @line_item_taxes
end

#line_itemsObject

Returns the value of attribute line_items.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def line_items
  @line_items
end

#linked_refundsObject

Returns the value of attribute linked_refunds.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def linked_refunds
  @linked_refunds
end

#price_typeObject

Returns the value of attribute price_type.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def price_type
  @price_type
end

#reason_codeObject

Returns the value of attribute reason_code.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def reason_code
  @reason_code
end

#reference_invoice_idObject

Returns the value of attribute reference_invoice_id.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def reference_invoice_id
  @reference_invoice_id
end

#refunded_atObject

Returns the value of attribute refunded_at.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def refunded_at
  @refunded_at
end

#statusObject

Returns the value of attribute status.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def status
  @status
end

#sub_totalObject

Returns the value of attribute sub_total.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def sub_total
  @sub_total
end

#subscription_idObject

Returns the value of attribute subscription_id.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def subscription_id
  @subscription_id
end

#taxesObject

Returns the value of attribute taxes.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def taxes
  @taxes
end

#totalObject

Returns the value of attribute total.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def total
  @total
end

#typeObject

Returns the value of attribute type.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def type
  @type
end

#vat_numberObject

Returns the value of attribute vat_number.



28
29
30
# File 'lib/chargebee/models/credit_note.rb', line 28

def vat_number
  @vat_number
end

Class Method Details

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



44
45
46
# File 'lib/chargebee/models/credit_note.rb', line 44

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

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



40
41
42
# File 'lib/chargebee/models/credit_note.rb', line 40

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

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

OPERATIONS




36
37
38
# File 'lib/chargebee/models/credit_note.rb', line 36

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