All URIs are relative to https://rest.zuora.com
Method | HTTP request | Description |
---|---|---|
delete_journal_run | DELETE /v1/journal-runs/{jr-number} | Delete journal run |
get_journal_run | GET /v1/journal-runs/{jr-number} | Get journal run |
post_journal_run | POST /v1/journal-runs | Create journal run |
put_journal_run | PUT /v1/journal-runs/{jr-number}/cancel | Cancel journal run |
CommonResponseType delete_journal_run(jr_number, opts)
Delete journal run
This reference describes how to delete a journal run using the REST API. You can only delete journal runs that have already been canceled. You must have the "Delete Cancelled Journal Run" Zuora Finance user permission enabled to delete journal runs.
# load the gem
require 'zuora'
api_instance = Zuora::JournalRunsApi.new
jr_number = "jr_number_example" # String | Journal run number. Must be a valid journal run number in the format `JR-00000001`.
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
#Delete journal run
result = api_instance.delete_journal_run(jr_number, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling JournalRunsApi->delete_journal_run: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
jr_number | String | Journal run number. Must be a valid journal run number in the format `JR-00000001`. | |
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
GETJournalRunType get_journal_run(jr_number, opts)
Get journal run
This REST API reference describes how to get information about a journal run. Request and response field descriptions and sample code are provided.
# load the gem
require 'zuora'
api_instance = Zuora::JournalRunsApi.new
jr_number = "jr_number_example" # String | Journal run number. Must be a valid journal run number in the format `JR-00000001`.
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 journal run
result = api_instance.get_journal_run(jr_number, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling JournalRunsApi->get_journal_run: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
jr_number | String | Journal run number. Must be a valid journal run number in the format `JR-00000001`. | |
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
POSTJournalRunResponseType post_journal_run(request, opts)
Create journal run
This REST API reference describes how to create a journal run. Request and response field descriptions and sample code are provided.
# load the gem
require 'zuora'
api_instance = Zuora::JournalRunsApi.new
request = Zuora::POSTJournalRunType.new # POSTJournalRunType |
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 journal run
result = api_instance.post_journal_run(request, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling JournalRunsApi->post_journal_run: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
request | POSTJournalRunType | ||
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 put_journal_run(jr_number, opts)
Cancel journal run
This reference describes how to cancel a journal run using the REST API. The summary journal entries in the journal run are canceled asynchronously. See the "Example" section below for details. You must have the "Cancel Journal Run" Zuora Finance user permission enabled to cancel journal runs. ## Notes When you cancel a journal run, the summary journal entries associated with that journal run are canceled asynchronously. A response of { \"success\": true }
means only that the specified journal run has a status of "Pending", "Error", or "Completed" and therefore can be canceled, but does not mean that the whole journal run was successfully canceled. For example, let's say you want to cancel journal run JR-00000075. The journal run status is "Completed" and it contains ten journal entries. One of the journal entries has its Transferred to Accounting status set to "Yes", meaning that the entry cannot be canceled. The workflow might go as follows: 1. You make an API call to cancel the journal run. 2. The journal run status is "Completed", so you receive a response of { \"success\": true }
. 3. Zuora begins asynchronously canceling journal entries associated with the journal run. The journal entry whose Transferred to Accounting status is "Yes" fails to be canceled. The cancelation process continues, and the other journal entries are successfully canceled. 4. The journal run status remains as "Completed". The status does not change to "Canceled" because the journal run still contains a journey entry that is not canceled.
# load the gem
require 'zuora'
api_instance = Zuora::JournalRunsApi.new
jr_number = "jr_number_example" # String | Journal run number. Must be a valid journal run number in the format JR-00000001. You can only cancel a journal run whose status is \"Pending\", \"Error\", or \"Completed\".
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
#Cancel journal run
result = api_instance.put_journal_run(jr_number, opts)
p result
rescue Zuora::ApiError => e
puts "Exception when calling JournalRunsApi->put_journal_run: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
jr_number | String | Journal run number. Must be a valid journal run number in the format JR-00000001. You can only cancel a journal run whose status is "Pending", "Error", or "Completed". | |
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