b2BUnitsPost
Add new entity to B2BUnits
Create or Update a B2BUnit representing a hierarchy associated with a business unit
/B2BUnits
Usage and SDK Samples
curl -X POST\
-H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://localhost:9002/odata2webservices/InboundB2BUnit/B2BUnits"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.B2BUnitsApi;
import java.io.File;
import java.util.*;
public class B2BUnitsApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuthentication
HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("basicAuthentication");
basicAuthentication.setUsername("YOUR USERNAME");
basicAuthentication.setPassword("YOUR PASSWORD");
B2BUnitsApi apiInstance = new B2BUnitsApi();
B2BUnits_body body = ; // B2BUnits_body |
String accept = accept_example; // String | Accept header specifying the Media Type the API should respond with.
String contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in.
try {
Wrapper result = apiInstance.b2BUnitsPost(body, accept, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling B2BUnitsApi#b2BUnitsPost");
e.printStackTrace();
}
}
}
import io.swagger.client.api.B2BUnitsApi;
public class B2BUnitsApiExample {
public static void main(String[] args) {
B2BUnitsApi apiInstance = new B2BUnitsApi();
B2BUnits_body body = ; // B2BUnits_body |
String accept = accept_example; // String | Accept header specifying the Media Type the API should respond with.
String contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in.
try {
Wrapper result = apiInstance.b2BUnitsPost(body, accept, contentType);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling B2BUnitsApi#b2BUnitsPost");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuthentication)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
B2BUnits_body *body = ; //
String *accept = accept_example; // Accept header specifying the Media Type the API should respond with. (optional)
String *contentType = contentType_example; // Content-Type header specifying the Media Type the request body is formatted in. (optional)
B2BUnitsApi *apiInstance = [[B2BUnitsApi alloc] init];
// Add new entity to B2BUnits
[apiInstance b2BUnitsPostWith:body
accept:accept
contentType:contentType
completionHandler: ^(Wrapper output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var InboundB2BUnit = require('inbound_b2_b_unit');
var defaultClient = InboundB2BUnit.ApiClient.instance;
// Configure HTTP basic authorization: basicAuthentication
var basicAuthentication = defaultClient.authentications['basicAuthentication'];
basicAuthentication.username = 'YOUR USERNAME'
basicAuthentication.password = 'YOUR PASSWORD'
var api = new InboundB2BUnit.B2BUnitsApi()
var body = ; // {{B2BUnits_body}}
var opts = {
'accept': accept_example // {{String}} Accept header specifying the Media Type the API should respond with.
'contentType': contentType_example // {{String}} Content-Type header specifying the Media Type the request body is formatted in.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.b2BUnitsPost(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class b2BUnitsPostExample
{
public void main()
{
// Configure HTTP basic authorization: basicAuthentication
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
var apiInstance = new B2BUnitsApi();
var body = new B2BUnits_body(); // B2BUnits_body |
var accept = accept_example; // String | Accept header specifying the Media Type the API should respond with. (optional)
var contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in. (optional)
try
{
// Add new entity to B2BUnits
Wrapper result = apiInstance.b2BUnitsPost(body, accept, contentType);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling B2BUnitsApi.b2BUnitsPost: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuthentication
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
$api_instance = new Swagger\Client\ApiB2BUnitsApi();
$body = ; // B2BUnits_body |
$accept = accept_example; // String | Accept header specifying the Media Type the API should respond with.
$contentType = contentType_example; // String | Content-Type header specifying the Media Type the request body is formatted in.
try {
$result = $api_instance->b2BUnitsPost($body, $accept, $contentType);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling B2BUnitsApi->b2BUnitsPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::B2BUnitsApi;
# Configure HTTP basic authorization: basicAuthentication
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
my $api_instance = WWW::SwaggerClient::B2BUnitsApi->new();
my $body = WWW::SwaggerClient::Object::B2BUnits_body->new(); # B2BUnits_body |
my $accept = accept_example; # String | Accept header specifying the Media Type the API should respond with.
my $contentType = contentType_example; # String | Content-Type header specifying the Media Type the request body is formatted in.
eval {
my $result = $api_instance->b2BUnitsPost(body => $body, accept => $accept, contentType => $contentType);
print Dumper($result);
};
if ($@) {
warn "Exception when calling B2BUnitsApi->b2BUnitsPost: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuthentication
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = swagger_client.B2BUnitsApi()
body = # B2BUnits_body |
accept = accept_example # String | Accept header specifying the Media Type the API should respond with. (optional)
contentType = contentType_example # String | Content-Type header specifying the Media Type the request body is formatted in. (optional)
try:
# Add new entity to B2BUnits
api_response = api_instance.b2_b_units_post(body, accept=accept, contentType=contentType)
pprint(api_response)
except ApiException as e:
print("Exception when calling B2BUnitsApi->b2BUnitsPost: %s\n" % e)
Parameters
Header parameters
| Name | Description |
|---|---|
| Accept |
String
Accept header specifying the Media Type the API should respond with.
|
| Content-Type |
String
Content-Type header specifying the Media Type the request body is formatted in.
|
Body parameters
| Name | Description |
|---|---|
| body * |