» Purchase Credit Notes Module SDK Documentation
» Purchase Credit Notes Module SDK Documentation

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)

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"
            )
        ]
    )
)

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

ParameterTypeDescription
PURCHASE_INVOICE_IDstring 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)

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"
        )
    )
)

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)

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"
    )
)

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

ParameterTypeDescription
PURCHASE_CREDIT_NOTE_UUIDstringThe 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)

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"
        )
)