Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sap-samples/customercheckout-fetch-exchangerate-plugin
Sample code for a plugin to fetch live exchange rates integrated via the SAPCustomerCheckout plugin framework.
https://github.com/sap-samples/customercheckout-fetch-exchangerate-plugin
plugin sample sample-code sap-customer-checkout
Last synced: about 1 month ago
JSON representation
Sample code for a plugin to fetch live exchange rates integrated via the SAPCustomerCheckout plugin framework.
- Host: GitHub
- URL: https://github.com/sap-samples/customercheckout-fetch-exchangerate-plugin
- Owner: SAP-samples
- License: apache-2.0
- Created: 2024-08-06T12:19:47.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-14T08:47:42.000Z (4 months ago)
- Last Synced: 2024-08-15T10:23:26.010Z (4 months ago)
- Topics: plugin, sample, sample-code, sap-customer-checkout
- Language: Java
- Size: 16.6 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SAP Customer Checkout FetchExchangeRate Plugin
[![REUSE status](https://api.reuse.software/badge/github.com/sap-samples/customercheckout-fetchexchangerate-plugin)](https://api.reuse.software/info/github.com/sap-samples/customercheckout-fetchexchangerate-plugin)## Description
Sample code for a plugin to fetch live exchange rates integrated via the SAP Customer Checkout plugin framework.## Project Structure
The plugin works out of the box with the provided example `Exchange Rate API`. Credits Rates By Exchange Rate API.This sample project is structured in a way to allow for quick expansion of the available APIs.
To add a new API `Foo`:1. Add a new `FooApiClient` by extending `RetrofitClient` and declaring the endpoints as well as the response `DTO` (data transfer object) of the service
2. Add a new `FooApiCommunicator` by extending `AbstractCommunicator` and implementing the HTTP(s) communication logic that is necessary for your API
3. Add a new `FooApi` by extending `AbstractExchangeAPI` and implementing the `exchangeRateInRelationToUSD` method.
4. Extend the `APIFactory` with a new `public static AbstractExchangeAPI fooAPI()` method.Finally, you can select the API in the `FetchExchangeRatePlugin::startup` method.
## Requirements
Working instance of the SAP Customer Checkout Point of Sales software.## Download and Installation
Set the path to your ENV.jar, then build via maven `mvn clean install`.## Known Issues
No known issues.## How to obtain support
[Create an issue](https://github.com/SAP-samples/customercheckout-fetchexchangerate-plugin/issues) in this repository if you find a bug or have questions about the content.
For additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).## Contributing
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).## License
Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE) file.