Class: ChargeBee::CreditNote
- Defined in:
- lib/chargebee/models/credit_note.rb
Defined Under Namespace
Classes: Allocation, BillingAddress, Discount, Einvoice, ExchangeRate, LineItem, LineItemAddress, LineItemDiscount, LineItemTax, LineItemTier, LinkedRefund, ShippingAddress, SiteDetailsAtCreation, Tax, TaxOrigin
Instance Attribute Summary collapse
-
#allocations ⇒ Object
Returns the value of attribute allocations.
-
#amount_allocated ⇒ Object
Returns the value of attribute amount_allocated.
-
#amount_available ⇒ Object
Returns the value of attribute amount_available.
-
#amount_refunded ⇒ Object
Returns the value of attribute amount_refunded.
-
#billing_address ⇒ Object
Returns the value of attribute billing_address.
-
#business_entity_id ⇒ Object
Returns the value of attribute business_entity_id.
-
#channel ⇒ Object
Returns the value of attribute channel.
-
#create_reason_code ⇒ Object
Returns the value of attribute create_reason_code.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#date ⇒ Object
Returns the value of attribute date.
-
#deleted ⇒ Object
Returns the value of attribute deleted.
-
#discounts ⇒ Object
Returns the value of attribute discounts.
-
#einvoice ⇒ Object
Returns the value of attribute einvoice.
-
#exchange_rates ⇒ Object
Returns the value of attribute exchange_rates.
-
#fractional_correction ⇒ Object
Returns the value of attribute fractional_correction.
-
#generated_at ⇒ Object
Returns the value of attribute generated_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#line_item_addresses ⇒ Object
Returns the value of attribute line_item_addresses.
-
#line_item_discounts ⇒ Object
Returns the value of attribute line_item_discounts.
-
#line_item_taxes ⇒ Object
Returns the value of attribute line_item_taxes.
-
#line_item_tiers ⇒ Object
Returns the value of attribute line_item_tiers.
-
#line_items ⇒ Object
Returns the value of attribute line_items.
-
#line_items_next_offset ⇒ Object
Returns the value of attribute line_items_next_offset.
-
#linked_refunds ⇒ Object
Returns the value of attribute linked_refunds.
-
#local_currency_code ⇒ Object
Returns the value of attribute local_currency_code.
-
#local_currency_exchange_rate ⇒ Object
Returns the value of attribute local_currency_exchange_rate.
-
#notes ⇒ Object
Returns the value of attribute notes.
-
#price_type ⇒ Object
Returns the value of attribute price_type.
-
#reason_code ⇒ Object
Returns the value of attribute reason_code.
-
#reference_invoice_id ⇒ Object
Returns the value of attribute reference_invoice_id.
-
#refunded_at ⇒ Object
Returns the value of attribute refunded_at.
-
#resource_version ⇒ Object
Returns the value of attribute resource_version.
-
#round_off_amount ⇒ Object
Returns the value of attribute round_off_amount.
-
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
-
#site_details_at_creation ⇒ Object
Returns the value of attribute site_details_at_creation.
-
#status ⇒ Object
Returns the value of attribute status.
-
#sub_total ⇒ Object
Returns the value of attribute sub_total.
-
#sub_total_in_local_currency ⇒ Object
Returns the value of attribute sub_total_in_local_currency.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
-
#tax_category ⇒ Object
Returns the value of attribute tax_category.
-
#tax_origin ⇒ Object
Returns the value of attribute tax_origin.
-
#taxes ⇒ Object
Returns the value of attribute taxes.
-
#total ⇒ Object
Returns the value of attribute total.
-
#total_in_local_currency ⇒ Object
Returns the value of attribute total_in_local_currency.
-
#type ⇒ Object
Returns the value of attribute type.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#vat_number ⇒ Object
Returns the value of attribute vat_number.
-
#vat_number_prefix ⇒ Object
Returns the value of attribute vat_number_prefix.
-
#voided_at ⇒ Object
Returns the value of attribute voided_at.
Class Method Summary collapse
-
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS -----------.
-
.credit_notes_for_customer(id, params = {}, env = nil, headers = {}) ⇒ Object
deprecated
Deprecated.
This method is deprecated and will be removed in a future version.
- .delete(id, params = {}, env = nil, headers = {}) ⇒ Object
- .download_einvoice(id, env = nil, headers = {}) ⇒ Object
- .import_credit_note(params, env = nil, headers = {}) ⇒ Object
- .list(params = {}, env = nil, headers = {}) ⇒ Object
- .pdf(id, params = {}, env = nil, headers = {}) ⇒ Object
- .record_refund(id, params, env = nil, headers = {}) ⇒ Object
- .refund(id, params = {}, env = nil, headers = {}) ⇒ Object
- .remove_tax_withheld_refund(id, params, env = nil, headers = {}) ⇒ Object
- .resend_einvoice(id, env = nil, headers = {}) ⇒ Object
- .retrieve(id, params = {}, env = nil, headers = {}) ⇒ Object
- .send_einvoice(id, env = nil, headers = {}) ⇒ Object
- .void_credit_note(id, params = {}, env = nil, headers = {}) ⇒ Object
Methods inherited from Model
construct, #init_dependant, #init_dependant_list, #initialize, #inspect, #load, #method_missing, #replace_white_space_with_underscore, #respond_to_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
#allocations ⇒ Object
Returns the value of attribute allocations.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def allocations @allocations end |
#amount_allocated ⇒ Object
Returns the value of attribute amount_allocated.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def amount_allocated @amount_allocated end |
#amount_available ⇒ Object
Returns the value of attribute amount_available.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def amount_available @amount_available end |
#amount_refunded ⇒ Object
Returns the value of attribute amount_refunded.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def amount_refunded @amount_refunded end |
#billing_address ⇒ Object
Returns the value of attribute billing_address.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def billing_address @billing_address end |
#business_entity_id ⇒ Object
Returns the value of attribute business_entity_id.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def business_entity_id @business_entity_id end |
#channel ⇒ Object
Returns the value of attribute channel.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def channel @channel end |
#create_reason_code ⇒ Object
Returns the value of attribute create_reason_code.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def create_reason_code @create_reason_code end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def currency_code @currency_code end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def customer_id @customer_id end |
#date ⇒ Object
Returns the value of attribute date.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def date @date end |
#deleted ⇒ Object
Returns the value of attribute deleted.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def deleted @deleted end |
#discounts ⇒ Object
Returns the value of attribute discounts.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def discounts @discounts end |
#einvoice ⇒ Object
Returns the value of attribute einvoice.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def einvoice @einvoice end |
#exchange_rates ⇒ Object
Returns the value of attribute exchange_rates.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def exchange_rates @exchange_rates end |
#fractional_correction ⇒ Object
Returns the value of attribute fractional_correction.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def fractional_correction @fractional_correction end |
#generated_at ⇒ Object
Returns the value of attribute generated_at.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def generated_at @generated_at end |
#id ⇒ Object
Returns the value of attribute id.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def id @id end |
#line_item_addresses ⇒ Object
Returns the value of attribute line_item_addresses.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def line_item_addresses @line_item_addresses end |
#line_item_discounts ⇒ Object
Returns the value of attribute line_item_discounts.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def line_item_discounts @line_item_discounts end |
#line_item_taxes ⇒ Object
Returns the value of attribute line_item_taxes.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def line_item_taxes @line_item_taxes end |
#line_item_tiers ⇒ Object
Returns the value of attribute line_item_tiers.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def line_item_tiers @line_item_tiers end |
#line_items ⇒ Object
Returns the value of attribute line_items.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def line_items @line_items end |
#line_items_next_offset ⇒ Object
Returns the value of attribute line_items_next_offset.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def line_items_next_offset @line_items_next_offset end |
#linked_refunds ⇒ Object
Returns the value of attribute linked_refunds.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def linked_refunds @linked_refunds end |
#local_currency_code ⇒ Object
Returns the value of attribute local_currency_code.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def local_currency_code @local_currency_code end |
#local_currency_exchange_rate ⇒ Object
Returns the value of attribute local_currency_exchange_rate.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def local_currency_exchange_rate @local_currency_exchange_rate end |
#notes ⇒ Object
Returns the value of attribute notes.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def notes @notes end |
#price_type ⇒ Object
Returns the value of attribute price_type.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def price_type @price_type end |
#reason_code ⇒ Object
Returns the value of attribute reason_code.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def reason_code @reason_code end |
#reference_invoice_id ⇒ Object
Returns the value of attribute reference_invoice_id.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def reference_invoice_id @reference_invoice_id end |
#refunded_at ⇒ Object
Returns the value of attribute refunded_at.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def refunded_at @refunded_at end |
#resource_version ⇒ Object
Returns the value of attribute resource_version.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def resource_version @resource_version end |
#round_off_amount ⇒ Object
Returns the value of attribute round_off_amount.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def round_off_amount @round_off_amount end |
#shipping_address ⇒ Object
Returns the value of attribute shipping_address.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def shipping_address @shipping_address end |
#site_details_at_creation ⇒ Object
Returns the value of attribute site_details_at_creation.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def site_details_at_creation @site_details_at_creation end |
#status ⇒ Object
Returns the value of attribute status.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def status @status end |
#sub_total ⇒ Object
Returns the value of attribute sub_total.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def sub_total @sub_total end |
#sub_total_in_local_currency ⇒ Object
Returns the value of attribute sub_total_in_local_currency.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def sub_total_in_local_currency @sub_total_in_local_currency end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def subscription_id @subscription_id end |
#tax_category ⇒ Object
Returns the value of attribute tax_category.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def tax_category @tax_category end |
#tax_origin ⇒ Object
Returns the value of attribute tax_origin.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def tax_origin @tax_origin end |
#taxes ⇒ Object
Returns the value of attribute taxes.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def taxes @taxes end |
#total ⇒ Object
Returns the value of attribute total.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def total @total end |
#total_in_local_currency ⇒ Object
Returns the value of attribute total_in_local_currency.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def total_in_local_currency @total_in_local_currency end |
#type ⇒ Object
Returns the value of attribute type.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def type @type end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def updated_at @updated_at end |
#vat_number ⇒ Object
Returns the value of attribute vat_number.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def vat_number @vat_number end |
#vat_number_prefix ⇒ Object
Returns the value of attribute vat_number_prefix.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def vat_number_prefix @vat_number_prefix end |
#voided_at ⇒ Object
Returns the value of attribute voided_at.
64 65 66 |
# File 'lib/chargebee/models/credit_note.rb', line 64 def voided_at @voided_at end |
Class Method Details
.create(params, env = nil, headers = {}) ⇒ Object
OPERATIONS
77 78 79 80 81 82 83 84 |
# File 'lib/chargebee/models/credit_note.rb', line 77 def self.create(params, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, , "creditNote", "create") end |
.credit_notes_for_customer(id, params = {}, env = nil, headers = {}) ⇒ Object
This method is deprecated and will be removed in a future version.
144 145 146 147 148 149 |
# File 'lib/chargebee/models/credit_note.rb', line 144 def self.credit_notes_for_customer(id, params={}, env=nil, headers={}) jsonKeys = { } = {} Request.send('get', uri_path("customers",id.to_s,"credit_notes"), params, env, headers,nil, false, jsonKeys, , "creditNote", "creditNotesForCustomer") end |
.delete(id, params = {}, env = nil, headers = {}) ⇒ Object
151 152 153 154 155 156 157 158 |
# File 'lib/chargebee/models/credit_note.rb', line 151 def self.delete(id, params={}, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"delete"), params, env, headers,nil, false, jsonKeys, , "creditNote", "delete") end |
.download_einvoice(id, env = nil, headers = {}) ⇒ Object
102 103 104 105 106 107 |
# File 'lib/chargebee/models/credit_note.rb', line 102 def self.download_einvoice(id, env=nil, headers={}) jsonKeys = { } = {} Request.send('get', uri_path("credit_notes",id.to_s,"download_einvoice"), {}, env, headers,nil, false, jsonKeys, , "creditNote", "downloadEinvoice") end |
.import_credit_note(params, env = nil, headers = {}) ⇒ Object
187 188 189 190 191 192 193 194 |
# File 'lib/chargebee/models/credit_note.rb', line 187 def self.import_credit_note(params, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes","import_credit_note"), params, env, headers,nil, false, jsonKeys, , "creditNote", "importCreditNote") end |
.list(params = {}, env = nil, headers = {}) ⇒ Object
136 137 138 139 140 141 |
# File 'lib/chargebee/models/credit_note.rb', line 136 def self.list(params={}, env=nil, headers={}) jsonKeys = { } = {} Request.send_list_request('get', uri_path("credit_notes"), params, env, headers,nil, false, jsonKeys, , "creditNote", "list") end |
.pdf(id, params = {}, env = nil, headers = {}) ⇒ Object
93 94 95 96 97 98 99 100 |
# File 'lib/chargebee/models/credit_note.rb', line 93 def self.pdf(id, params={}, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"pdf"), params, env, headers,nil, false, jsonKeys, , "creditNote", "pdf") end |
.record_refund(id, params, env = nil, headers = {}) ⇒ Object
118 119 120 121 122 123 124 125 |
# File 'lib/chargebee/models/credit_note.rb', line 118 def self.record_refund(id, params, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"record_refund"), params, env, headers,nil, false, jsonKeys, , "creditNote", "recordRefund") end |
.refund(id, params = {}, env = nil, headers = {}) ⇒ Object
109 110 111 112 113 114 115 116 |
# File 'lib/chargebee/models/credit_note.rb', line 109 def self.refund(id, params={}, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"refund"), params, env, headers,nil, false, jsonKeys, , "creditNote", "refund") end |
.remove_tax_withheld_refund(id, params, env = nil, headers = {}) ⇒ Object
160 161 162 163 164 165 166 167 |
# File 'lib/chargebee/models/credit_note.rb', line 160 def self.remove_tax_withheld_refund(id, params, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"remove_tax_withheld_refund"), params, env, headers,nil, false, jsonKeys, , "creditNote", "removeTaxWithheldRefund") end |
.resend_einvoice(id, env = nil, headers = {}) ⇒ Object
169 170 171 172 173 174 175 176 |
# File 'lib/chargebee/models/credit_note.rb', line 169 def self.resend_einvoice(id, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"resend_einvoice"), {}, env, headers,nil, false, jsonKeys, , "creditNote", "resendEinvoice") end |
.retrieve(id, params = {}, env = nil, headers = {}) ⇒ Object
86 87 88 89 90 91 |
# File 'lib/chargebee/models/credit_note.rb', line 86 def self.retrieve(id, params={}, env=nil, headers={}) jsonKeys = { } = {} Request.send('get', uri_path("credit_notes",id.to_s), params, env, headers,nil, false, jsonKeys, , "creditNote", "retrieve") end |
.send_einvoice(id, env = nil, headers = {}) ⇒ Object
178 179 180 181 182 183 184 185 |
# File 'lib/chargebee/models/credit_note.rb', line 178 def self.send_einvoice(id, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"send_einvoice"), {}, env, headers,nil, false, jsonKeys, , "creditNote", "sendEinvoice") end |
.void_credit_note(id, params = {}, env = nil, headers = {}) ⇒ Object
127 128 129 130 131 132 133 134 |
# File 'lib/chargebee/models/credit_note.rb', line 127 def self.void_credit_note(id, params={}, env=nil, headers={}) jsonKeys = { } = { :isIdempotent => true } Request.send('post', uri_path("credit_notes",id.to_s,"void"), params, env, headers,nil, false, jsonKeys, , "creditNote", "voidCreditNote") end |