# openapi.api.ShippingApi

## Load the API package
```dart
import 'package:openapi/api.dart';
```

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**callGet**](ShippingApi.md#callget) | **GET** /api/shipping/{id} | Get shipping by id
[**create**](ShippingApi.md#create) | **POST** /api/shipping | Create shipping
[**delete**](ShippingApi.md#delete) | **DELETE** /api/shipping/{id} | Delete shipping
[**getAll**](ShippingApi.md#getall) | **GET** /api/shipping | Get all shippings
[**getAllData**](ShippingApi.md#getalldata) | **GET** /api/shipping/data | Get all shippings data
[**update**](ShippingApi.md#update) | **PUT** /api/shipping/{id} | Update shipping


# **callGet**
> GetShippingResponse callGet(id)

Get shipping by id

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getShippingApi();
final num id = 8.14; // num | 

try {
    final response = api.callGet(id);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ShippingApi->callGet: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 

### Return type

[**GetShippingResponse**](GetShippingResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/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**
> CreateShippingResponse create(createShippingRatesBody)

Create shipping

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getShippingApi();
final CreateShippingRatesBody createShippingRatesBody = ; // CreateShippingRatesBody | 

try {
    final response = api.create(createShippingRatesBody);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ShippingApi->create: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **createShippingRatesBody** | [**CreateShippingRatesBody**](CreateShippingRatesBody.md)|  | 

### Return type

[**CreateShippingResponse**](CreateShippingResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/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**
> OkRes delete(id)

Delete shipping

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getShippingApi();
final num id = 8.14; // num | 

try {
    final response = api.delete(id);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ShippingApi->delete: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/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)

# **getAll**
> GetAllShippingsResponse getAll()

Get all shippings

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getShippingApi();

try {
    final response = api.getAll();
    print(response);
} catch on DioError (e) {
    print('Exception when calling ShippingApi->getAll: $e\n');
}
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**GetAllShippingsResponse**](GetAllShippingsResponse.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/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)

# **getAllData**
> BuiltList<GetAllShippingsDataRes> getAllData(country, variantIds)

Get all shippings data

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getShippingApi();
final String country = country_example; // String | 
final BuiltList<num> variantIds = ; // BuiltList<num> | 

try {
    final response = api.getAllData(country, variantIds);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ShippingApi->getAllData: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **country** | **String**|  | 
 **variantIds** | [**BuiltList&lt;num&gt;**](num.md)|  | 

### Return type

[**BuiltList&lt;GetAllShippingsDataRes&gt;**](GetAllShippingsDataRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/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**
> OkRes update(id, updateShippingBody)

Update shipping

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getShippingApi();
final num id = 8.14; // num | 
final UpdateShippingBody updateShippingBody = ; // UpdateShippingBody | 

try {
    final response = api.update(id, updateShippingBody);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ShippingApi->update: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **num**|  | 
 **updateShippingBody** | [**UpdateShippingBody**](UpdateShippingBody.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/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)

