chargebee 2.6.4 → 2.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1524 -1488
  3. data/LICENSE +24 -24
  4. data/README.rdoc +41 -41
  5. data/chargebee.gemspec +4 -3
  6. data/lib/chargebee.rb +85 -85
  7. data/lib/chargebee/environment.rb +28 -28
  8. data/lib/chargebee/errors.rb +43 -43
  9. data/lib/chargebee/models/addon.rb +45 -45
  10. data/lib/chargebee/models/address.rb +18 -18
  11. data/lib/chargebee/models/card.rb +32 -32
  12. data/lib/chargebee/models/comment.rb +25 -25
  13. data/lib/chargebee/models/contact.rb +10 -10
  14. data/lib/chargebee/models/coupon.rb +40 -40
  15. data/lib/chargebee/models/coupon_code.rb +25 -25
  16. data/lib/chargebee/models/coupon_set.rb +37 -37
  17. data/lib/chargebee/models/credit_note.rb +77 -77
  18. data/lib/chargebee/models/credit_note_estimate.rb +35 -35
  19. data/lib/chargebee/models/customer.rb +137 -120
  20. data/lib/chargebee/models/download.rb +9 -9
  21. data/lib/chargebee/models/estimate.rb +46 -46
  22. data/lib/chargebee/models/event.rb +45 -45
  23. data/lib/chargebee/models/export.rb +86 -86
  24. data/lib/chargebee/models/gift.rb +42 -42
  25. data/lib/chargebee/models/hierarchy.rb +10 -0
  26. data/lib/chargebee/models/hosted_page.rb +77 -77
  27. data/lib/chargebee/models/invoice.rb +172 -172
  28. data/lib/chargebee/models/invoice_estimate.rb +35 -35
  29. data/lib/chargebee/models/model.rb +101 -101
  30. data/lib/chargebee/models/order.rb +76 -76
  31. data/lib/chargebee/models/payment_source.rb +79 -71
  32. data/lib/chargebee/models/plan.rb +60 -59
  33. data/lib/chargebee/models/portal_session.rb +30 -30
  34. data/lib/chargebee/models/promotional_credit.rb +30 -30
  35. data/lib/chargebee/models/quote.rb +72 -72
  36. data/lib/chargebee/models/resource_migration.rb +13 -13
  37. data/lib/chargebee/models/site_migration_detail.rb +14 -14
  38. data/lib/chargebee/models/subscription.rb +137 -137
  39. data/lib/chargebee/models/subscription_estimate.rb +13 -13
  40. data/lib/chargebee/models/third_party_payment_method.rb +9 -9
  41. data/lib/chargebee/models/time_machine.rb +46 -46
  42. data/lib/chargebee/models/token.rb +11 -0
  43. data/lib/chargebee/models/transaction.rb +62 -62
  44. data/lib/chargebee/models/unbilled_charge.rb +31 -31
  45. data/lib/chargebee/models/virtual_bank_account.rb +30 -26
  46. data/lib/chargebee/request.rb +27 -27
  47. data/lib/chargebee/rest.rb +92 -92
  48. data/lib/chargebee/result.rb +255 -240
  49. data/spec/errors_spec.rb +23 -23
  50. data/spec/sample_response.rb +73 -73
  51. metadata +5 -4
  52. data/lib/chargebee/.DS_Store +0 -0
