data-and-reporting-sdk
Version:
Data And Reporting product consists of API's which provides details of transaction and invoice informations about shell cards. The Shell Card Transaction and Invoice API is REST-based and employs Basic authentication in Version 1 and Oauth authentication
199 lines (195 loc) • 5.95 kB
text/typescript
/**
* Shell Data & Reporting APIsLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
import {
array,
boolean,
lazy,
nullable,
number,
object,
optional,
Schema,
string,
} from '../schema';
import { Accounts, accountsSchema } from './accounts';
export interface InvoiceSearchRequestFilters {
/**
* Collecting Company Id of the selected payer.
* Optional.
* Example:
* 1-Philippines
* 5-UK
*/
colCoId?: number | null;
/**
* Payer Id of the selected payer.
* Optional if PayerNumber is passed else Mandatory
* Example: 123456
*/
payerId?: number | null;
/**
* Payer Number of the selected payer.
* Optional if PayerId is passed else Mandatory
* Example: GB000000123
*/
payerNumber?: string | null;
/**
* Invoice id.
* Optional.
* This input is a search criterion, if given.
* Example: 1
*/
invoiceId?: number | null;
/**
* Invoice number.
* Optional.
* This input is a search criterion, if given.
* Example: 0123456789
*/
invoiceNumber?: string | null;
/**
* Invoice date searched from this date.
* Optional.
* This input is a search criterion, if given.
* Date format: yyyyMMdd
* Example: 20170830
* Note: This criterion is ignored if ‘Period’ is given.
* Also, this criterion is ignored if ‘ToDate’ is not provided.
*/
fromDate?: string | null;
/**
* Invoice date searched until this date.
* Optional.
* This input is a search criterion, if given.
* Date format: yyyyMMdd
* Example: 20170830
* Note: This criterion is ignored if ‘Period’ is given.
* Also, this criterion is ignored if ‘FromDate’ is not provided.
*/
toDate?: string | null;
/**
* Date of invoicing.
* Optional.
* This input is a search criterion, if given.
* Date format: yyyyMMdd
* Example: 20170830
*/
invoiceDate?: string | null;
/**
* Summary document id
* Optional.
* This input is a search criterion, if given.
* Example: 1
*/
summaryDocumentId?: number | null;
/**
* Summary document number
* Optional.
* This input is a search criterion, if given.
* Example: ‘0/CZ0000000123456/2017’
*/
summaryDocumentNumber?: string | null;
/**
* Statement of Account Id of the payment customer.
* Optional.
* This input is a search criterion, if given.
* Example: 1
*/
statementOfAccountId?: string | null;
/**
* Statement of Account reference number of the payment customer.
* Optional.
* This input is a search criterion, if given.
* Example: 123
*/
soAReferenceNumber?: string | null;
/**
* Invoice date search period. Valid values –
* 1. Last 7 days – Issued in last 7 days.
* 2. Last 30 days – Issued in last 30 days.
* 3. Last 90 days – Issued in last 90 days.
* Optional.
* This input is a search criterion, if given.
* Example: 1
*/
period?: number | null;
/**
* Status of the invoice. Valid values –
* • Due – Invoices due for payment and is within the due date.
* • Paid – Fully paid Invoices.
* • Overdue – Invoices due of payment and has crossed the due date.
* • CreditNote – Credit notes
* • CreditStatement
* Optional.
* This input is a search criterion, if given.
*/
invoiceStatus?: string | null;
/**
* ISO code of the country i.e., UK, DE, MY, etc.
* Optional
*/
invoicedOnBehalfOf?: string | null;
/**
* Whether to include the additional invoice details in the API response.
* Optional. Default value “False”.
* The parameters that are populated
* • DocumentReference
* • AdditionalDocuments
* The above fields will not be present in the response when the respective data is not available in the source system.
*/
includeEInvoiceDetails?: boolean | null;
/**
* Collecting Company Code of the selected payer.
* Mandatory - It is mandatory field to external source ATOS for E-invoicing.
* Example:
* 86-Philippines
* 5-UK
*/
colCoCode?: number | null;
accounts?: Accounts[];
/**
* Invoice type. Allowed values –
* • Original – Original document.
* • Reversal – Reversed document.
* • Replacement – Replaced document.
* Optional. (When not passed all invoice, types are considered for search)
* This input is a search criterion, if given.
* Example: Original
*/
type?: string;
}
export const invoiceSearchRequestFiltersSchema: Schema<InvoiceSearchRequestFilters> = object(
{
colCoId: ['ColCoId', optional(nullable(number()))],
payerId: ['PayerId', optional(nullable(number()))],
payerNumber: ['PayerNumber', optional(nullable(string()))],
invoiceId: ['InvoiceId', optional(nullable(number()))],
invoiceNumber: ['InvoiceNumber', optional(nullable(string()))],
fromDate: ['FromDate', optional(nullable(string()))],
toDate: ['ToDate', optional(nullable(string()))],
invoiceDate: ['InvoiceDate', optional(nullable(string()))],
summaryDocumentId: ['SummaryDocumentId', optional(nullable(number()))],
summaryDocumentNumber: [
'SummaryDocumentNumber',
optional(nullable(string())),
],
statementOfAccountId: [
'StatementOfAccountId',
optional(nullable(string())),
],
soAReferenceNumber: ['SoAReferenceNumber', optional(nullable(string()))],
period: ['Period', optional(nullable(number()))],
invoiceStatus: ['InvoiceStatus', optional(nullable(string()))],
invoicedOnBehalfOf: ['InvoicedOnBehalfOf', optional(nullable(string()))],
includeEInvoiceDetails: [
'IncludeEInvoiceDetails',
optional(nullable(boolean())),
],
colCoCode: ['ColCoCode', optional(nullable(number()))],
accounts: ['Accounts', optional(array(lazy(() => accountsSchema)))],
type: ['Type', optional(string())],
}
);