workday.expense
Module workday.expense
API
Definitions
ballerinax/workday.expense Ballerina library
Overview
This is a generated connector for WorkDay Expense REST API v1 OpenAPI specification.
This API enables applications to access operations to extend the functionality of Workday Expenses.
Prerequisites
Before using this connector in your Ballerina application, complete the following:
- Create a workday application in the Credential Administrator console
- Obtain tokens by following this guide
Clients
workday.expense: Client
This is a generated connector for WorkDay Expense REST API v1 OpenAPI specification. This API enables applications to access operations to extend the functionality of Workday Expenses.
Constructor
Gets invoked to initialize the connector
.
The connector initialization requires setting the API credentials. Follow this guide and obtain tokens.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string - URL of the target service
getExpenseItemInstance
function getExpenseItemInstance(string id) returns ExpenseItemsServiceRepresentation|error
Retrieves a single instance of an expense item.
Parameters
- id string - The Workday ID of the resource.
Return Type
- ExpenseItemsServiceRepresentation|error - Successful response. A successful response can return no matched data.
getExpenseReportInstance
function getExpenseReportInstance(string id) returns ReportServiceRepresentation|error
Retrieves a single instance of an Expense Report.
Parameters
- id string - The Workday ID of the resource.
Return Type
- ReportServiceRepresentation|error - Successful response. A successful response can return no matched data.
getQuickExpenseInstance
function getQuickExpenseInstance(string id) returns ExpenseEntryServiceRepresentation|error
Retrieves a single instance of a Quick Expense.
Parameters
- id string - The Workday ID of the resource.
Return Type
- ExpenseEntryServiceRepresentation|error - Successful response. A successful response can return no matched data.
updateQuickExpenseInstance
function updateQuickExpenseInstance(string id, EntryServicePUTRepresentation payload) returns EntryServicePUTRepresentation|error
Updates an existing Quick Expense instance.
Return Type
- EntryServicePUTRepresentation|error - Successful response. A successful response can return no matched data. Updating file.
deleteQuickExpenseByID
Deletes a Quick Expense with the specified WID.
Secured by: Self-Service: Expense Report
Scope: Expenses
Parameters
- id string - The Workday ID of the resource.
Return Type
updateQuickExpenseByID
function updateQuickExpenseByID(string id, EntryServicePUTRepresentation payload) returns EntryServicePUTRepresentation|error
Partially updates an existing Quick Expense with the specified WID for the fields provided in the request body.
Secured by: Self-Service: Expense Report
Scope: Expenses
Contains attachment(s)
Return Type
- EntryServicePUTRepresentation|error - Successful response. A successful response can return no matched data. Updating file.
getCollectionOfExpenseReports
function getCollectionOfExpenseReports(string? expenseReportMemo, string[]? expenseReportStatus, string? fromDate, int? 'limit, int? offset, string? toDate) returns InlineResponse200|error
Retrieves a collection of expense reports.
Parameters
- expenseReportMemo string? (default ()) - Memo label to be used for REST API
- expenseReportStatus string[]? (default ()) - Status label to be used for REST API
- fromDate string? (default ()) - Creation Date label to be used for REST API
- 'limit int? (default ()) - The maximum number of objects in a single response. The default is 20. The maximum is 100.
- offset int? (default ()) - The zero-based index of the first object in a response collection. The default is 0. Use offset with the limit parameter to control paging of a response collection. Example: If limit is 5 and offset is 9, the response returns a collection of 5 objects starting with the 10th object.
- toDate string? (default ()) - Creation Date label to be used for REST API
Return Type
- InlineResponse200|error - Successful response. A successful response can return no matched data.
createExpenseReport
function createExpenseReport(ReportPostServiceRepresentation payload, string? expenseReportMemo, string[]? expenseReportStatus, string? fromDate, string? toDate) returns ReportPostServiceRepresentation|error
Creates an expense report.
Secured by: Self-Service: Expense Report
Scope: Expenses
Parameters
- payload ReportPostServiceRepresentation -
- expenseReportMemo string? (default ()) - Memo label to be used for REST API
- expenseReportStatus string[]? (default ()) - Status label to be used for REST API
- fromDate string? (default ()) - Creation Date label to be used for REST API
- toDate string? (default ()) - Creation Date label to be used for REST API
Return Type
- ReportPostServiceRepresentation|error - Resource created.
createCollectionExpenseReportLines
function createCollectionExpenseReportLines(string id, PostExpenseReportLineRepresentation payload) returns PostExpenseReportLineRepresentation|error
Creates a collection of expense report lines.
Return Type
- PostExpenseReportLineRepresentation|error - Resource created.
submitExpenseReportApproval
function submitExpenseReportApproval(string id, SubmitExpenseReportRepresentation payload) returns SubmitExpenseReportRepresentation|error
Submit the Expense Report for approval.
Secured by: Submit Expense Report (REST API)
Scope: Expenses
Return Type
- SubmitExpenseReportRepresentation|error - Resource created.
getCollectionOfQuickExpenses
function getCollectionOfQuickExpenses(string? entryType, string? expenseEntryStatus, string? fromDate, int? 'limit, int? offset, string? toDate) returns InlineResponse2001|error
Retrieves a collection of Quick Expenses.
Parameters
- entryType string? (default ()) - Identifies the class type of the expense instance.
- expenseEntryStatus string? (default ()) - Expense Status
- fromDate string? (default ()) - Date of Expense Entry
- 'limit int? (default ()) - The maximum number of objects in a single response. The default is 20. The maximum is 100.
- offset int? (default ()) - The zero-based index of the first object in a response collection. The default is 0. Use offset with the limit parameter to control paging of a response collection. Example: If limit is 5 and offset is 9, the response returns a collection of 5 objects starting with the 10th object.
- toDate string? (default ()) - Date of Expense Entry
Return Type
- InlineResponse2001|error - Successful response. A successful response can return no matched data.
createQuickExpenseInstance
function createQuickExpenseInstance(EntryServiceRepresentation payload, string? entryType, string? expenseEntryStatus, string? fromDate, string? toDate) returns EntryServiceRepresentation|error
Creates a Quick Expense instance. In the request body, you must specify the required TransactionDate field.
Secured by: Self-Service: Expense Report
Scope: Expenses
Contains attachment(s)
Parameters
- payload EntryServiceRepresentation -
- entryType string? (default ()) - Identifies the class type of the expense instance.
- expenseEntryStatus string? (default ()) - Expense Status
- fromDate string? (default ()) - Date of Expense Entry
- toDate string? (default ()) - Date of Expense Entry
Return Type
- EntryServiceRepresentation|error - Resource created.
createsNewAttachmentsForExpenseEntry
function createsNewAttachmentsForExpenseEntry(string id, ExpenseEntryImage payload) returns ExpenseEntryImage|error
Creates new attachments for the existing expense entry.
Return Type
- ExpenseEntryImage|error - Resource created.
getCollectionOfItems
function getCollectionOfItems(boolean? disallowFixedItems, int? 'limit, int? offset, string? searchString) returns InlineResponse2002|error
Retrieves a collection of expense items.
Parameters
- disallowFixedItems boolean? (default ()) - Is this expense item validated for a fixed amount?
- 'limit int? (default ()) - The maximum number of objects in a single response. The default is 20. The maximum is 100.
- offset int? (default ()) - The zero-based index of the first object in a response collection. The default is 0. Use offset with the limit parameter to control paging of a response collection. Example: If limit is 5 and offset is 9, the response returns a collection of 5 objects starting with the 10th object.
- searchString string? (default ()) - Request string used to retrieve the Expense Items
Return Type
- InlineResponse2002|error - Successful response. A successful response can return no matched data.
Records
workday.expense: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy ProxyConfig? - Proxy server related options
workday.expense: Company
Fields
- Fields Included from *InstanceModelReference
workday.expense: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings? - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings? - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig PoolConfiguration? - Configurations associated with request pooling
- cache CacheConfig? - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker CircuitBreakerConfig? - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig RetryConfig? - Configurations associated with retrying
- responseLimits ResponseLimitConfigs? - Configurations associated with inbound response size limits
- secureSocket ClientSecureSocket? - SSL/TLS-related options
- proxy ProxyConfig? - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
workday.expense: ContentType
Fields
- Fields Included from *InstanceModelReference
workday.expense: CreditCardTransaction
Fields
- Fields Included from *InstanceModelReference
workday.expense: EntryServicePUTRepresentation
Fields
- attachments ExpenseEntryImage[]? - CRF for Entries REST operation to expose Attachment related to Optical Character Recognition
- amount record {}? - Amount for Expense Entry
- merchant string? - Expense Merchant Name
- expenseItem ExpenseItem? -
- date string - Date of Expense Entry
- memo string? - Memo for the Entry
- image Image? -
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: EntryServiceRepresentation
Fields
- attachments ExpenseEntryImage[]? - CRF for Entries REST operation to expose Attachment related to Optical Character Recognition
- hasOCRReceipt boolean? - Boolean value indicating whether the Mobile Expense has an OCR image.
- amount record {}? - Amount for Expense Entry
- scanStatus ScanStatus? -
- memo string? - Memo for the Entry
- expenseItem ExpenseItem? -
- date string? - Date of Expense Entry
- merchant string? - Expense Merchant Name
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: EntryType
Fields
- Fields Included from *InstanceModelReference
workday.expense: ErrorModelReference
Fields
- 'error string - A description of the error
workday.expense: ExpenseEntryImage
Fields
- fileLength int? - File length of the attachment
- fileName string? - File name of the attachment
- contentType ContentType? -
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: ExpenseEntryServiceRepresentation
Fields
- expenseEntryStatus ExpenseEntryStatus? -
- amount record {}? - Amount for Expense Entry
- memo string? - Memo for the Entry
- entryType EntryType? -
- date string? - Date of Expense Entry
- scanStatus ScanStatus? -
- attachments ExpenseEntryImage[]? - CRF for Entries REST operation to expose Attachment related to Optical Character Recognition
- merchant string? - Expense Merchant Name
- expenseItem ExpenseItem? -
- hasOCRReceipt boolean? - Boolean value indicating whether the Mobile Expense has an OCR image.
- href string? - A link to the instance
- descriptor string? - A preview of the instance
- id string? - Id of the instance
workday.expense: ExpenseEntryStatus
Fields
- Fields Included from *InstanceModelReference
workday.expense: ExpenseItem
Fields
- Fields Included from *InstanceModelReference
workday.expense: ExpenseItemsServiceRepresentation
Fields
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: ExpenseReport
Fields
- Fields Included from *InstanceModelReference
workday.expense: ExpenseReportStatus
Fields
- Fields Included from *InstanceModelReference
workday.expense: FacetsModelReferenceInner
This object represents the possible facets for this resource
Fields
- descriptor string? - A description of the facet
- facetParameter string? - The alias used to select the facet
- values ItemValues[]? -
workday.expense: Image
Fields
- Fields Included from *InstanceModelReference
workday.expense: InlineResponse200
collection something or other
Fields
- data ReportServiceRepresentation[]? -
- total int? -
workday.expense: InlineResponse2001
collection something or other
Fields
- data ExpenseEntryServiceRepresentation[]? -
- total int? -
workday.expense: InlineResponse2002
collection something or other
Fields
- data ExpenseItemsServiceRepresentation[]? -
- total int? -
workday.expense: InstanceModelReference
Fields
- id string - wid / id / reference id
- descriptor string? - A description of the instance
- href string? - A link to the instance
workday.expense: ItemValues
Fields
- count int? - The number of instances returned by this facet
- id string - wid / id / reference id
- descriptor string? - A description of the facet
- href string? - A link to the instance
workday.expense: MultipleInstanceModelReference
Fields
- total int? -
- data InstanceModelReference[]? -
workday.expense: Payee
Fields
- Fields Included from *InstanceModelReference
workday.expense: PostExpenseReportLineRepresentation
Fields
- date string? - Date the Expense Report Line was created
- expenseItem ExpenseItem? -
- travelBookingRecord TravelBookingRecord? -
- memo string? - Memo for the Expense Report Line
- quickExpense QuickExpense? -
- creditCardTransaction CreditCardTransaction? -
- totalAmount record {}? - Total amount to be reimbursed to the requestee
- id string? - Id of the instance
- descriptor string? - A preview of the instance
workday.expense: ProxyConfig
Proxy server configurations to be used with the HTTP client endpoint.
Fields
- host string(default "") - Host name of the proxy server
- port int(default 0) - Proxy server port
- userName string(default "") - Proxy server username
- password string(default "") - Proxy server password
workday.expense: QuickExpense
Fields
- Fields Included from *InstanceModelReference
workday.expense: ReportPostServiceRepresentation
Fields
- payee Payee? -
- expenseReportMemo string? - Memo label to be used for REST API
- creationDate string? - Creation Date label to be used for REST API
- worktag WorkTag? -
- company Company? -
- descriptor string? - A preview of the instance
- id string? - Id of the instance
workday.expense: ReportServiceRepresentation
Fields
- totalAmount record {}? - Total Amount for the Expense Report
- expenseReportStatus ExpenseReportStatus? -
- creationDate string? - Creation Date label to be used for REST API
- expenseReportMemo string? - Memo label to be used for REST API
- descriptor string? - A preview of the instance
- href string? - A link to the instance
- id string? - Id of the instance
workday.expense: ScanStatus
Fields
- Fields Included from *InstanceModelReference
workday.expense: SubmitExpenseReportRepresentation
Fields
- expenseReport ExpenseReport? -
- id string? - Id of the instance
- descriptor string? - A preview of the instance
workday.expense: TravelBookingRecord
Fields
- Fields Included from *InstanceModelReference
workday.expense: ValidationErrorModelReference
Fields
- Fields Included from *ErrorModelReference
- error string
- anydata...
- errors ErrorModelReference[]? - An array of validation errors
workday.expense: WorkTag
Fields
- Fields Included from *WorkTagsRepresentation
workday.expense: WorkTagsRepresentation
Fields
- descriptor string? - A preview of the instance
- id string? - Id of the instance
Import
import ballerinax/workday.expense;
Metadata
Released date: over 1 year ago
Version: 1.5.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.4.1
GraalVM compatible: Yes
Pull count
Total: 1
Current verison: 1
Weekly downloads
Keywords
Finance/Accounting
Cost/Paid
Contributors