@acceleratxr/core_sdk / PurchaseService
Class: PurchaseService#
Hierarchy#
-
↳ PurchaseService
Index#
Constructors#
Properties#
Methods#
Constructors#
constructor#
+ new PurchaseService(apiClient: ApiClient, config: Configuration): PurchaseService
Overrides ServiceBase.constructor
Defined in src/services/PurchaseService.ts:10
Parameters:#
Name |
Type |
|---|---|
|
|
|
Returns: PurchaseService
Properties#
apiClient#
• Protected apiClient: ApiClient
Inherited from ServiceBase.apiClient
Defined in src/ServiceBase.ts:14
The API Client used when making requests to the API backend server.
config#
• Protected config: Configuration
Inherited from ServiceBase.config
Defined in src/ServiceBase.ts:19
The SDK configuration to use.
uuid#
▪ Static uuid: string = “f51c8955-6185-4e6e-964e-8087f067651c”
Defined in src/services/PurchaseService.ts:16
Methods#
count#
▸ count(query?: any): Promise<number>
Defined in src/services/PurchaseService.ts:57
Returns the count of purchases
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Promise<number>
create#
▸ create(obj: Purchase): Promise<Purchase | undefined>
Defined in src/services/PurchaseService.ts:33
Create a new purchase
Parameters:#
Name |
Type |
|---|---|
|
Returns: Promise<Purchase | undefined>
delete#
▸ delete(id: string): Promise<void>
Defined in src/services/PurchaseService.ts:102
Deletes the purchase
Parameters:#
Name |
Type |
|---|---|
|
string |
Returns: Promise<void>
findAll#
▸ findAll(query?: any): Promise<Purchase[] | undefined>
Defined in src/services/PurchaseService.ts:21
Returns all purchases from the system that the user has access to
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Promise<Purchase[] | undefined>
findById#
▸ findById(id: string): Promise<Purchase | undefined>
Defined in src/services/PurchaseService.ts:76
Returns a single purchase from the system that the user has access to
Parameters:#
Name |
Type |
|---|---|
|
string |
Returns: Promise<Purchase | undefined>
truncate#
▸ truncate(query?: any): Promise<void>
Defined in src/services/PurchaseService.ts:45
Deletes all purchases from the service.
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Promise<void>
update#
▸ update(id: string, obj: Purchase): Promise<Purchase | undefined>
Defined in src/services/PurchaseService.ts:89
Updates a single purchase
Parameters:#
Name |
Type |
|---|---|
|
string |
|
Returns: Promise<Purchase | undefined>