@acceleratxr/core_sdk / ProductService
Class: ProductService#
Hierarchy#
-
↳ ProductService
Index#
Constructors#
Properties#
Methods#
Constructors#
constructor#
+ new ProductService(apiClient: ApiClient, config: Configuration): ProductService
Overrides ServiceBase.constructor
Defined in src/services/ProductService.ts:10
Parameters:#
Name |
Type |
|---|---|
|
|
|
Returns: ProductService
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 = “8f90109c-a339-4ea4-b45f-1ec0ac58d0c8”
Defined in src/services/ProductService.ts:16
Methods#
count#
▸ count(query?: any): Promise<number>
Defined in src/services/ProductService.ts:57
Returns the count of products
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Promise<number>
create#
▸ create(obj: Product): Promise<Product | undefined>
Defined in src/services/ProductService.ts:33
Create a new product
Parameters:#
Name |
Type |
|---|---|
|
Returns: Promise<Product | undefined>
delete#
▸ delete(id: string): Promise<void>
Defined in src/services/ProductService.ts:102
Deletes the product
Parameters:#
Name |
Type |
|---|---|
|
string |
Returns: Promise<void>
findAll#
▸ findAll(query?: any): Promise<Product[] | undefined>
Defined in src/services/ProductService.ts:21
Returns all products from the system that the user has access to
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Promise<Product[] | undefined>
findById#
▸ findById(id: string): Promise<Product | undefined>
Defined in src/services/ProductService.ts:76
Returns a single product from the system that the user has access to
Parameters:#
Name |
Type |
|---|---|
|
string |
Returns: Promise<Product | undefined>
truncate#
▸ truncate(query?: any): Promise<void>
Defined in src/services/ProductService.ts:45
Deletes all products from the service.
Parameters:#
Name |
Type |
|---|---|
|
any |
Returns: Promise<void>
update#
▸ update(id: string, obj: Product): Promise<Product | undefined>
Defined in src/services/ProductService.ts:89
Updates a single product
Parameters:#
Name |
Type |
|---|---|
|
string |
|
Returns: Promise<Product | undefined>