Getting Purchase Credit Note Details
Function: getPurchaseCreditNotesDetails()
Purpose
The function provides comprehensive details about purchase credit notes, including their status, amounts, dates, and custom attributes, allowing businesses to track and manage their purchase credits efficiently.
Parameters
Parameter | Type | Description |
---|---|---|
PURCHASE_CREDIT_NOTE_ID | string | Unique identifier for the purchase credit note. |
Use Case
This function can be used for businesses to review and manage their credit notes, ensuring accurate records of transactions and balances. It supports monitoring refundable amounts, tracking creation history, and associating additional custom data for operational clarity.
def get_purchase_credit_notes_details():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.purchase_credit_notes.list(id='PURCHASE_CREDIT_NOTE_ID')
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getPurchaseCreditNotesDetails()
{
$id = "PURCHASE_CREDIT_NOTE_ID";
try {
$response = $this->purchaseCreditNoteService->read($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response contains detailed information about the specified purchase credit note, including status, balance, custom attributes, and metadata such as creation and last update timestamps.
PurchaseCreditNoteDetailsDTO(
purchaseCreditNotes=PurchaseCreditNoteDTO(
status="STATUS",
id="CREDIT_NOTE_ID",
date="YYYY-MM-DDTHH:MM:SSZ",
amount="AMOUNT",
remainingBalance="BALANCE",
refundable="REFUNDABLE",
paymentId="PAYMENT_ID",
createdBy="CREATED_BY",
createdOn="YYYY-MM-DDTHH:MM:SSZ",
lastUpdatedBy="UPDATED_BY",
lastUpdatedOn="YYYY-MM-DDTHH:MM:SSZ",
uuid="UUID",
version="VERSION",
customAttributes=[
CustomAttributesDTO(
name="ATTRIBUTE_NAME",
value="ATTRIBUTE_VALUE"
)
]
)
)
{
"purchase_credit_notes": {
"status": "STATUS",
"id": "CREDIT_NOTE_ID",
"date": "YYYY-MM-DDTHH:MM:SSZ",
"amount": "AMOUNT",
"remaining_balance": "BALANCE",
"refundable": "REFUNDABLE",
"payment_id": "PAYMENT_ID",
"created_by": "CREATED_BY",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"last_updated_by": "UPDATED_BY",
"last_updated_on": "YYYY-MM-DDTHH:MM:SSZ",
"uuid": "UUID",
"version": "VERSION",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "ATTRIBUTE_VALUE"
}
]
}
}
Getting Purchase Credit Note Applications List of a Specific Invoice
Function: getInvoicePurchaseCreditNoteApplicationsList()
Purpose
The function retrieves the list of credit note applications associated with a specific purchase invoice. It provides details such as the applied amount, associated credit note ID, payment ID, and creation metadata, helping businesses track credit applications on purchase invoices efficiently.
Parameters
Parameter | Type | Description |
---|---|---|
PURCHASE_INVOICE_ID | string | Unique identifier for the purchase invoice. |
Use Case
This function can be used for reviewing all credit notes applied to a specific purchase invoice. Businesses can utilize this to manage and verify applied credits, ensuring transparency and accuracy in invoice settlements.
def get_invoice_purchase_credit_note_applications_list():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.purchase_credit_notes.invoice_application_list(id='PURCHASE_INVOICE_ID')
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getInvoicePurchaseCreditNoteApplicationsList()
{
$purchaseInvoiceId = "PURCHASE_INVOICE_ID";
try {
$response = $this->purchaseCreditNoteService->readPurchaseInvoiceCreditNoteApplications($purchaseInvoiceId,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response includes a list of purchase credit note applications applied to the specified invoice. Each application contains details like the applied amount, date, associated credit note, payment IDs, and pagination metadata for retrieving large datasets.
InvoicePurchaseCreditNoteApplicationsListDTO(
purchaseInvoice=PurchaseCreditNoteApplicationsListDTO(
purchaseCreditNoteApplications=[
PurchaseCreditNoteApplicationDTO(
date="YYYY-MM-DDTHH:MM:SSZ",
amount="AMOUNT_PLACEHOLDER",
creditNoteId="CREDIT_NOTE_ID_PLACEHOLDER",
paymentId="PAYMENT_ID_PLACEHOLDER",
createdBy="CREATED_BY_PLACEHOLDER",
createdOn="YYYY-MM-DDTHH:MM:SSZ",
uuid="UUID_PLACEHOLDER",
version="VERSION_PLACEHOLDER"
)
],
pagination=PaginationDTO(
records=RECORDS_PLACEHOLDER,
limit=LIMIT_PLACEHOLDER,
offset=OFFSET_PLACEHOLDER,
previousPage="PREVIOUS_PAGE_PLACEHOLDER",
nextPage="NEXT_PAGE_PLACEHOLDER"
)
)
)
{
"purchase_invoice": {
"purchase_credit_note_applications": [
{
"date": "YYYY-MM-DDTHH:MM:SSZ",
"amount": "AMOUNT_PLACEHOLDER",
"credit_note_id": "CREDIT_NOTE_ID_PLACEHOLDER",
"payment_id": "PAYMENT_ID_PLACEHOLDER",
"created_by": "CREATED_BY_PLACEHOLDER",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"uuid": "UUID_PLACEHOLDER",
"version": "VERSION_PLACEHOLDER"
}
],
"pagination": {
"records": "RECORDS_PLACEHOLDER",
"limit": "LIMIT_PLACEHOLDER",
"offset": "OFFSET_PLACEHOLDER",
"previous_page": "PREVIOUS_PAGE_PLACEHOLDER",
"next_page": "NEXT_PAGE_PLACEHOLDER"
}
}
}
Getting List of All Purchase Credit Note Applications
Function: getAllPurchaseCreditNoteApplicationsList()
Purpose
This function retrieves a comprehensive list of all purchase credit note applications. It provides key details such as applied amounts, associated credit note and payment IDs, and creation metadata, enabling businesses to track credit note usage effectively across multiple transactions.
Parameters
This function does not require any input parameters.
Use Case
This function can be used for generating an overview of all purchase credit note applications in a system. Businesses can utilize this to manage credit allocations, reconcile transactions, and identify trends in credit usage.
def get_all_purchase_credit_note_applications_list():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.purchase_credit_notes.application_list()
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getAllPurchaseCreditNoteApplicationsList()
{
try {
$response = $this->purchaseCreditNoteService->readAllPurchaseCreditNoteApplications('v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response includes a list of purchase credit note applications with details such as application dates, amounts, credit note IDs, payment IDs, and pagination metadata for managing large datasets.
PurchaseCreditNoteApplicationsListDTO(
purchaseCreditNoteApplications=[
PurchaseCreditNoteApplicationDTO(
date="YYYY-MM-DDTHH:MM:SSZ",
amount="AMOUNT_PLACEHOLDER",
creditNoteId="CREDIT_NOTE_ID_PLACEHOLDER",
paymentId="PAYMENT_ID_PLACEHOLDER",
createdBy="CREATED_BY_PLACEHOLDER",
createdOn="YYYY-MM-DDTHH:MM:SSZ",
uuid="UUID_PLACEHOLDER",
version="VERSION_PLACEHOLDER"
)
],
pagination=PaginationDTO(
records="RECORDS_PLACEHOLDER",
limit="LIMIT_PLACEHOLDER",
offset="OFFSET_PLACEHOLDER",
previousPage="PREVIOUS_PAGE_PLACEHOLDER",
nextPage="NEXT_PAGE_PLACEHOLDER"
)
)
{
"purchase_credit_note_applications": [
{
"date": "YYYY-MM-DDTHH:MM:SSZ",
"amount": "AMOUNT_PLACEHOLDER",
"credit_note_id": "CREDIT_NOTE_ID_PLACEHOLDER",
"payment_id": "PAYMENT_ID_PLACEHOLDER",
"created_by": "CREATED_BY_PLACEHOLDER",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"uuid": "UUID_PLACEHOLDER",
"version": "VERSION_PLACEHOLDER"
}
],
"pagination": {
"records": "RECORDS_PLACEHOLDER",
"limit": "LIMIT_PLACEHOLDER",
"offset": "OFFSET_PLACEHOLDER",
"previous_page": "PREVIOUS_PAGE_PLACEHOLDER",
"next_page": "NEXT_PAGE_PLACEHOLDER"
}
}
Getting Details of a Specific Purchase Credit Note Application
Function: getPurchaseCreditNoteApplicationDetails()
Purpose
The function retrieves detailed information about a specific purchase credit note application using its unique identifier (UUID). It provides comprehensive details, including the application date, applied amount, credit note ID, payment ID, and metadata about its creation and updates.
Parameters
Parameter | Type | Description |
---|---|---|
PURCHASE_CREDIT_NOTE_UUID | string | The unique identifier for the purchase credit note application to be retrieved |
Use Case
This function can be used to allow users to view detailed information about a specific purchase credit note application. It is beneficial for auditing, verifying the application of credit notes, and resolving disputes related to applied credits.
def get_purchase_credit_note_application_details():
SDKConfig.PRINT_REQUEST_DATA = True
SDKConfig.PRINT_RAW_RESPONSE = True
exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())
try:
response = exsited_sdk.purchase_credit_notes.application_uuid(uuid='PURCHASE_CREDIT_NOTE_UUID')
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function getPurchaseCreditNoteApplicationDetails()
{
$purchaseCreditNoteApplicationsUUID = "PURCHASE_CREDIT_NOTE_UUID";
try {
$response = $this->purchaseCreditNoteService->readPurchaseCreditNoteApplicationsDetails($purchaseCreditNoteApplicationsUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
Response
The response contains the details of the specified purchase credit note application, including the amount applied, associated credit note and payment IDs, and metadata such as creation date and UUID.
PurchaseCreditNoteApplicationsListDTO(
purchaseCreditNoteApplications=
PurchaseCreditNoteApplicationDTO(
date="YYYY-MM-DDTHH:MM:SSZ",
amount="AMOUNT_PLACEHOLDER",
creditNoteId="CREDIT_NOTE_ID_PLACEHOLDER",
paymentId="PAYMENT_ID_PLACEHOLDER",
createdBy="CREATED_BY_PLACEHOLDER",
createdOn="YYYY-MM-DDTHH:MM:SSZ",
uuid="UUID_PLACEHOLDER",
version="VERSION_PLACEHOLDER"
)
)
{
"purchase_credit_note_application": {
"date": "YYYY-MM-DDTHH:MM:SSZ",
"amount": "AMOUNT_PLACEHOLDER",
"credit_note_id": "CREDIT_NOTE_ID_PLACEHOLDER",
"payment_id": "PAYMENT_ID_PLACEHOLDER",
"created_by": "CREATED_BY_PLACEHOLDER",
"created_on": "YYYY-MM-DDTHH:MM:SSZ",
"uuid": "UUID_PLACEHOLDER",
"version": "VERSION_PLACEHOLDER"
}
}