first
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { SapB1Client, SapB1ClientOptions } from "./client/SapB1Client";
|
||||
import { SapB1Config } from "./config";
|
||||
import { BusinessPartnersResource } from "./resources/BusinessPartners";
|
||||
import { DeliveryNotesResource, InvoicesResource, OrdersResource, PurchaseOrdersResource } from "./resources/Documents";
|
||||
import { ItemsResource } from "./resources/Items";
|
||||
import { StockTransfersResource } from "./resources/StockTransfers";
|
||||
|
||||
export class SapBusinessOneServiceLayer {
|
||||
public readonly client: SapB1Client;
|
||||
public readonly businessPartners: BusinessPartnersResource;
|
||||
public readonly items: ItemsResource;
|
||||
public readonly orders: OrdersResource;
|
||||
public readonly invoices: InvoicesResource;
|
||||
public readonly purchaseOrders: PurchaseOrdersResource;
|
||||
public readonly deliveryNotes: DeliveryNotesResource;
|
||||
public readonly stockTransfers: StockTransfersResource;
|
||||
|
||||
public constructor(config: SapB1Config, options: SapB1ClientOptions = {}) {
|
||||
this.client = new SapB1Client(config, options);
|
||||
this.businessPartners = new BusinessPartnersResource(this.client);
|
||||
this.items = new ItemsResource(this.client);
|
||||
this.orders = new OrdersResource(this.client);
|
||||
this.invoices = new InvoicesResource(this.client);
|
||||
this.purchaseOrders = new PurchaseOrdersResource(this.client);
|
||||
this.deliveryNotes = new DeliveryNotesResource(this.client);
|
||||
this.stockTransfers = new StockTransfersResource(this.client);
|
||||
}
|
||||
|
||||
public login(): Promise<unknown> {
|
||||
return this.client.login();
|
||||
}
|
||||
|
||||
public logout(): Promise<void> {
|
||||
return this.client.logout();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user