osdm-sys 0.1.0-alpha.3

Specifications for the OSDM API standard. The OSDM specification supports two modes of operation: Retailer Mode and Distributor Mode. The API works identically in both modes, except that in distributor mode the API also returns fare information. The following resources are key to get started: - [Processes](https://osdm.io/spec/processes/) - [Models](https://osdm.io/spec/models/) - [Getting started](https://osdm.io/spec/getting-started/)
Documentation
# \ExchangeApi

All URIs are relative to *https://s3p-osdm.cloud.sqills.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**create_bookings_exchange_operations**]ExchangeApi.md#create_bookings_exchange_operations | **POST** /bookings/{bookingId}/exchange-operations | Pre-books an exchangeOffer as part of an exchange operation.
[**create_exchange_offers_collection**]ExchangeApi.md#create_exchange_offers_collection | **POST** /bookings/{bookingId}/exchange-offers | Returns exchange offers for specified fulfillments
[**delete_bookings_exchange_operation**]ExchangeApi.md#delete_bookings_exchange_operation | **DELETE** /bookings/{bookingId}/exchange-operations/{exchangeOperationId} | Cancels an ongoing exchange operation in provisional state.
[**get_bookings_exchange_operations**]ExchangeApi.md#get_bookings_exchange_operations | **GET** /bookings/{bookingId}/exchange-operations/{exchangeOperationId} | Returns the exchange operation with the id provided.
[**update_bookings_exchange_operations**]ExchangeApi.md#update_bookings_exchange_operations | **PATCH** /bookings/{bookingId}/exchange-operations/{exchangeOperationId} | Allows to update an ongoing exchange operation.



## create_bookings_exchange_operations

> models::ExchangeOperationResponse create_bookings_exchange_operations(booking_id, exchange_operation_request, requestor, accept_language, traceparent, tracestate, idempotency_key, x_accept_namespace)
Pre-books an exchangeOffer as part of an exchange operation.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**booking_id** | **String** |  | [required] |
**exchange_operation_request** | [**ExchangeOperationRequest**]ExchangeOperationRequest.md |  | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred.  |  |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must.  |  |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context).  |  |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context).  |  |
**idempotency_key** | Option<**uuid::Uuid**> | The HTTP Idempotency request header field can be used to carry idempotency key in order to make non-idempotent HTTP methods such as POST or PATCH fault-tolerant. Servers should keep the idempotency key for as long as the result of the underlying operation is valid. Idempotency keys should be  globally unique.  |  |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. |  |

### Return type

[**models::ExchangeOperationResponse**](ExchangeOperationResponse.md)

### Authorization

[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## create_exchange_offers_collection

> models::ExchangeOfferCollectionResponse create_exchange_offers_collection(booking_id, embed, exchange_offer_collection_request, requestor, accept_language, traceparent, tracestate, idempotency_key)
Returns exchange offers for specified fulfillments

Returns exchange offers for specified fulfillments submitted given requested new trip characteristics. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**booking_id** | **String** |  | [required] |
**embed** | [**ExchangeOfferCollectionResponseContent**].md |  | [required] |
**exchange_offer_collection_request** | [**ExchangeOfferCollectionRequest**]ExchangeOfferCollectionRequest.md |  | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred.  |  |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must.  |  |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context).  |  |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context).  |  |
**idempotency_key** | Option<**uuid::Uuid**> | The HTTP Idempotency request header field can be used to carry idempotency key in order to make non-idempotent HTTP methods such as POST or PATCH fault-tolerant. Servers should keep the idempotency key for as long as the result of the underlying operation is valid. Idempotency keys should be  globally unique.  |  |

### Return type

[**models::ExchangeOfferCollectionResponse**](ExchangeOfferCollectionResponse.md)

### Authorization

[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## delete_bookings_exchange_operation

> delete_bookings_exchange_operation(booking_id, exchange_operation_id, requestor, accept_language, traceparent, tracestate)
Cancels an ongoing exchange operation in provisional state.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**booking_id** | **String** | id of the booking containing the exchange operation  | [required] |
**exchange_operation_id** | **String** | id of the exchangeOperation to delete.  | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred.  |  |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must.  |  |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context).  |  |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context).  |  |

### Return type

 (empty response body)

### Authorization

[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_bookings_exchange_operations

> models::ExchangeOperationResponse get_bookings_exchange_operations(booking_id, exchange_operation_id, requestor, accept_language, traceparent, tracestate, x_accept_namespace, embed)
Returns the exchange operation with the id provided.

Returns the exchange operation with the id provided. It may be a provisional or a confirmed exchange. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**booking_id** | **String** | id of the booking  | [required] |
**exchange_operation_id** | **String** | id of the exchange operation  | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred.  |  |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must.  |  |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context).  |  |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context).  |  |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. |  |
**embed** | Option<[**Vec<models::ExchangeOperationResponseContent>**]models::ExchangeOperationResponseContent.md> | Influences whether referenced resources are returned in full or as references only. Default value: ALL  |  |

### Return type

[**models::ExchangeOperationResponse**](ExchangeOperationResponse.md)

### Authorization

[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## update_bookings_exchange_operations

> models::ExchangeOperationResponse update_bookings_exchange_operations(booking_id, exchange_operation_id, exchange_operation_patch_request, requestor, accept_language, traceparent, tracestate, idempotency_key, x_accept_namespace)
Allows to update an ongoing exchange operation.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**booking_id** | **String** | id of the booking to be exchanged.  | [required] |
**exchange_operation_id** | **String** | id of the exchange operation.  | [required] |
**exchange_operation_patch_request** | [**ExchangeOperationPatchRequest**]ExchangeOperationPatchRequest.md |  | [required] |
**requestor** | Option<**String**> | The requestor header contains detailed information about who is calling the API. It can include information such as channel, organization, sales unit or workstation id and be used to configure e.g. the fare range provided to the caller. The content of the string is part of a bilateral contract by the two parties and not standardized by OSDM. It is recommend to encrypt the information transferred.  |  |
**accept_language** | Option<**String**> | Describes the set of natural languages that are preferred for localized text in the response to the request (see RFC9110). Supporting English (en) is a must.  |  |
**traceparent** | Option<**String**> | The traceparent header describes the position of the incoming request in its trace graph in a portable, fixed-length format. Its design focuses on fast parsing. Every tracing tool MUST properly set traceparent even when it only relies on vendor-specific information in tracestate (see W3C Trace Context).  |  |
**tracestate** | Option<**String**> | The tracestate extends traceparent with vendor-specific data represented by a set of name/value pairs. Storing information in tracestate is optional (see W3C Trace Context).  |  |
**idempotency_key** | Option<**uuid::Uuid**> | The HTTP Idempotency request header field can be used to carry idempotency key in order to make non-idempotent HTTP methods such as POST or PATCH fault-tolerant. Servers should keep the idempotency key for as long as the result of the underlying operation is valid. Idempotency keys should be  globally unique.  |  |
**x_accept_namespace** | Option<**String**> | The x-accept-namespace HTTP header indicates the URN namespace that the client prefers. The provider uses content-negotiation to apply the corresponding namespace(s) where applicable. |  |

### Return type

[**models::ExchangeOperationResponse**](ExchangeOperationResponse.md)

### Authorization

[oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json, application/problem+json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)