Spring Modulith Order Platform API

Customers

createCustomer

Create a customer


/customers

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/customers" \
 -d '{
  "email" : "ada.lovelace@example.com",
  "fullName" : "Ada Lovelace"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomersApi;

import java.io.File;
import java.util.*;

public class CustomersApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CustomersApi apiInstance = new CustomersApi();
        CustomerCreateRequest customerCreateRequest = ; // CustomerCreateRequest | 

        try {
            CustomerResponse result = apiInstance.createCustomer(customerCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomersApi#createCustomer");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final CustomerCreateRequest customerCreateRequest = new CustomerCreateRequest(); // CustomerCreateRequest | 

try {
    final result = await api_instance.createCustomer(customerCreateRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createCustomer: $e\n');
}

import org.openapitools.client.api.CustomersApi;

public class CustomersApiExample {
    public static void main(String[] args) {
        CustomersApi apiInstance = new CustomersApi();
        CustomerCreateRequest customerCreateRequest = ; // CustomerCreateRequest | 

        try {
            CustomerResponse result = apiInstance.createCustomer(customerCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomersApi#createCustomer");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomersApi *apiInstance = [[CustomersApi alloc] init];
CustomerCreateRequest *customerCreateRequest = ; // 

// Create a customer
[apiInstance createCustomerWith:customerCreateRequest
              completionHandler: ^(CustomerResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.CustomersApi()
var customerCreateRequest = ; // {CustomerCreateRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createCustomer(customerCreateRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createCustomerExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CustomersApi();
            var customerCreateRequest = new CustomerCreateRequest(); // CustomerCreateRequest | 

            try {
                // Create a customer
                CustomerResponse result = apiInstance.createCustomer(customerCreateRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomersApi.createCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomersApi();
$customerCreateRequest = ; // CustomerCreateRequest | 

try {
    $result = $api_instance->createCustomer($customerCreateRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->createCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CustomersApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomersApi->new();
my $customerCreateRequest = WWW::OPenAPIClient::Object::CustomerCreateRequest->new(); # CustomerCreateRequest | 

eval {
    my $result = $api_instance->createCustomer(customerCreateRequest => $customerCreateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomersApi->createCustomer: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CustomersApi()
customerCreateRequest =  # CustomerCreateRequest | 

try:
    # Create a customer
    api_response = api_instance.create_customer(customerCreateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomersApi->createCustomer: %s\n" % e)
extern crate CustomersApi;

pub fn main() {
    let customerCreateRequest = ; // CustomerCreateRequest

    let mut context = CustomersApi::Context::default();
    let result = client.createCustomer(customerCreateRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
customerCreateRequest *

Responses


getCustomer

Get a customer by id


/customers/{customerId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8080/customers/{customerId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.CustomersApi;

import java.io.File;
import java.util.*;

public class CustomersApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        CustomersApi apiInstance = new CustomersApi();
        UUID customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

        try {
            CustomerResponse result = apiInstance.getCustomer(customerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomersApi#getCustomer");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID customerId = new UUID(); // UUID | 

try {
    final result = await api_instance.getCustomer(customerId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getCustomer: $e\n');
}

import org.openapitools.client.api.CustomersApi;

public class CustomersApiExample {
    public static void main(String[] args) {
        CustomersApi apiInstance = new CustomersApi();
        UUID customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

        try {
            CustomerResponse result = apiInstance.getCustomer(customerId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CustomersApi#getCustomer");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
CustomersApi *apiInstance = [[CustomersApi alloc] init];
UUID *customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; //  (default to null)

// Get a customer by id
[apiInstance getCustomerWith:customerId
              completionHandler: ^(CustomerResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.CustomersApi()
var customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCustomer(customerId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getCustomerExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new CustomersApi();
            var customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID |  (default to null)

            try {
                // Get a customer by id
                CustomerResponse result = apiInstance.getCustomer(customerId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling CustomersApi.getCustomer: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\CustomersApi();
$customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

try {
    $result = $api_instance->getCustomer($customerId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CustomersApi->getCustomer: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::CustomersApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::CustomersApi->new();
my $customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | 

eval {
    my $result = $api_instance->getCustomer(customerId => $customerId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CustomersApi->getCustomer: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.CustomersApi()
customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID |  (default to null)

try:
    # Get a customer by id
    api_response = api_instance.get_customer(customerId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CustomersApi->getCustomer: %s\n" % e)
extern crate CustomersApi;

pub fn main() {
    let customerId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = CustomersApi::Context::default();
    let result = client.getCustomer(customerId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
customerId*
UUID (uuid)
Required

Responses


Notifications

listNotifications

List generated notification records


/notifications

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "http://localhost:8080/notifications"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.NotificationsApi;

import java.io.File;
import java.util.*;

public class NotificationsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        NotificationsApi apiInstance = new NotificationsApi();

        try {
            array[NotificationResponse] result = apiInstance.listNotifications();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#listNotifications");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.listNotifications();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->listNotifications: $e\n');
}

import org.openapitools.client.api.NotificationsApi;

public class NotificationsApiExample {
    public static void main(String[] args) {
        NotificationsApi apiInstance = new NotificationsApi();

        try {
            array[NotificationResponse] result = apiInstance.listNotifications();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NotificationsApi#listNotifications");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
NotificationsApi *apiInstance = [[NotificationsApi alloc] init];

// List generated notification records
[apiInstance listNotificationsWithCompletionHandler: 
              ^(array[NotificationResponse] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.NotificationsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.listNotifications(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class listNotificationsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new NotificationsApi();

            try {
                // List generated notification records
                array[NotificationResponse] result = apiInstance.listNotifications();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling NotificationsApi.listNotifications: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\NotificationsApi();

try {
    $result = $api_instance->listNotifications();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NotificationsApi->listNotifications: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::NotificationsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::NotificationsApi->new();

eval {
    my $result = $api_instance->listNotifications();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NotificationsApi->listNotifications: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.NotificationsApi()

try:
    # List generated notification records
    api_response = api_instance.list_notifications()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NotificationsApi->listNotifications: %s\n" % e)
extern crate NotificationsApi;

pub fn main() {

    let mut context = NotificationsApi::Context::default();
    let result = client.listNotifications(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


Orders

createOrder

Create an order


/orders

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/orders" \
 -d '{
  "customerId" : "11111111-1111-4111-8111-111111111111",
  "items" : [ {
    "productCode" : "SKU-COFFEE-MUG",
    "quantity" : 2
  }, {
    "productCode" : "SKU-NOTEBOOK",
    "quantity" : 1
  } ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        OrdersApi apiInstance = new OrdersApi();
        OrderCreateRequest orderCreateRequest = ; // OrderCreateRequest | 

        try {
            OrderResponse result = apiInstance.createOrder(orderCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#createOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final OrderCreateRequest orderCreateRequest = new OrderCreateRequest(); // OrderCreateRequest | 

try {
    final result = await api_instance.createOrder(orderCreateRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->createOrder: $e\n');
}

import org.openapitools.client.api.OrdersApi;

public class OrdersApiExample {
    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        OrderCreateRequest orderCreateRequest = ; // OrderCreateRequest | 

        try {
            OrderResponse result = apiInstance.createOrder(orderCreateRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#createOrder");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
OrdersApi *apiInstance = [[OrdersApi alloc] init];
OrderCreateRequest *orderCreateRequest = ; // 

// Create an order
[apiInstance createOrderWith:orderCreateRequest
              completionHandler: ^(OrderResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.OrdersApi()
var orderCreateRequest = ; // {OrderCreateRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOrder(orderCreateRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class createOrderExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new OrdersApi();
            var orderCreateRequest = new OrderCreateRequest(); // OrderCreateRequest | 

            try {
                // Create an order
                OrderResponse result = apiInstance.createOrder(orderCreateRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrdersApi.createOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\OrdersApi();
$orderCreateRequest = ; // OrderCreateRequest | 

try {
    $result = $api_instance->createOrder($orderCreateRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->createOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::OrdersApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::OrdersApi->new();
my $orderCreateRequest = WWW::OPenAPIClient::Object::OrderCreateRequest->new(); # OrderCreateRequest | 

eval {
    my $result = $api_instance->createOrder(orderCreateRequest => $orderCreateRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrdersApi->createOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.OrdersApi()
orderCreateRequest =  # OrderCreateRequest | 

try:
    # Create an order
    api_response = api_instance.create_order(orderCreateRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->createOrder: %s\n" % e)
extern crate OrdersApi;

pub fn main() {
    let orderCreateRequest = ; // OrderCreateRequest

    let mut context = OrdersApi::Context::default();
    let result = client.createOrder(orderCreateRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
orderCreateRequest *

Responses


getOrder

Get an order by id


/orders/{orderId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8080/orders/{orderId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.OrdersApi;

import java.io.File;
import java.util.*;

public class OrdersApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        OrdersApi apiInstance = new OrdersApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

        try {
            OrderResponse result = apiInstance.getOrder(orderId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getOrder");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID orderId = new UUID(); // UUID | 

try {
    final result = await api_instance.getOrder(orderId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getOrder: $e\n');
}

import org.openapitools.client.api.OrdersApi;

public class OrdersApiExample {
    public static void main(String[] args) {
        OrdersApi apiInstance = new OrdersApi();
        UUID orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

        try {
            OrderResponse result = apiInstance.getOrder(orderId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrdersApi#getOrder");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
OrdersApi *apiInstance = [[OrdersApi alloc] init];
UUID *orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; //  (default to null)

// Get an order by id
[apiInstance getOrderWith:orderId
              completionHandler: ^(OrderResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.OrdersApi()
var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrder(orderId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getOrderExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new OrdersApi();
            var orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID |  (default to null)

            try {
                // Get an order by id
                OrderResponse result = apiInstance.getOrder(orderId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling OrdersApi.getOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\OrdersApi();
$orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

try {
    $result = $api_instance->getOrder($orderId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrdersApi->getOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::OrdersApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::OrdersApi->new();
my $orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | 

eval {
    my $result = $api_instance->getOrder(orderId => $orderId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrdersApi->getOrder: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.OrdersApi()
orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID |  (default to null)

try:
    # Get an order by id
    api_response = api_instance.get_order(orderId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrdersApi->getOrder: %s\n" % e)
extern crate OrdersApi;

pub fn main() {
    let orderId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = OrdersApi::Context::default();
    let result = client.getOrder(orderId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
orderId*
UUID (uuid)
Required

Responses


Payments

authorizePayment

Authorize payment for an order


/payments/authorize

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/payments/authorize" \
 -d '{
  "orderId" : "22222222-2222-4222-8222-222222222222",
  "amount" : {
    "amount" : 49.97,
    "currency" : "EUR"
  }
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PaymentsApi;

import java.io.File;
import java.util.*;

public class PaymentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PaymentsApi apiInstance = new PaymentsApi();
        PaymentAuthorizeRequest paymentAuthorizeRequest = ; // PaymentAuthorizeRequest | 

        try {
            PaymentResponse result = apiInstance.authorizePayment(paymentAuthorizeRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentsApi#authorizePayment");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final PaymentAuthorizeRequest paymentAuthorizeRequest = new PaymentAuthorizeRequest(); // PaymentAuthorizeRequest | 

try {
    final result = await api_instance.authorizePayment(paymentAuthorizeRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->authorizePayment: $e\n');
}

import org.openapitools.client.api.PaymentsApi;

public class PaymentsApiExample {
    public static void main(String[] args) {
        PaymentsApi apiInstance = new PaymentsApi();
        PaymentAuthorizeRequest paymentAuthorizeRequest = ; // PaymentAuthorizeRequest | 

        try {
            PaymentResponse result = apiInstance.authorizePayment(paymentAuthorizeRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentsApi#authorizePayment");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PaymentsApi *apiInstance = [[PaymentsApi alloc] init];
PaymentAuthorizeRequest *paymentAuthorizeRequest = ; // 

// Authorize payment for an order
[apiInstance authorizePaymentWith:paymentAuthorizeRequest
              completionHandler: ^(PaymentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.PaymentsApi()
var paymentAuthorizeRequest = ; // {PaymentAuthorizeRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.authorizePayment(paymentAuthorizeRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class authorizePaymentExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PaymentsApi();
            var paymentAuthorizeRequest = new PaymentAuthorizeRequest(); // PaymentAuthorizeRequest | 

            try {
                // Authorize payment for an order
                PaymentResponse result = apiInstance.authorizePayment(paymentAuthorizeRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PaymentsApi.authorizePayment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PaymentsApi();
$paymentAuthorizeRequest = ; // PaymentAuthorizeRequest | 

try {
    $result = $api_instance->authorizePayment($paymentAuthorizeRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentsApi->authorizePayment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PaymentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PaymentsApi->new();
my $paymentAuthorizeRequest = WWW::OPenAPIClient::Object::PaymentAuthorizeRequest->new(); # PaymentAuthorizeRequest | 

eval {
    my $result = $api_instance->authorizePayment(paymentAuthorizeRequest => $paymentAuthorizeRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentsApi->authorizePayment: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PaymentsApi()
paymentAuthorizeRequest =  # PaymentAuthorizeRequest | 

try:
    # Authorize payment for an order
    api_response = api_instance.authorize_payment(paymentAuthorizeRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentsApi->authorizePayment: %s\n" % e)
extern crate PaymentsApi;

pub fn main() {
    let paymentAuthorizeRequest = ; // PaymentAuthorizeRequest

    let mut context = PaymentsApi::Context::default();
    let result = client.authorizePayment(paymentAuthorizeRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
paymentAuthorizeRequest *

Responses


getPayment

Get a payment by id


/payments/{paymentId}

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json,application/problem+json" \
 "http://localhost:8080/payments/{paymentId}"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PaymentsApi;

import java.io.File;
import java.util.*;

public class PaymentsApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PaymentsApi apiInstance = new PaymentsApi();
        UUID paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

        try {
            PaymentResponse result = apiInstance.getPayment(paymentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentsApi#getPayment");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UUID paymentId = new UUID(); // UUID | 

try {
    final result = await api_instance.getPayment(paymentId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->getPayment: $e\n');
}

import org.openapitools.client.api.PaymentsApi;

public class PaymentsApiExample {
    public static void main(String[] args) {
        PaymentsApi apiInstance = new PaymentsApi();
        UUID paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

        try {
            PaymentResponse result = apiInstance.getPayment(paymentId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PaymentsApi#getPayment");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PaymentsApi *apiInstance = [[PaymentsApi alloc] init];
UUID *paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; //  (default to null)

// Get a payment by id
[apiInstance getPaymentWith:paymentId
              completionHandler: ^(PaymentResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.PaymentsApi()
var paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // {UUID} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPayment(paymentId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getPaymentExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PaymentsApi();
            var paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d;  // UUID |  (default to null)

            try {
                // Get a payment by id
                PaymentResponse result = apiInstance.getPayment(paymentId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PaymentsApi.getPayment: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PaymentsApi();
$paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID | 

try {
    $result = $api_instance->getPayment($paymentId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PaymentsApi->getPayment: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PaymentsApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PaymentsApi->new();
my $paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; # UUID | 

eval {
    my $result = $api_instance->getPayment(paymentId => $paymentId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PaymentsApi->getPayment: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PaymentsApi()
paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d # UUID |  (default to null)

try:
    # Get a payment by id
    api_response = api_instance.get_payment(paymentId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PaymentsApi->getPayment: %s\n" % e)
extern crate PaymentsApi;

pub fn main() {
    let paymentId = 38400000-8cf0-11bd-b23e-10b96e4ef00d; // UUID

    let mut context = PaymentsApi::Context::default();
    let result = client.getPayment(paymentId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Path parameters
Name Description
paymentId*
UUID (uuid)
Required

Responses


Pricing

quotePrices

Quote a basket of products


/pricing/quote

Usage and SDK Samples

curl -X POST \
 -H "Accept: application/json,application/problem+json" \
 -H "Content-Type: application/json" \
 "http://localhost:8080/pricing/quote" \
 -d '{
  "items" : [ {
    "productCode" : "SKU-COFFEE-MUG",
    "quantity" : 2
  }, {
    "productCode" : "SKU-NOTEBOOK",
    "quantity" : 1
  } ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PricingApi;

import java.io.File;
import java.util.*;

public class PricingApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        PricingApi apiInstance = new PricingApi();
        PricingQuoteRequest pricingQuoteRequest = ; // PricingQuoteRequest | 

        try {
            PricingQuoteResponse result = apiInstance.quotePrices(pricingQuoteRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PricingApi#quotePrices");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final PricingQuoteRequest pricingQuoteRequest = new PricingQuoteRequest(); // PricingQuoteRequest | 

try {
    final result = await api_instance.quotePrices(pricingQuoteRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->quotePrices: $e\n');
}

import org.openapitools.client.api.PricingApi;

public class PricingApiExample {
    public static void main(String[] args) {
        PricingApi apiInstance = new PricingApi();
        PricingQuoteRequest pricingQuoteRequest = ; // PricingQuoteRequest | 

        try {
            PricingQuoteResponse result = apiInstance.quotePrices(pricingQuoteRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PricingApi#quotePrices");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
PricingApi *apiInstance = [[PricingApi alloc] init];
PricingQuoteRequest *pricingQuoteRequest = ; // 

// Quote a basket of products
[apiInstance quotePricesWith:pricingQuoteRequest
              completionHandler: ^(PricingQuoteResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var SpringModulithOrderPlatformApi = require('spring_modulith_order_platform_api');

// Create an instance of the API class
var api = new SpringModulithOrderPlatformApi.PricingApi()
var pricingQuoteRequest = ; // {PricingQuoteRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.quotePrices(pricingQuoteRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class quotePricesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new PricingApi();
            var pricingQuoteRequest = new PricingQuoteRequest(); // PricingQuoteRequest | 

            try {
                // Quote a basket of products
                PricingQuoteResponse result = apiInstance.quotePrices(pricingQuoteRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PricingApi.quotePrices: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PricingApi();
$pricingQuoteRequest = ; // PricingQuoteRequest | 

try {
    $result = $api_instance->quotePrices($pricingQuoteRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PricingApi->quotePrices: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PricingApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PricingApi->new();
my $pricingQuoteRequest = WWW::OPenAPIClient::Object::PricingQuoteRequest->new(); # PricingQuoteRequest | 

eval {
    my $result = $api_instance->quotePrices(pricingQuoteRequest => $pricingQuoteRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PricingApi->quotePrices: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.PricingApi()
pricingQuoteRequest =  # PricingQuoteRequest | 

try:
    # Quote a basket of products
    api_response = api_instance.quote_prices(pricingQuoteRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PricingApi->quotePrices: %s\n" % e)
extern crate PricingApi;

pub fn main() {
    let pricingQuoteRequest = ; // PricingQuoteRequest

    let mut context = PricingApi::Context::default();
    let result = client.quotePrices(pricingQuoteRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
pricingQuoteRequest *

Responses