@@ -0,0 +1,10 @@
1
+ module ChargeBee
2
+ class Hierarchy < Model
3
+
4
+ attr_accessor :parent_id, :payment_owner_id, :invoice_owner_id, :customer_id, :children_ids
5
+
6
+ # OPERATIONS
7
+ #-----------
8
+
9
+ end # ~Hierarchy
10
+ end # ~ChargeBee
@@ -1,78 +1,78 @@
1
- module ChargeBee
2
- class HostedPage < Model
3
-
4
- attr_accessor :id, :type, :url, :state, :failure_reason, :pass_thru_content, :embed, :created_at,
5
- :expires_at, :updated_at, :resource_version, :checkout_info
6
-
7
- class Content < Result
8
- end
9
-
10
- def content
11
- if @values[:content].nil?
12
- nil
13
- else
14
- Content.new(@values[:content])
15
- end
16
- end
17
-
18
- # OPERATIONS
19
- #-----------
20
-
21
- def self.checkout_new(params, env=nil, headers={})
22
- Request.send('post', uri_path("hosted_pages","checkout_new"), params, env, headers)
23
- end
24
-
25
- def self.checkout_existing(params, env=nil, headers={})
26
- Request.send('post', uri_path("hosted_pages","checkout_existing"), params, env, headers)
27
- end
28
-
29
- def self.update_card(params, env=nil, headers={})
30
- Request.send('post', uri_path("hosted_pages","update_card"), params, env, headers)
31
- end
32
-
33
- def self.update_payment_method(params, env=nil, headers={})
34
- Request.send('post', uri_path("hosted_pages","update_payment_method"), params, env, headers)
35
- end
36
-
37
- def self.manage_payment_sources(params, env=nil, headers={})
38
- Request.send('post', uri_path("hosted_pages","manage_payment_sources"), params, env, headers)
39
- end
40
-
41
- def self.collect_now(params, env=nil, headers={})
42
- Request.send('post', uri_path("hosted_pages","collect_now"), params, env, headers)
43
- end
44
-
45
- def self.accept_quote(params, env=nil, headers={})
46
- Request.send('post', uri_path("hosted_pages","accept_quote"), params, env, headers)
47
- end
48
-
49
- def self.extend_subscription(params, env=nil, headers={})
50
- Request.send('post', uri_path("hosted_pages","extend_subscription"), params, env, headers)
51
- end
52
-
53
- def self.checkout_gift(params, env=nil, headers={})
54
- Request.send('post', uri_path("hosted_pages","checkout_gift"), params, env, headers)
55
- end
56
-
57
- def self.claim_gift(params, env=nil, headers={})
58
- Request.send('post', uri_path("hosted_pages","claim_gift"), params, env, headers)
59
- end
60
-
61
- def self.retrieve_agreement_pdf(params, env=nil, headers={})
62
- Request.send('post', uri_path("hosted_pages","retrieve_agreement_pdf"), params, env, headers)
63
- end
64
-
65
- def self.acknowledge(id, env=nil, headers={})
66
- Request.send('post', uri_path("hosted_pages",id.to_s,"acknowledge"), {}, env, headers)
67
- end
68
-
69
- def self.retrieve(id, env=nil, headers={})
70
- Request.send('get', uri_path("hosted_pages",id.to_s), {}, env, headers)
71
- end
72
-
73
- def self.list(params={}, env=nil, headers={})
74
- Request.send_list_request('get', uri_path("hosted_pages"), params, env, headers)
75
- end
76
-
77
- end # ~HostedPage
1
+ module ChargeBee
2
+ class HostedPage < Model
3
+
4
+ attr_accessor :id, :type, :url, :state, :failure_reason, :pass_thru_content, :embed, :created_at,
5
+ :expires_at, :updated_at, :resource_version, :checkout_info
6
+
7
+ class Content < Result
8
+ end
9
+
10
+ def content
11
+ if @values[:content].nil?
12
+ nil
13
+ else
14
+ Content.new(@values[:content])
15
+ end
16
+ end
17
+
18
+ # OPERATIONS
19
+ #-----------
20
+
21
+ def self.checkout_new(params, env=nil, headers={})
22
+ Request.send('post', uri_path("hosted_pages","checkout_new"), params, env, headers)
23
+ end
24
+
25
+ def self.checkout_existing(params, env=nil, headers={})
26
+ Request.send('post', uri_path("hosted_pages","checkout_existing"), params, env, headers)
27
+ end
28
+
29
+ def self.update_card(params, env=nil, headers={})
30
+ Request.send('post', uri_path("hosted_pages","update_card"), params, env, headers)
31
+ end
32
+
33
+ def self.update_payment_method(params, env=nil, headers={})
34
+ Request.send('post', uri_path("hosted_pages","update_payment_method"), params, env, headers)
35
+ end
36
+
37
+ def self.manage_payment_sources(params, env=nil, headers={})
38
+ Request.send('post', uri_path("hosted_pages","manage_payment_sources"), params, env, headers)
39
+ end
40
+
41
+ def self.collect_now(params, env=nil, headers={})
42
+ Request.send('post', uri_path("hosted_pages","collect_now"), params, env, headers)
43
+ end
44
+
45
+ def self.accept_quote(params, env=nil, headers={})
46
+ Request.send('post', uri_path("hosted_pages","accept_quote"), params, env, headers)
47
+ end
48
+
49
+ def self.extend_subscription(params, env=nil, headers={})
50
+ Request.send('post', uri_path("hosted_pages","extend_subscription"), params, env, headers)
51
+ end
52
+
53
+ def self.checkout_gift(params, env=nil, headers={})
54
+ Request.send('post', uri_path("hosted_pages","checkout_gift"), params, env, headers)
55
+ end
56
+
57
+ def self.claim_gift(params, env=nil, headers={})
58
+ Request.send('post', uri_path("hosted_pages","claim_gift"), params, env, headers)
59
+ end
60
+
61
+ def self.retrieve_agreement_pdf(params, env=nil, headers={})
62
+ Request.send('post', uri_path("hosted_pages","retrieve_agreement_pdf"), params, env, headers)
63
+ end
64
+
65
+ def self.acknowledge(id, env=nil, headers={})
66
+ Request.send('post', uri_path("hosted_pages",id.to_s,"acknowledge"), {}, env, headers)
67
+ end
68
+
69
+ def self.retrieve(id, env=nil, headers={})
70
+ Request.send('get', uri_path("hosted_pages",id.to_s), {}, env, headers)
71
+ end
72
+
73
+ def self.list(params={}, env=nil, headers={})
74
+ Request.send_list_request('get', uri_path("hosted_pages"), params, env, headers)
75
+ end
76
+
77
+ end # ~HostedPage
78
78
  end # ~ChargeBee
