### Clone and Setup Repository
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/typescript/README.md
Initial steps to clone the repository and install necessary development dependencies.
```bash
git clone https://github.com/Microsoft/TypeScript.git
```
```bash
cd TypeScript
```
```bash
npm install -g gulp
npm install
```
--------------------------------
### Install Go Dependencies
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-golang-client/README.md
Install the required Go dependencies using 'go get'. These are necessary for the API client to function correctly.
```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional
```
--------------------------------
### Installation
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/babel-types/README.md
Instructions on how to install the babel-types module.
```APIDOC
## Install
```sh
npm install --save-dev babel-types
```
```
--------------------------------
### Install to-fast-properties
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/to-fast-properties/readme.md
Install the package using npm.
```bash
$ npm install --save to-fast-properties
```
--------------------------------
### Java Example: Authenticate and Get Token
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-java-client/README.md
This Java code demonstrates how to set up the API client, authenticate using the `AuthenticationApi`, and retrieve a token. Ensure you have the necessary imports and set the correct base path for the API.
```java
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.AuthenticationApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://openapi.flowaccount.com/v1");
AuthenticationApi apiInstance = new AuthenticationApi(defaultClient);
String contentType = "\"application/x-www-form-urlencoded\""; // String |
String grantType = "grantType_example"; // String |
String scope = "scope_example"; // String |
String clientId = "clientId_example"; // String |
String clientSecret = "clientSecret_example"; // String |
String guid = "guid_example"; // String |
try {
AuthenResponse result = apiInstance.tokenPost(contentType, grantType, scope, clientId, clientSecret, guid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthenticationApi#tokenPost");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
--------------------------------
### Install core-js
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Install core-js using npm or bower.
```bash
npm i core-js
bower install core.js
```
--------------------------------
### Install os-homedir
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/os-homedir/readme.md
Install the package via npm.
```bash
$ npm install --save os-homedir
```
--------------------------------
### Install AsyncKit
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/asynckit/README.md
Use npm to install the library as a dependency.
```shell
$ npm install --save asynckit
```
--------------------------------
### Install via Setuptools
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-python-client/README.md
Install the package using the setup.py script.
```sh
python setup.py install --user
```
```sh
sudo python setup.py install
```
--------------------------------
### Install home-or-tmp
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/home-or-tmp/readme.md
Install the home-or-tmp package using npm.
```bash
$ npm install --save home-or-tmp
```
--------------------------------
### Installation
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/convert-source-map/node_modules/safe-buffer/README.md
Install the safe-buffer package using npm.
```APIDOC
## Installation
```bash
npm install safe-buffer
```
```
--------------------------------
### Install babel-template
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/babel-template/README.md
Install the package as a development dependency.
```sh
npm install --save-dev babel-template
```
--------------------------------
### Install assert-plus
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/assert-plus/README.md
Command to install the package via npm.
```bash
npm install assert-plus
```
--------------------------------
### Install os-tmpdir
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/os-tmpdir/readme.md
Install the os-tmpdir package using npm.
```bash
$ npm install --save os-tmpdir
```
--------------------------------
### Install babel-register
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/babel-register/README.md
Install the package as a development dependency.
```sh
npm install babel-register --save-dev
```
--------------------------------
### Install supports-color
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/supports-color/readme.md
Install the supports-color package using npm.
```bash
npm install --save supports-color
```
--------------------------------
### Install Punycode.js
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/punycode/README.md
Use npm to install the library as a dependency.
```bash
npm install punycode --save
```
--------------------------------
### Install dashdash
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/dashdash/README.md
Use npm to install the library in your project.
```bash
npm install dashdash
```
--------------------------------
### Installation
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/concat-map/README.markdown
Instructions on how to install the concat-map module using npm.
```APIDOC
## Installation
With [npm](http://npmjs.org) do:
```bash
npm install concat-map
```
```
--------------------------------
### Install repeating package
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/repeating/readme.md
Use npm to install the package as a dependency.
```bash
$ npm install --save repeating
```
--------------------------------
### Install URI-JS via NPM
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/uri-js/README.md
Install the package using the command line.
```bash
npm install uri-js
```
--------------------------------
### Install mime-db
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/mime-db/README.md
Install the mime-db package using npm. This command is used for project setup.
```bash
npm install mime-db
```
--------------------------------
### Set Usage Examples
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Demonstrates Set initialization, mutation, and iteration.
```js
var set = new Set(['a', 'b', 'a', 'c']);
set.add('d').add('b').add('e');
console.log(set.size); // => 5
console.log(set.has('b')); // => true
set.forEach(function(it){
console.log(it); // => 'a', 'b', 'c', 'd', 'e'
});
set.delete('b');
console.log(set.size); // => 4
console.log(set.has('b')); // => false
console.log(Array.from(set)); // => ['a', 'c', 'd', 'e']
var set = new Set([1, 2, 3, 2, 1]);
for(var val of set)console.log(val); // => 1, 2, 3
for(var val of set.values())console.log(val); // => 1, 2, 3
for(var key of set.keys())console.log(key); // => 1, 2, 3
for(var [key, val] of set.entries()){
console.log(key); // => 1, 2, 3
console.log(val); // => 1, 2, 3
}
```
--------------------------------
### UNIX Domain Socket Request Example
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/request/README.md
An example of how to make a GET request to a specific path on a UNIX domain socket. The socket path must be absolute.
```javascript
request.get('http://unix:/absolute/path/to/unix.socket:/request/path')
```
--------------------------------
### Install via Git
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-javascript-client/README.md
Install the SDK directly from a Git repository. Replace 'GIT_USER_ID/GIT_REPO_ID' with the actual repository details.
```shell
npm install GIT_USER_ID/GIT_REPO_ID --save
```
--------------------------------
### Get High-Resolution Time in Node.js
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/performance-now/README.md
Use this snippet to get the current high-resolution time relative to the Node.js process start. The time is returned in milliseconds with sub-millisecond precision. Be mindful of the function's overhead when calculating small time intervals.
```javascript
var now = require("performance-now")
var start = now()
var end = now()
console.log(start.toFixed(3)) // the number of milliseconds the current node process is running
console.log((start-end).toFixed(3)) // ~ 0.002 on my system
```
--------------------------------
### Map Usage Examples
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Demonstrates Map initialization, mutation, and iteration.
```js
var a = [1];
var map = new Map([['a', 1], [42, 2]]);
map.set(a, 3).set(true, 4);
console.log(map.size); // => 4
console.log(map.has(a)); // => true
console.log(map.has([1])); // => false
console.log(map.get(a)); // => 3
map.forEach(function(val, key){
console.log(val); // => 1, 2, 3, 4
console.log(key); // => 'a', 42, [1], true
});
map.delete(a);
console.log(map.size); // => 3
console.log(map.get(a)); // => undefined
console.log(Array.from(map)); // => [['a', 1], [42, 2], [true, 4]]
var map = new Map([['a', 1], ['b', 2], ['c', 3]]);
for(var [key, val] of map){
console.log(key); // => 'a', 'b', 'c'
console.log(val); // => 1, 2, 3
}
for(var val of map.values())console.log(val); // => 1, 2, 3
for(var key of map.keys())console.log(key); // => 'a', 'b', 'c'
for(var [key, val] of map.entries()){
console.log(key); // => 'a', 'b', 'c'
console.log(val); // => 1, 2, 3
}
```
--------------------------------
### Get a debug message
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/babel-messages/README.md
Import and use the messages.get() function to retrieve a specific debug message by its key. Ensure the package is installed.
```js
import * as messages from 'babel-messages';
messages.get('tailCallReassignmentDeopt');
// > "Function reference has been..."
```
--------------------------------
### Generate Access Token in Python
Source: https://context7.com/flowaccount/flowaccount-openapi-sdk/llms.txt
Python example for generating an access token. This snippet requires the SDK to be installed and configured with your credentials.
```python
# Python Example - Generate Access Token
import openapi_client
from openapi_client.rest import ApiException
configuration = openapi_client.Configuration(
host="https://openapi.flowaccount.com/v1"
)
with openapi_client.ApiClient(configuration) as api_client:
api_instance = openapi_client.AuthenticationApi(api_client)
try:
response = api_instance.token_post(
content_type="application/x-www-form-urlencoded",
grant_type="client_credentials",
scope="openid",
client_id="your_client_id",
client_secret="your_client_secret",
guid="your_company_guid"
)
print(f"Access Token: {response.access_token}")
except ApiException as e:
print(f"Error: {e}")
```
--------------------------------
### Buffer Initialization Examples
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/convert-source-map/node_modules/safe-buffer/README.md
Demonstrates various ways to initialize Node.js Buffers, including creating uninitialized, zero-filled, and converting from different types.
```javascript
new Buffer('hey', 'utf8')
new Buffer([1, 2, 3], 'utf8')
new Buffer(obj)
new Buffer(16) // create an uninitialized buffer (potentially unsafe)
```
```javascript
Buffer.from('hey', 'utf8') // convert from many types to a Buffer
Buffer.alloc(16) // create a zero-filled buffer (safe)
Buffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)
```
--------------------------------
### Authentication API: Get Token
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-javascript-client/README.md
Example of how to obtain an access token using the Authentication API. Ensure you have the correct content type and authentication parameters.
```javascript
var FlowAccountOpenApi = require('flow_account_open_api');
var api = new FlowAccountOpenApi.AuthenticationApi()
var contentType = "'application/x-www-form-urlencoded'"; // {String}
var opts = {
'grantType': "grantType_example", // {String}
'scope': "scope_example", // {String}
'clientId': "clientId_example", // {String}
'clientSecret': "clientSecret_example", // {String}
'guid': "guid_example" // {String}
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.tokenPost(contentType, opts, callback);
```
--------------------------------
### Get Business Information using PHP SDK
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-php-client/docs/Api/BusinessInfomationApi.md
Use this method to retrieve business information. Ensure you have the SDK installed and include the autoloader. Replace 'Bearer accessToken' with your actual access token.
```php
companyInfoGet($authorization);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling BusinessInfomationApi->companyInfoGet: ', $e->getMessage(), PHP_EOL;
}
?>
```
--------------------------------
### Initialize and Set Header with Caseless
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/caseless/README.md
Demonstrates how to initialize the caseless object and set a header. Use this for initial header setup.
```javascript
var headers = {}
, c = caseless(headers)
;
c.set('a-Header', 'asdf')
c.get('a-header') === 'asdf'
```
--------------------------------
### Get Cash Invoices with Pagination and Filtering (PHP)
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-php-client/docs/Api/CashInvoiceApi.md
Use this snippet to retrieve a list of cash invoices. It demonstrates how to set up the API client and pass parameters for pagination, sorting, and filtering. Ensure the SDK is installed via Composer and the autoloader is included.
```php
Example Pattern: /cash-invoices?currentPage=1 /cash-invoices?currentPage=1&pageSize=20
$page_size = 56; // int | Query document cash invoices list amount per page.
Example Pattern: /cash-invoices?pageSize=20
$authorization = 'Bearer accessToken'; // string |
$sort_by = 'sort_by_example'; // string | Query document cash invoices list amount per page.
Example Pattern: /cash-invoices?sortBy=[{'name':'publishedOn','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}] /cash-invoices?sortBy=[{'name':'Contact.NameLocal','sortOrder':'desc'},{'name':'documentSerial','sortOrder':'desc'}]/cash-invoices?sortBy=[{'name':'Value','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]/cash-invoices?sortBy=[{'name':'Status','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]
$filter = 'filter_example'; // string | Query filter cash-invoices.
Example Pattern: /cash-invoices?filter=[{'columnName':'Contact.NameLocal','columnValue':'Contact Name','columnPredicateOperator':'And'}]
try {
$result = $apiInstance->cashInvoicesGet($current_page, $page_size, $authorization, $sort_by, $filter);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CashInvoiceApi->cashInvoicesGet: ', $e->getMessage(), PHP_EOL;
}
?>
```
--------------------------------
### Install via npm
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-javascript-client/README.md
Install the FlowAccount Open API SDK using npm. This command installs the package and saves it as a dependency.
```shell
npm install flow_account_open_api --save
```
--------------------------------
### Caseless Initialization and Basic Usage
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/caseless/README.md
Demonstrates how to initialize the Caseless object and perform basic set and get operations.
```APIDOC
## Initialization and Basic Usage
### Description
Initialize Caseless with an object and use its methods to set and get properties in a case-insensitive manner while preserving the original casing.
### Method
`caseless(object)`
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
```javascript
var headers = {}
, c = caseless(headers)
;
c.set('a-Header', 'asdf')
console.log(c.get('a-header')) // Output: asdf
```
### Response
#### Success Response (200)
None (modifies the original object)
#### Response Example
None
```
--------------------------------
### Install sshpk
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/sshpk/README.md
Install the package via npm.
```bash
npm install sshpk
```
--------------------------------
### Object Define and Make Examples
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Examples for using Object.define for property descriptors and Object.make for object creation and inheritance.
```js
// Before:
Object.defineProperty(target, 'c', {
enumerable: true,
configurable: true,
get: function(){
return this.a + this.b;
}
});
// After:
Object.define(target, {
get c(){
return this.a + this.b;
}
});
// Shallow object cloning with prototype and descriptors:
var copy = Object.make(Object.getPrototypeOf(src), src);
// Simple inheritance:
function Vector2D(x, y){
this.x = x;
this.y = y;
}
Object.define(Vector2D.prototype, {
get xy(){
return Math.hypot(this.x, this.y);
}
});
function Vector3D(x, y, z){
Vector2D.apply(this, arguments);
this.z = z;
}
Vector3D.prototype = Object.make(Vector2D.prototype, {
constructor: Vector3D,
get xyz(){
return Math.hypot(this.x, this.y, this.z);
}
});
var vector = new Vector3D(9, 12, 20);
console.log(vector.xy); // => 15
console.log(vector.xyz); // => 25
vector.y++;
console.log(vector.xy); // => 15.811388300841896
console.log(vector.xyz); // => 25.495097567963924
```
--------------------------------
### Install babel-types
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/babel-types/README.md
Install the package as a development dependency.
```sh
npm install --save-dev babel-types
```
--------------------------------
### Retrieve Product List with ProductsGet
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-csharp-client/docs/ProductsApi.md
Demonstrates how to fetch a paginated list of products using the ProductsGet method. Requires setting the BasePath and providing authentication credentials.
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;
namespace Example
{
public class ProductsGetExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
var apiInstance = new ProductsApi(Configuration.Default);
var currentPage = 56; // int | Query current page products item.
Example Pattern: /products?currentPage=1 /products?currentPage=1&pageSize=20
var pageSize = 56; // int | Query products list amount per page.
Example Pattern: /products?pageSize=20
var authorization = authorization_example; // string | (default to "Bearer accessToken")
var sortBy = sortBy_example; // string | Product Sort By Example Pattern: /products?sortBy=[{'name':'productCode','sortOrder':'asc'}] (optional)
var filter = filter_example; // string | Product Filter Example Pattern:
name = Product Name
productCode = Product Code / SKU
barcode = Product Barcode
categoryId = Product Category
/products?filter=[{'columnName':'categoryId','columnValue':'517727','columnPredicateOperator':'And'}] (optional)
try
{
// Get list all products.
ProductResponse result = apiInstance.ProductsGet(currentPage, pageSize, authorization, sortBy, filter);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProductsApi.ProductsGet: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
--------------------------------
### Manage Products via Python SDK
Source: https://context7.com/flowaccount/flowaccount-openapi-sdk/llms.txt
Create and list products using the Python OpenAPI client library.
```python
# Python Example - Products Management
import openapi_client
from openapi_client.api import products_api
from openapi_client.model.product_type import ProductType
with openapi_client.ApiClient(configuration) as api_client:
products = openapi_client.ProductsApi(api_client)
auth = "Bearer " + access_token
# Create product
new_product = ProductType(
type=1,
name="Widget Pro",
product_code="WDG-001",
sell_price=1500.00,
buy_price=1000.00,
unit="piece"
)
result = products.products_post(auth, new_product)
print(f"Created product: {result.data.id}")
# List products
products_list = products.products_get(
current_page=1,
page_size=20,
authorization=auth
)
for product in products_list.data:
print(f"{product.product_code}: {product.name}")
```
--------------------------------
### Install path-is-absolute
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/path-is-absolute/readme.md
Install the package via npm.
```bash
$ npm install --save path-is-absolute
```
--------------------------------
### Install Java Client with Maven
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-java-client/README.md
Use this command to install the API client library to your local Maven repository.
```shell
mvn clean install
```
--------------------------------
### Package JAR
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-android-client/README.md
Execute this command to generate the JAR file for manual installation.
```shell
mvn package
```
--------------------------------
### Build and Test Kotlin SDK
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-kotlin-client/README.md
Execute this command to run all tests and package the Kotlin client library.
```bash
./gradlew check assemble
```
--------------------------------
### Install has-ansi
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/has-ansi/readme.md
Install the package via npm.
```bash
$ npm install --save has-ansi
```
--------------------------------
### Install escape-string-regexp
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/escape-string-regexp/readme.md
Install the package using npm.
```bash
$ npm install --save escape-string-regexp
```
--------------------------------
### Create Product Example
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-csharp-client/docs/ProductsApi.md
This C# code demonstrates how to create a new product using the Flowaccount OpenAPI SDK. Provide a valid authorization token and a populated ProductType object. The API call is wrapped in a try-catch block for error handling.
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Flowaccount.OpenAPITools.Api;
using Flowaccount.OpenAPITools.Client;
using Flowaccount.OpenAPITools.Model;
namespace Example
{
public class ProductsPostExample
{
public static void Main()
{
Configuration.Default.BasePath = "https://openapi.flowaccount.com/v1";
var apiInstance = new ProductsApi(Configuration.Default);
var authorization = authorization_example; // string | (default to "Bearer accessToken")
var productType = new ProductType(); // ProductType |
try
{
// Create products.
ProductResponse result = apiInstance.ProductsPost(authorization, productType);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ProductsApi.ProductsPost: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
--------------------------------
### Retrieve Product List with Java
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-java-client/docs/ProductsApi.md
Demonstrates how to use the productsGet method to fetch a paginated list of products with optional sorting and filtering.
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.ProductsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://openapi.flowaccount.com/v1");
ProductsApi apiInstance = new ProductsApi(defaultClient);
Integer currentPage = 56; // Integer | Query current page products item.
Example Pattern: /products?currentPage=1 /products?currentPage=1&pageSize=20
Integer pageSize = 56; // Integer | Query products list amount per page.
Example Pattern: /products?pageSize=20
String authorization = "\"Bearer accessToken\""; // String |
String sortBy = "sortBy_example"; // String | Product Sort By Example Pattern: /products?sortBy=[{'name':'productCode','sortOrder':'asc'}]
String filter = "filter_example"; // String | Product Filter Example Pattern:
name = Product Name
productCode = Product Code / SKU
barcode = Product Barcode
categoryId = Product Category
/products?filter=[{'columnName':'categoryId','columnValue':'517727','columnPredicateOperator':'And'}]
try {
ProductResponse result = apiInstance.productsGet(currentPage, pageSize, authorization, sortBy, filter);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ProductsApi#productsGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
--------------------------------
### GET /purchases
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-golang-client/docs/ReceivingInventoryApi.md
Get all receiving inventory documents.
```APIDOC
## GET /purchases
### Description
Get all receiving inventory documents.
### Method
GET
### Endpoint
/purchases
### Parameters
#### Path Parameters
None
#### Query Parameters
- **currentPage** (int32) - Required - Query current page document purchases. Example Pattern: /purchases?currentPage=1 or /purchases?currentPage=1&pageSize=20
- **pageSize** (int32) - Required - Query document purchases list amount per page. Example Pattern: /purchases?pageSize=20
#### Request Body
None
### Request Example
None
### Response
#### Success Response (200)
- **AllDocumentResponse** (AllDocumentResponse) - Description of the AllDocumentResponse.
#### Response Example
```json
{
"example": "response body for AllDocumentResponse"
}
```
```
--------------------------------
### mkdirp.sync(dir, opts)
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/mkdirp/readme.markdown
Synchronously create a new directory and any necessary subdirectories.
```APIDOC
## mkdirp.sync(dir, opts)
### Description
Synchronously create a new directory and any necessary subdirectories at `dir` with octal permission string `opts.mode`.
### Parameters
#### Path Parameters
- **dir** (string) - Required - The path of the directory to create.
#### Request Body
- **opts** (object/number) - Optional - If an object, contains `mode` (octal permission string) and `fs` (alternate fs implementation). If a number, treated as `opts.mode`.
### Response
- **Returns** (string/null) - The first directory that had to be created, if any.
```
--------------------------------
### Basic Argument Parsing Example
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/minimist/readme.markdown
A simple example showing how to parse basic key-value pairs from command-line arguments.
```bash
$ node example/parse.js -a beep -b boop
{ _: [], a: 'beep', b: 'boop' }
```
--------------------------------
### GET /purchases-orders
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-android-client/docs/PurchaseOrderApi.md
Get all purchase order documents.
```APIDOC
## GET /purchases-orders
### Description
Get all purchase order documents.
### Method
GET
### Endpoint
/purchases-orders
### Parameters
#### Query Parameters
- **currentPage** (Integer) - Optional - Query current page document purchase orders.
Example Pattern: /purchases-orders?currentPage=1 /purchases-orders?currentPage=1&pageSize=20
- **pageSize** (Integer) - Optional - Query document purchase orders list amount per page.
Example Pattern: /purchases-orders?pageSize=20
- **authorization** (String) - Optional -
- **sortBy** (String) - Optional - Query document purchase orders list amount per page.
Example Pattern: /purchases-orders?sortBy=[{'name':'publishedOn','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}] /purchases-orders?sortBy=[{'name':'Contact.NameLocal','sortOrder':'desc'},{'name':'documentSerial','sortOrder':'desc'}]/purchases-orders?sortBy=[{'name':'Value','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]/purchases-orders?sortBy=[{'name':'Status','sortOrder':'asc'},{'name':'documentSerial','sortOrder':'desc'}]
- **filter** (String) - Optional - Query filter purchases-orders.
Example Pattern: /purchases-orders?filter=[{'columnName':'Contact.NameLocal','columnValue':'Contact Name','columnPredicateOperator':'And'}]
### Response
#### Success Response (200)
- **AllDocumentResponse** (AllDocumentResponse) - Description
#### Response Example
{
"example": "{ \"data\": [], \"total\": 0, \"message\": \"Success\", \"status\": 200 }"
}
```
--------------------------------
### Promise Static Methods Examples
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Illustrates the usage of Promise.resolve(), Promise.reject(), Promise.all(), and Promise.race() with practical examples.
```APIDOC
## Promise Static Methods
### Description
Examples demonstrating the use of static methods on the Promise object.
### Promise.resolve() and Promise.reject()
```javascript
Promise.resolve(42).then(x => console.log(x)); // => 42
Promise.reject(42).catch(x => console.log(x)); // => 42
Promise.resolve($.getJSON('/data.json')); // => ES6 promise
```
### Promise.all()
```javascript
Promise.all([
'foo',
sleepRandom(5),
sleepRandom(15),
sleepRandom(10)
]).then(x => console.log(x)); // => ['foo', 956, 85, 382] (after 15 sec.)
```
### Promise.race()
```javascript
function timeLimit(promise, time){
return Promise.race([
promise,
new Promise(function(resolve, reject){
setTimeout(reject, time * 1e3, Error('Await > ' + time + ' sec'));
})
]);
}
timeLimit(sleepRandom(5), 10).then(x => console.log(x)); // => 853, after 5 sec.
timeLimit(sleepRandom(15), 10).catch(x => console.log(x)); // Error: Await > 10 sec
```
```
--------------------------------
### Install tough-cookie
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/tough-cookie/README.md
Command to install the package via npm.
```bash
npm install tough-cookie
```
--------------------------------
### Install Local Maven Repository
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-android-client/README.md
Execute this command to install the API client library to your local Maven repository.
```shell
mvn install
```
--------------------------------
### Install UUID package
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/uuid/README.md
Install the library via npm.
```shell
npm install uuid
```
--------------------------------
### Initialize and use BigInteger
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/jsbn/README.md
Demonstrates importing the library and performing basic operations like calculating bit length.
```javascript
var BigInteger = require('jsbn');
var a = new BigInteger('91823918239182398123');
alert(a.bitLength()); // 67
```
--------------------------------
### Clone and Build JSON5 Repository
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/json5/README.md
Commands to set up the development environment and build the project.
```sh
git clone git://github.com/aseemk/json5.git
cd json5
npm install
npm test
```
--------------------------------
### Execute CLI with environment variables
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/dashdash/README.md
Examples of running the script with different environment variable settings.
```shell
$ FOO_VERBOSE=1 node foo.js
# opts: { verbose: [ true ],
_order: [ { name: 'verbose', value: true, from: 'env' } ],
_args: [] }
# args: []
```
```shell
$ FOO_VERBOSE= node examples/foo.js # not set
# opts: { _order: [], _args: [] }
# args: []
$ FOO_VERBOSE=0 node examples/foo.js # '0' is false
# opts: { verbose: [ false ],
_order: [ { key: 'verbose', value: false, from: 'env' } ],
_args: [] }
# args: []
$ FOO_VERBOSE=1 node examples/foo.js # true
# opts: { verbose: [ true ],
_order: [ { key: 'verbose', value: true, from: 'env' } ],
_args: [] }
# args: []
$ FOO_VERBOSE=boogabooga node examples/foo.js # true
```
--------------------------------
### Install safe-buffer
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/convert-source-map/node_modules/safe-buffer/README.md
Install the safe-buffer package using npm.
```bash
npm install safe-buffer
```
--------------------------------
### Authentication API Example
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-android-client/README.md
This Java code demonstrates how to use the AuthenticationApi to obtain an access token. Ensure you have the necessary dependencies and API keys configured.
```java
import org.openapitools.client.api.AuthenticationApi;
public class AuthenticationApiExample {
public static void main(String[] args) {
AuthenticationApi apiInstance = new AuthenticationApi();
String contentType = application/x-www-form-urlencoded; // String |
String grantType = null; // String |
String scope = null; // String |
String clientId = null; // String |
String clientSecret = null; // String |
String guid = null; // String |
try {
AuthenResponse result = apiInstance.tokenPost(contentType, grantType, scope, clientId, clientSecret, guid);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AuthenticationApi#tokenPost");
e.printStackTrace();
}
}
}
```
--------------------------------
### ES6 Object Method Examples
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Practical examples demonstrating the usage of Object.assign, Object.is, setPrototypeOf, Symbol.toStringTag, and Object.keys.
```js
var foo = {q: 1, w: 2}
, bar = {e: 3, r: 4}
, baz = {t: 5, y: 6};
Object.assign(foo, bar, baz); // => foo = {q: 1, w: 2, e: 3, r: 4, t: 5, y: 6}
Object.is(NaN, NaN); // => true
Object.is(0, -0); // => false
Object.is(42, 42); // => true
Object.is(42, '42'); // => false
function Parent(){}
function Child(){}
Object.setPrototypeOf(Child.prototype, Parent.prototype);
new Child instanceof Child; // => true
new Child instanceof Parent; // => true
var O = {};
O[Symbol.toStringTag] = 'Foo';
'' + O; // => '[object Foo]'
Object.keys('qwe'); // => ['0', '1', '2']
Object.getPrototypeOf('qwe') === String.prototype; // => true
```
--------------------------------
### Install json-schema-traverse
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/json-schema-traverse/README.md
Command to install the package via npm.
```bash
npm install json-schema-traverse
```
--------------------------------
### Installation command
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/fast-json-stable-stringify/README.md
Command to install the package via npm.
```bash
npm install fast-json-stable-stringify
```
--------------------------------
### Initialize Authentication API
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-ruby-client/README.md
Example of loading the gem and calling the token_post method to generate an access token.
```ruby
# Load the gem
require 'openapi_client'
api_instance = OpenapiClient::AuthenticationApi.new
content_type = 'application/x-www-form-urlencoded' # String |
opts = {
grant_type: 'grant_type_example', # String |
scope: 'scope_example', # String |
client_id: 'client_id_example', # String |
client_secret: 'client_secret_example', # String |
guid: 'guid_example' # String |
}
begin
#Generate Access Token
result = api_instance.token_post(content_type, opts)
p result
rescue OpenapiClient::ApiError => e
puts "Exception when calling AuthenticationApi->token_post: #{e}"
end
```
--------------------------------
### Install extsprintf
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/extsprintf/README.md
Use npm to install the extsprintf package. This is the first step before using the library in your Node.js project.
```bash
# npm install extsprintf
```
--------------------------------
### Async Functions Example
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/core-js/README.md
Using async/await syntax for cleaner asynchronous flow control.
```js
var delay = time => new Promise(resolve => setTimeout(resolve, time))
async function sleepRandom(time){
await delay(time * 1e3);
return 0 | Math.random() * 1e3;
};
async function sleepError(time, msg){
await delay(time * 1e3);
throw Error(msg);
};
(async () => {
try {
console.log('Run'); // => Run
console.log(await sleepRandom(5)); // => 936, after 5 sec.
var [a, b, c] = await Promise.all([
sleepRandom(5),
sleepRandom(15),
sleepRandom(10)
]);
console.log(a, b, c); // => 210 445 71, after 15 sec.
await sleepError(5, 'Irror!');
console.log('Will not be displayed');
} catch(e){
console.log(e); // => Error: 'Irror!', after 5 sec.
}
})();
```
--------------------------------
### Install node-extend
Source: https://github.com/flowaccount/flowaccount-openapi-sdk/blob/master/flowaccount-typescript-node-client/node_modules/extend/README.md
Use npm to install the package in your project.
```sh
npm install extend
```