Skip to content

Latest commit

 

History

History
139 lines (111 loc) · 6.42 KB

README.md

File metadata and controls

139 lines (111 loc) · 6.42 KB

Ingrid Delivery Checkout v2 [OpenAPIClient-php]

Delivery Checkout provides almost unlimited flexibility in selecting delivery options while securing that the process is as convenient and as fast as it physically can. ⚡

Command to generate API client

$ openapi-generator-cli generate \
            -i https://api.ingrid.com/v1/delivery_checkout/_/swagger.json \
            -g php \
            -o siw

By default openapi-generator-cli generates OpenAPI client for the latest version of Guzzle. To prevent it use older version of openapi-generator-cli:

nvm use 18
npm install @openapitools/openapi-generator-cli -g
openapi-generator-cli version-manager set 5.2.1
openapi-generator-cli generate \
            -i https://api.ingrid.com/v1/delivery_checkout/_/swagger.json \
            -g php \
            -o siw

Installation & Usage

Requirements

PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested.

Installation

composer require centrahq/ingrid-checkout-siw-client

API Endpoints

All URIs are relative to http://localhost/v1/delivery_checkout

Class Method HTTP request Description
DefaultApi deliveryCheckoutCompleteSession POST /session.complete When the customer completes the purchase you also need to complete the session. At this point you will have to supply us with the address and the contact details of the user.
DefaultApi deliveryCheckoutCreateSession POST /session.create To add the Ingrid widget to the checkout page you will need to create a new session. This can be done by this call. When doing this you will need to provide some required information.
DefaultApi deliveryCheckoutGetSession GET /session.get Fetches a session by ID. Can be used for loading a previously created session that have been stored together with a customer's shopping cart from a previous visit. It can contain obsolete data. To get the session with the freshest data, use /session.pull endpoint.
DefaultApi deliveryCheckoutListSessionsSummaries GET /sessions_summaries.list Allows the merchant to get shipping data (session IDs and result fields) associated with tos ID.
DefaultApi deliveryCheckoutPullSession GET /session.pull Pulls a session by ID. Can be used for loading a previously created session that have been stored together with a customer's shopping cart from a previous visit. Session will be refreshed if its in active state and if configuration has changed or delivery promise expires.
DefaultApi deliveryCheckoutUpdateSession POST /session.update Update the session with new information. Useful for cases where the customer or cart information is changed. The later being the most common case.

Models

Authorization

Bearer

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

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

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