All URIs are relative to https://rest.zuora.com
Method | HTTP request | Description |
---|---|---|
get_breakdown_invoice_by_order | GET /v1/invoices/{invoiceNumber}/amountBreakdownByOrder | Get breakdown of invoice by order |
object_delete_invoice | DELETE /v1/object/invoice/{id} | CRUD: Delete Invoice |
object_get_invoice | GET /v1/object/invoice/{id} | CRUD: Retrieve Invoice |
object_put_invoice | PUT /v1/object/invoice/{id} | CRUD: Update Invoice |
post_credit_memo_from_invoice | POST /v1/invoices/{invoiceId}/creditmemos | Create credit memo from invoice |
post_debit_memo_from_invoice | POST /v1/invoices/{invoiceId}/debitmemos | Create debit memo from invoice |
post_email_invoice | POST /v1/invoices/{invoiceId}/emails | Email invoice |
put_reverse_invoice | PUT /v1/invoices/{invoiceId}/reverse | Reverse invoice |
GetInvoiceAmountBreakdownByOrderResponse get_breakdown_invoice_by_order(invoice_number, opts)
Get breakdown of invoice by order
Note: This feature is only available if you have the Order Metrics feature enabled. If you wish to have access to the feature, submit a request at Zuora Global Support. We will investigate your use cases and data before enabling this feature for you. If you have the Orders feature enabled, you already have the Order Metrics feature enabled. Retrieves a specified invoice that is broken down by orders. The invoice items might be broken down into a list of order rated items.
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
invoice_number = "invoice_number_example" # String | Number of invoice to be broken down.
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#Get breakdown of invoice by order
result = api_instance.get_breakdown_invoice_by_order(invoice_number, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->get_breakdown_invoice_by_order: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_number | String | Number of invoice to be broken down. | |
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
GetInvoiceAmountBreakdownByOrderResponse
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
ProxyDeleteResponse object_delete_invoice(id, opts)
CRUD: Delete Invoice
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
id = "id_example" # String | Object id
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#CRUD: Delete Invoice
result = api_instance.object_delete_invoice(id, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->object_delete_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Object id | |
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
ProxyGetInvoice object_get_invoice(id, opts)
CRUD: Retrieve Invoice
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
id = "id_example" # String | Object id
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
fields: "fields_example" # String | Object fields to return
}
begin
#CRUD: Retrieve Invoice
result = api_instance.object_get_invoice(id, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->object_get_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Object id | |
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
fields | String | Object fields to return | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
ProxyCreateOrModifyResponse object_put_invoice(id, modify_request, opts)
CRUD: Update Invoice
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
id = "id_example" # String | Object id
modify_request = Zuora::ProxyModifyInvoice.new # ProxyModifyInvoice |
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#CRUD: Update Invoice
result = api_instance.object_put_invoice(id, modify_request, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->object_put_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | String | Object id | |
modify_request | ProxyModifyInvoice | ||
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
GETCreditMemoType post_credit_memo_from_invoice(body, invoice_id, opts)
Create credit memo from invoice
Note: The Advanced AR Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Creates an ad-hoc credit memo from an invoice. You can create a credit memo from an invoice only if you have the user permission. See Billing Roles for more information.
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
body = Zuora::CreditMemoFromInvoiceType.new # CreditMemoFromInvoiceType |
invoice_id = "invoice_id_example" # String | The ID of an invoice that you want to create a credit memo from.
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#Create credit memo from invoice
result = api_instance.post_credit_memo_from_invoice(body, invoice_id, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->post_credit_memo_from_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | CreditMemoFromInvoiceType | ||
invoice_id | String | The ID of an invoice that you want to create a credit memo from. | |
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
GETDebitMemoType post_debit_memo_from_invoice(invoice_id, body, opts)
Create debit memo from invoice
Note: The Advanced AR Settlement feature is in Limited Availability. This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you wish to have access to the feature, submit a request at Zuora Global Support. Creates an ad-hoc debit memo from an invoice. You can create a debit memo from an invoice only if you have the user permission. See Billing Roles for more information.
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
invoice_id = "invoice_id_example" # String | The ID of an invoice that you want to create a debit memo from.
body = Zuora::DebitMemoFromInvoiceType.new # DebitMemoFromInvoiceType |
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#Create debit memo from invoice
result = api_instance.post_debit_memo_from_invoice(invoice_id, body, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->post_debit_memo_from_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | String | The ID of an invoice that you want to create a debit memo from. | |
body | DebitMemoFromInvoiceType | ||
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
CommonResponseType post_email_invoice(request, invoice_id, opts)
Email invoice
Sends a posted invoice to the specified email addresses manually. ## Notes - You must activate the Manual Email For Invoice | Manual Email For Invoice notification before emailing invoices. To include the invoice PDF in the email, select the Include Invoice PDF check box in the Edit notification dialog from the Zuora UI. See Create and Edit Notifications for more information. - Zuora sends the email messages based on the email template you set. You can set the email template to use in the Delivery Options panel of the Edit notification dialog from the Zuora UI. By default, the Invoice Posted Default Email Template template is used. See Create and Edit Email Templates for more information. - The invoices are sent only to the work email addresses or personal email addresses of the Bill To contact if the following conditions are all met: * The useEmailTemplateSetting
field is set to false
. * The email addresses are not specified in the emailAddresses
field.
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
request = Zuora::PostInvoiceEmailRequestType.new # PostInvoiceEmailRequestType |
invoice_id = "invoice_id_example" # String | The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#Email invoice
result = api_instance.post_email_invoice(request, invoice_id, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->post_email_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
request | PostInvoiceEmailRequestType | ||
invoice_id | String | The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab. | |
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8
PutReverseInvoiceResponseType put_reverse_invoice(invoice_id, request, opts)
Reverse invoice
Reverses posted invoices. Note: This feature is only available if you have the Advanced AR Settlement feature enabled. The Advanced AR Settlement feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Restrictions You are not allowed to reverse an invoice if one of the following restrictions is met: * Payments and credit memos are applied to the invoice. * The invoice is split. * The invoice is not in Posted status. * The total amount of the invoice is less than 0 (a negative invoice). * Using Tax Connector for Extension Platform to calculate taxes. See Reverse Posted Invoices for more information.
# load the gem
require 'zuora'
api_instance = Zuora::InvoicesApi.new
invoice_id = "invoice_id_example" # String | The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab.
request = Zuora::PutReverseInvoiceType.new # PutReverseInvoiceType |
opts = {
entity_id: "entity_id_example", # String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
entity_name: "entity_name_example" # String | The [name of the entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity/B_Introduction_to_Entity_and_Entity_Hierarchy#Name_and_Display_Name) that you want to access. Note that you must have permission to access the entity. For more information, see [REST Authentication](https://www.zuora.com/developer/api-reference/#section/Authentication/Entity-Id-and-Entity-Name).
}
begin
#Reverse invoice
result = api_instance.put_reverse_invoice(invoice_id, request, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling InvoicesApi->put_reverse_invoice: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
invoice_id | String | The ID of the invoice. For example, 2c92c8955bd63cc1015bd7c151af02ab. | |
request | PutReverseInvoiceType | ||
entity_id | String | The Id of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
entity_name | String | The name of the entity that you want to access. Note that you must have permission to access the entity. For more information, see REST Authentication. | [optional] |
No authorization required
- Content-Type: application/json; charset=utf-8
- Accept: application/json; charset=utf-8