Skip to content

be-lenka/sap_billing-document-odv4

Repository files navigation

OpenAPIClient-php

Billing documents collectively refer to customer invoices, credit memos, debit memos, pro forma invoices, and the related cancellation documents. This service, which offers both synchronous and asynchronous processing, makes billing document data available through its header, item, and partner entities. You can extend it with custom fields via key user extensibility.

You can use this service to do the following:

  • Create billing documents with reference to billable SD documents in your system
  • Read most billing document fields at header and item level
  • Update specific billing document fields, including custom fields added through extensibility
  • Post billing documents to financial accounting to create the corresponding journal entries 

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure HTTP basic authorization: BasicAuth
$config = BeLenka\SAP\BillingDocumentODV4\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new BeLenka\SAP\BillingDocumentODV4\Api\BatchRequestsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->batchPost();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BatchRequestsApi->batchPost: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://:/sap/opu/odata4/sap/api_billingdocument/srvd_a2x/sap/billingdocument/0001

Class Method HTTP request Description
BatchRequestsApi batchPost POST /$batch Send a group of requests
HeaderApi billingDocumentBillingDocumentGet GET /BillingDocument/{BillingDocument} Get entity from BillingDocument by key
HeaderApi billingDocumentBillingDocumentItemGet GET /BillingDocument/{BillingDocument}/_Item Get entities from related _Item
HeaderApi billingDocumentBillingDocumentPartnerGet GET /BillingDocument/{BillingDocument}/_Partner Get entities from related _Partner
HeaderApi billingDocumentBillingDocumentPatch PATCH /BillingDocument/{BillingDocument} Update entity in BillingDocument
HeaderApi billingDocumentBillingDocumentSAPSelfPostToAccountingPost POST /BillingDocument/{BillingDocument}/SAP__self.PostToAccounting Invoke action PostToAccounting
HeaderApi billingDocumentGet GET /BillingDocument Get entities from BillingDocument
HeaderApi billingDocumentItemBillingDocumentBillingDocumentItemBillingDocumentGet GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_BillingDocument Get related _BillingDocument
HeaderApi billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionBillingDocumentGet GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_BillingDocument Get related _BillingDocument
HeaderApi billingDocumentPartnerBillingDocumentPartnerFunctionBillingDocumentGet GET /BillingDocumentPartner/{BillingDocument}/{PartnerFunction}/_BillingDocument Get related _BillingDocument
HeaderApi billingDocumentSAPSelfCreateFromSDDocumentPost POST /BillingDocument/SAP__self.CreateFromSDDocument Invoke action CreateFromSDDocument
HeaderPartnersApi billingDocumentBillingDocumentPartnerGet GET /BillingDocument/{BillingDocument}/_Partner Get entities from related _Partner
HeaderPartnersApi billingDocumentPartnerBillingDocumentPartnerFunctionBillingDocumentGet GET /BillingDocumentPartner/{BillingDocument}/{PartnerFunction}/_BillingDocument Get related _BillingDocument
HeaderPartnersApi billingDocumentPartnerBillingDocumentPartnerFunctionGet GET /BillingDocumentPartner/{BillingDocument}/{PartnerFunction} Get entity from BillingDocumentPartner by key
HeaderPartnersApi billingDocumentPartnerGet GET /BillingDocumentPartner Get entities from BillingDocumentPartner
ItemPartnersApi billingDocumentItemBillingDocumentBillingDocumentItemItemPartnerGet GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_ItemPartner Get entities from related _ItemPartner
ItemPartnersApi billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionBillingDocumentGet GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_BillingDocument Get related _BillingDocument
ItemPartnersApi billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionGet GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction} Get entity from BillingDocumentItemPartner by key
ItemPartnersApi billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionItemGet GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_Item Get related _Item
ItemPartnersApi billingDocumentItemPartnerGet GET /BillingDocumentItemPartner Get entities from BillingDocumentItemPartner
ItemsApi billingDocumentBillingDocumentItemGet GET /BillingDocument/{BillingDocument}/_Item Get entities from related _Item
ItemsApi billingDocumentItemBillingDocumentBillingDocumentItemBillingDocumentGet GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_BillingDocument Get related _BillingDocument
ItemsApi billingDocumentItemBillingDocumentBillingDocumentItemGet GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem} Get entity from BillingDocumentItem by key
ItemsApi billingDocumentItemBillingDocumentBillingDocumentItemItemPartnerGet GET /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem}/_ItemPartner Get entities from related _ItemPartner
ItemsApi billingDocumentItemBillingDocumentBillingDocumentItemPatch PATCH /BillingDocumentItem/{BillingDocument}/{BillingDocumentItem} Update entity in BillingDocumentItem
ItemsApi billingDocumentItemGet GET /BillingDocumentItem Get entities from BillingDocumentItem
ItemsApi billingDocumentItemPartnerBillingDocumentBillingDocumentItemPartnerFunctionItemGet GET /BillingDocumentItemPartner/{BillingDocument}/{BillingDocumentItem}/{PartnerFunction}/_Item Get related _Item

Models

Authorization

Authentication schemes defined for the API:

BasicAuth

  • Type: HTTP basic authentication

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published