Class: ChargeBee::CreditNote

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

Defined Under Namespace

Classes: Allocation, BillingAddress, Discount, Einvoice, LineItem, LineItemDiscount, LineItemTax, LineItemTier, LinkedRefund, ShippingAddress, SiteDetailsAtCreation, Tax, TaxOrigin

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

#allocationsObject

Returns the value of attribute allocations.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def allocations
  @allocations
end

#amount_allocatedObject

Returns the value of attribute amount_allocated.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def amount_allocated
  @amount_allocated
end

#amount_availableObject

Returns the value of attribute amount_available.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def amount_available
  @amount_available
end

#amount_refundedObject

Returns the value of attribute amount_refunded.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def amount_refunded
  @amount_refunded
end

#billing_addressObject

Returns the value of attribute billing_address.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def billing_address
  @billing_address
end

#business_entity_idObject

Returns the value of attribute business_entity_id.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def business_entity_id
  @business_entity_id
end

#channelObject

Returns the value of attribute channel.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def channel
  @channel
end

#create_reason_codeObject

Returns the value of attribute create_reason_code.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def create_reason_code
  @create_reason_code
end

#currency_codeObject

Returns the value of attribute currency_code.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def currency_code
  @currency_code
end

#customer_idObject

Returns the value of attribute customer_id.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def customer_id
  @customer_id
end

#dateObject

Returns the value of attribute date.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def date
  @date
end

#deletedObject

Returns the value of attribute deleted.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def deleted
  @deleted
end

#discountsObject

Returns the value of attribute discounts.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def discounts
  @discounts
end

#einvoiceObject

Returns the value of attribute einvoice.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def einvoice
  @einvoice
end

#fractional_correctionObject

Returns the value of attribute fractional_correction.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def fractional_correction
  @fractional_correction
end

#generated_atObject

Returns the value of attribute generated_at.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def generated_at
  @generated_at
end

#idObject

Returns the value of attribute id.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def id
  @id
end

#line_item_discountsObject

Returns the value of attribute line_item_discounts.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def line_item_discounts
  @line_item_discounts
end

#line_item_taxesObject

Returns the value of attribute line_item_taxes.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def line_item_taxes
  @line_item_taxes
end

#line_item_tiersObject

Returns the value of attribute line_item_tiers.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def line_item_tiers
  @line_item_tiers
end

#line_itemsObject

Returns the value of attribute line_items.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def line_items
  @line_items
end

#linked_refundsObject

Returns the value of attribute linked_refunds.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def linked_refunds
  @linked_refunds
end

#local_currency_codeObject

Returns the value of attribute local_currency_code.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def local_currency_code
  @local_currency_code
end

#local_currency_exchange_rateObject

Returns the value of attribute local_currency_exchange_rate.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def local_currency_exchange_rate
  @local_currency_exchange_rate
end

#price_typeObject

Returns the value of attribute price_type.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def price_type
  @price_type
end

#reason_codeObject

Returns the value of attribute reason_code.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def reason_code
  @reason_code
end

#reference_invoice_idObject

Returns the value of attribute reference_invoice_id.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def reference_invoice_id
  @reference_invoice_id
end

#refunded_atObject

Returns the value of attribute refunded_at.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def refunded_at
  @refunded_at
end

#resource_versionObject

Returns the value of attribute resource_version.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def resource_version
  @resource_version
end

#round_off_amountObject

Returns the value of attribute round_off_amount.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def round_off_amount
  @round_off_amount
end

#shipping_addressObject

Returns the value of attribute shipping_address.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def shipping_address
  @shipping_address
end

#site_details_at_creationObject

Returns the value of attribute site_details_at_creation.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def site_details_at_creation
  @site_details_at_creation
end

#statusObject

Returns the value of attribute status.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def status
  @status
end

#sub_totalObject

Returns the value of attribute sub_total.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def sub_total
  @sub_total
end

#sub_total_in_local_currencyObject

Returns the value of attribute sub_total_in_local_currency.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def sub_total_in_local_currency
  @sub_total_in_local_currency
end

#subscription_idObject

Returns the value of attribute subscription_id.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def subscription_id
  @subscription_id
end

#tax_categoryObject

Returns the value of attribute tax_category.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def tax_category
  @tax_category
end

#tax_originObject

Returns the value of attribute tax_origin.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def tax_origin
  @tax_origin
end

#taxesObject

Returns the value of attribute taxes.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def taxes
  @taxes
end

#totalObject

Returns the value of attribute total.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def total
  @total
end

#total_in_local_currencyObject

Returns the value of attribute total_in_local_currency.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def total_in_local_currency
  @total_in_local_currency
end

#typeObject

Returns the value of attribute type.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def type
  @type
end

#updated_atObject

Returns the value of attribute updated_at.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def updated_at
  @updated_at
end

#vat_numberObject

Returns the value of attribute vat_number.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def vat_number
  @vat_number
end

#vat_number_prefixObject

Returns the value of attribute vat_number_prefix.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def vat_number_prefix
  @vat_number_prefix
end

#voided_atObject

Returns the value of attribute voided_at.



56
57
58
# File 'lib/chargebee/models/credit_note.rb', line 56

def voided_at
  @voided_at
end

Class Method Details

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

OPERATIONS




68
69
70
# File 'lib/chargebee/models/credit_note.rb', line 68

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

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



100
101
102
# File 'lib/chargebee/models/credit_note.rb', line 100

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

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



104
105
106
# File 'lib/chargebee/models/credit_note.rb', line 104

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

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



80
81
82
# File 'lib/chargebee/models/credit_note.rb', line 80

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

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



120
121
122
# File 'lib/chargebee/models/credit_note.rb', line 120

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

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



96
97
98
# File 'lib/chargebee/models/credit_note.rb', line 96

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

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



76
77
78
# File 'lib/chargebee/models/credit_note.rb', line 76

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

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



88
89
90
# File 'lib/chargebee/models/credit_note.rb', line 88

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

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



84
85
86
# File 'lib/chargebee/models/credit_note.rb', line 84

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

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



108
109
110
# File 'lib/chargebee/models/credit_note.rb', line 108

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

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



112
113
114
# File 'lib/chargebee/models/credit_note.rb', line 112

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

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



72
73
74
# File 'lib/chargebee/models/credit_note.rb', line 72

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

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



116
117
118
# File 'lib/chargebee/models/credit_note.rb', line 116

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

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



92
93
94
# File 'lib/chargebee/models/credit_note.rb', line 92

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