@@ -1,173 +1,173 @@
1
- module ChargeBee
2
- class Invoice < Model
3
-
4
- class LineItem < Model
5
- attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id
6
- end
7
-
8
- class Discount < Model
9
- attr_accessor :amount, :description, :entity_type, :entity_id
10
- end
11
-
12
- class LineItemDiscount < Model
13
- attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
14
- end
15
-
16
- class Tax < Model
17
- attr_accessor :name, :amount, :description
18
- end
19
-
20
- class LineItemTax < Model
21
- attr_accessor :line_item_id, :tax_name, :tax_rate, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
22
- end
23
-
24
- class LineItemTier < Model
25
- attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount
26
- end
27
-
28
- class LinkedPayment < Model
29
- attr_accessor :txn_id, :applied_amount, :applied_at, :txn_status, :txn_date, :txn_amount
30
- end
31
-
32
- class AppliedCredit < Model
33
- attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_date, :cn_status
34
- end
35
-
36
- class AdjustmentCreditNote < Model
37
- attr_accessor :cn_id, :cn_reason_code, :cn_date, :cn_total, :cn_status
38
- end
39
-
40
- class IssuedCreditNote < Model
41
- attr_accessor :cn_id, :cn_reason_code, :cn_date, :cn_total, :cn_status
42
- end
43
-
44
- class LinkedOrder < Model
45
- attr_accessor :id, :document_number, :status, :order_type, :reference_id, :fulfillment_status, :batch_id, :created_at
46
- end
47
-
48
- class Note < Model
49
- attr_accessor :entity_type, :note, :entity_id
50
- end
51
-
52
- class ShippingAddress < Model
53
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
54
- end
55
-
56
- class BillingAddress < Model
57
- attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
58
- end
59
-
60
- attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
61
- :price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
62
- :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
63
- :voided_at, :resource_version, :updated_at, :sub_total, :tax, :first_invoice, :has_advance_charges,
64
- :term_finalized, :is_gifted, :expected_payment_date, :amount_to_collect, :round_off_amount,
65
- :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
66
- :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address,
67
- :billing_address, :deleted
68
-
69
- # OPERATIONS
70
- #-----------
71
-
72
- def self.create(params, env=nil, headers={})
73
- Request.send('post', uri_path("invoices"), params, env, headers)
74
- end
75
-
76
- def self.charge(params, env=nil, headers={})
77
- Request.send('post', uri_path("invoices","charge"), params, env, headers)
78
- end
79
-
80
- def self.charge_addon(params, env=nil, headers={})
81
- Request.send('post', uri_path("invoices","charge_addon"), params, env, headers)
82
- end
83
-
84
- def self.stop_dunning(id, env=nil, headers={})
85
- Request.send('post', uri_path("invoices",id.to_s,"stop_dunning"), {}, env, headers)
86
- end
87
-
88
- def self.import_invoice(params, env=nil, headers={})
89
- Request.send('post', uri_path("invoices","import_invoice"), params, env, headers)
90
- end
91
-
92
- def self.apply_payments(id, params={}, env=nil, headers={})
93
- Request.send('post', uri_path("invoices",id.to_s,"apply_payments"), params, env, headers)
94
- end
95
-
96
- def self.apply_credits(id, params={}, env=nil, headers={})
97
- Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers)
98
- end
99
-
100
- def self.list(params={}, env=nil, headers={})
101
- Request.send_list_request('get', uri_path("invoices"), params, env, headers)
102
- end
103
-
104
- def self.invoices_for_customer(id, params={}, env=nil, headers={})
105
- Request.send('get', uri_path("customers",id.to_s,"invoices"), params, env, headers)
106
- end
107
-
108
- def self.invoices_for_subscription(id, params={}, env=nil, headers={})
109
- Request.send('get', uri_path("subscriptions",id.to_s,"invoices"), params, env, headers)
110
- end
111
-
112
- def self.retrieve(id, env=nil, headers={})
113
- Request.send('get', uri_path("invoices",id.to_s), {}, env, headers)
114
- end
115
-
116
- def self.pdf(id, params={}, env=nil, headers={})
117
- Request.send('post', uri_path("invoices",id.to_s,"pdf"), params, env, headers)
118
- end
119
-
120
- def self.add_charge(id, params, env=nil, headers={})
121
- Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env, headers)
122
- end
123
-
124
- def self.add_addon_charge(id, params, env=nil, headers={})
125
- Request.send('post', uri_path("invoices",id.to_s,"add_addon_charge"), params, env, headers)
126
- end
127
-
128
- def self.close(id, env=nil, headers={})
129
- Request.send('post', uri_path("invoices",id.to_s,"close"), {}, env, headers)
130
- end
131
-
132
- def self.collect_payment(id, params={}, env=nil, headers={})
133
- Request.send('post', uri_path("invoices",id.to_s,"collect_payment"), params, env, headers)
134
- end
135
-
136
- def self.record_payment(id, params, env=nil, headers={})
137
- Request.send('post', uri_path("invoices",id.to_s,"record_payment"), params, env, headers)
138
- end
139
-
140
- def self.refund(id, params={}, env=nil, headers={})
141
- Request.send('post', uri_path("invoices",id.to_s,"refund"), params, env, headers)
142
- end
143
-
144
- def self.record_refund(id, params, env=nil, headers={})
145
- Request.send('post', uri_path("invoices",id.to_s,"record_refund"), params, env, headers)
146
- end
147
-
148
- def self.remove_payment(id, params, env=nil, headers={})
149
- Request.send('post', uri_path("invoices",id.to_s,"remove_payment"), params, env, headers)
150
- end
151
-
152
- def self.remove_credit_note(id, params, env=nil, headers={})
153
- Request.send('post', uri_path("invoices",id.to_s,"remove_credit_note"), params, env, headers)
154
- end
155
-
156
- def self.void_invoice(id, params={}, env=nil, headers={})
157
- Request.send('post', uri_path("invoices",id.to_s,"void"), params, env, headers)
158
- end
159
-
160
- def self.write_off(id, params={}, env=nil, headers={})
161
- Request.send('post', uri_path("invoices",id.to_s,"write_off"), params, env, headers)
162
- end
163
-
164
- def self.delete(id, params={}, env=nil, headers={})
165
- Request.send('post', uri_path("invoices",id.to_s,"delete"), params, env, headers)
166
- end
167
-
168
- def self.update_details(id, params={}, env=nil, headers={})
169
- Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers)
170
- end
171
-
172
- end # ~Invoice
1
+ module ChargeBee
2
+ class Invoice < Model
3
+
4
+ class LineItem < Model
5
+ attr_accessor :id, :subscription_id, :date_from, :date_to, :unit_amount, :quantity, :amount, :pricing_model, :is_taxed, :tax_amount, :tax_rate, :discount_amount, :item_level_discount_amount, :description, :entity_type, :tax_exempt_reason, :entity_id, :customer_id
6
+ end
7
+
8
+ class Discount < Model
9
+ attr_accessor :amount, :description, :entity_type, :entity_id
10
+ end
11
+
12
+ class LineItemDiscount < Model
13
+ attr_accessor :line_item_id, :discount_type, :coupon_id, :discount_amount
14
+ end
15
+
16
+ class Tax < Model
17
+ attr_accessor :name, :amount, :description
18
+ end
19
+
20
+ class LineItemTax < Model
21
+ attr_accessor :line_item_id, :tax_name, :tax_rate, :is_partial_tax_applied, :is_non_compliance_tax, :taxable_amount, :tax_amount, :tax_juris_type, :tax_juris_name, :tax_juris_code
22
+ end
23
+
24
+ class LineItemTier < Model
25
+ attr_accessor :line_item_id, :starting_unit, :ending_unit, :quantity_used, :unit_amount
26
+ end
27
+
28
+ class LinkedPayment < Model
29
+ attr_accessor :txn_id, :applied_amount, :applied_at, :txn_status, :txn_date, :txn_amount
30
+ end
31
+
32
+ class AppliedCredit < Model
33
+ attr_accessor :cn_id, :applied_amount, :applied_at, :cn_reason_code, :cn_date, :cn_status
34
+ end
35
+
36
+ class AdjustmentCreditNote < Model
37
+ attr_accessor :cn_id, :cn_reason_code, :cn_date, :cn_total, :cn_status
38
+ end
39
+
40
+ class IssuedCreditNote < Model
41
+ attr_accessor :cn_id, :cn_reason_code, :cn_date, :cn_total, :cn_status
42
+ end
43
+
44
+ class LinkedOrder < Model
45
+ attr_accessor :id, :document_number, :status, :order_type, :reference_id, :fulfillment_status, :batch_id, :created_at
46
+ end
47
+
48
+ class Note < Model
49
+ attr_accessor :entity_type, :note, :entity_id
50
+ end
51
+
52
+ class ShippingAddress < Model
53
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
54
+ end
55
+
56
+ class BillingAddress < Model
57
+ attr_accessor :first_name, :last_name, :email, :company, :phone, :line1, :line2, :line3, :city, :state_code, :state, :country, :zip, :validation_status
58
+ end
59
+
60
+ attr_accessor :id, :po_number, :customer_id, :subscription_id, :recurring, :status, :vat_number,
61
+ :price_type, :date, :due_date, :net_term_days, :currency_code, :total, :amount_paid, :amount_adjusted,
62
+ :write_off_amount, :credits_applied, :amount_due, :paid_at, :dunning_status, :next_retry_at,
63
+ :voided_at, :resource_version, :updated_at, :sub_total, :tax, :first_invoice, :has_advance_charges,
64
+ :term_finalized, :is_gifted, :expected_payment_date, :amount_to_collect, :round_off_amount,
65
+ :line_items, :discounts, :line_item_discounts, :taxes, :line_item_taxes, :line_item_tiers, :linked_payments,
66
+ :applied_credits, :adjustment_credit_notes, :issued_credit_notes, :linked_orders, :notes, :shipping_address,
67
+ :billing_address, :payment_owner, :deleted
68
+
69
+ # OPERATIONS
70
+ #-----------
71
+
72
+ def self.create(params, env=nil, headers={})
73
+ Request.send('post', uri_path("invoices"), params, env, headers)
74
+ end
75
+
76
+ def self.charge(params, env=nil, headers={})
77
+ Request.send('post', uri_path("invoices","charge"), params, env, headers)
78
+ end
79
+
80
+ def self.charge_addon(params, env=nil, headers={})
81
+ Request.send('post', uri_path("invoices","charge_addon"), params, env, headers)
82
+ end
83
+
84
+ def self.stop_dunning(id, params={}, env=nil, headers={})
85
+ Request.send('post', uri_path("invoices",id.to_s,"stop_dunning"), params, env, headers)
86
+ end
87
+
88
+ def self.import_invoice(params, env=nil, headers={})
89
+ Request.send('post', uri_path("invoices","import_invoice"), params, env, headers)
90
+ end
91
+
92
+ def self.apply_payments(id, params={}, env=nil, headers={})
93
+ Request.send('post', uri_path("invoices",id.to_s,"apply_payments"), params, env, headers)
94
+ end
95
+
96
+ def self.apply_credits(id, params={}, env=nil, headers={})
97
+ Request.send('post', uri_path("invoices",id.to_s,"apply_credits"), params, env, headers)
98
+ end
99
+
100
+ def self.list(params={}, env=nil, headers={})
101
+ Request.send_list_request('get', uri_path("invoices"), params, env, headers)
102
+ end
103
+
104
+ def self.invoices_for_customer(id, params={}, env=nil, headers={})
105
+ Request.send('get', uri_path("customers",id.to_s,"invoices"), params, env, headers)
106
+ end
107
+
108
+ def self.invoices_for_subscription(id, params={}, env=nil, headers={})
109
+ Request.send('get', uri_path("subscriptions",id.to_s,"invoices"), params, env, headers)
110
+ end
111
+
112
+ def self.retrieve(id, env=nil, headers={})
113
+ Request.send('get', uri_path("invoices",id.to_s), {}, env, headers)
114
+ end
115
+
116
+ def self.pdf(id, params={}, env=nil, headers={})
117
+ Request.send('post', uri_path("invoices",id.to_s,"pdf"), params, env, headers)
118
+ end
119
+
120
+ def self.add_charge(id, params, env=nil, headers={})
121
+ Request.send('post', uri_path("invoices",id.to_s,"add_charge"), params, env, headers)
122
+ end
123
+
124
+ def self.add_addon_charge(id, params, env=nil, headers={})
125
+ Request.send('post', uri_path("invoices",id.to_s,"add_addon_charge"), params, env, headers)
126
+ end
127
+
128
+ def self.close(id, params={}, env=nil, headers={})
129
+ Request.send('post', uri_path("invoices",id.to_s,"close"), params, env, headers)
130
+ end
131
+
132
+ def self.collect_payment(id, params={}, env=nil, headers={})
133
+ Request.send('post', uri_path("invoices",id.to_s,"collect_payment"), params, env, headers)
134
+ end
135
+
136
+ def self.record_payment(id, params, env=nil, headers={})
137
+ Request.send('post', uri_path("invoices",id.to_s,"record_payment"), params, env, headers)
138
+ end
139
+
140
+ def self.refund(id, params={}, env=nil, headers={})
141
+ Request.send('post', uri_path("invoices",id.to_s,"refund"), params, env, headers)
142
+ end
143
+
144
+ def self.record_refund(id, params, env=nil, headers={})
145
+ Request.send('post', uri_path("invoices",id.to_s,"record_refund"), params, env, headers)
146
+ end
147
+
148
+ def self.remove_payment(id, params, env=nil, headers={})
149
+ Request.send('post', uri_path("invoices",id.to_s,"remove_payment"), params, env, headers)
150
+ end
151
+
152
+ def self.remove_credit_note(id, params, env=nil, headers={})
153
+ Request.send('post', uri_path("invoices",id.to_s,"remove_credit_note"), params, env, headers)
154
+ end
155
+
156
+ def self.void_invoice(id, params={}, env=nil, headers={})
157
+ Request.send('post', uri_path("invoices",id.to_s,"void"), params, env, headers)
158
+ end
159
+
160
+ def self.write_off(id, params={}, env=nil, headers={})
161
+ Request.send('post', uri_path("invoices",id.to_s,"write_off"), params, env, headers)
162
+ end
163
+
164
+ def self.delete(id, params={}, env=nil, headers={})
165
+ Request.send('post', uri_path("invoices",id.to_s,"delete"), params, env, headers)
166
+ end
167
+
168
+ def self.update_details(id, params={}, env=nil, headers={})
169
+ Request.send('post', uri_path("invoices",id.to_s,"update_details"), params, env, headers)
170
+ end
171
+
172
+ end # ~Invoice
173
173
  end # ~ChargeBee