# IiiDispatch.DispatchingApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**updateDispatchWithArrive**](DispatchingApi.md#updateDispatchWithArrive) | **POST** /dispatching/arrive | 載客工作流程：乘客抵達目的地
[**updateDispatchWithPayment**](DispatchingApi.md#updateDispatchWithPayment) | **POST** /dispatching/payment | 載客工作流程：乘客支付車資
[**updateDispatchWithPick**](DispatchingApi.md#updateDispatchWithPick) | **POST** /dispatching/pick | 載客工作流程：乘客上車


<a name="updateDispatchWithArrive"></a>
# **updateDispatchWithArrive**
> updateDispatchWithArrive(dispatchId, opts)

載客工作流程：乘客抵達目的地

乘客抵達目的地，更新單筆載客工作單資料

### Example
```javascript
var IiiDispatch = require('iii_dispatch');
var defaultClient = IiiDispatch.ApiClient.instance;

// Configure OAuth2 access token for authorization: iii_dispatch_auth
var iii_dispatch_auth = defaultClient.authentications['iii_dispatch_auth'];
iii_dispatch_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new IiiDispatch.DispatchingApi();

var dispatchId = 789; // Number | ID of dispatch that needs to be updated

var opts = { 
  'arriveLongitude': 3.4, // Number | 乘客抵達地點：經度
  'arriveLatitude': 3.4, // Number | 乘客抵達地點：緯度
  'arrivePlaceId': "arrivePlaceId_example" // String | 乘客抵達地點：google place id
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateDispatchWithArrive(dispatchId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dispatchId** | **Number**| ID of dispatch that needs to be updated | 
 **arriveLongitude** | **Number**| 乘客抵達地點：經度 | [optional] 
 **arriveLatitude** | **Number**| 乘客抵達地點：緯度 | [optional] 
 **arrivePlaceId** | **String**| 乘客抵達地點：google place id | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/xml, application/json

<a name="updateDispatchWithPayment"></a>
# **updateDispatchWithPayment**
> updateDispatchWithPayment(dispatchId, opts)

載客工作流程：乘客支付車資

乘客支付車資，更新單筆載客工作單資料

### Example
```javascript
var IiiDispatch = require('iii_dispatch');
var defaultClient = IiiDispatch.ApiClient.instance;

// Configure OAuth2 access token for authorization: iii_dispatch_auth
var iii_dispatch_auth = defaultClient.authentications['iii_dispatch_auth'];
iii_dispatch_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new IiiDispatch.DispatchingApi();

var dispatchId = 789; // Number | ID of dispatch that needs to be updated

var opts = { 
  'fare': 789 // Number | 車資
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateDispatchWithPayment(dispatchId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dispatchId** | **Number**| ID of dispatch that needs to be updated | 
 **fare** | **Number**| 車資 | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/xml, application/json

<a name="updateDispatchWithPick"></a>
# **updateDispatchWithPick**
> updateDispatchWithPick(dispatchId, opts)

載客工作流程：乘客上車

乘客上車，更新單筆載客工作單資料

### Example
```javascript
var IiiDispatch = require('iii_dispatch');
var defaultClient = IiiDispatch.ApiClient.instance;

// Configure OAuth2 access token for authorization: iii_dispatch_auth
var iii_dispatch_auth = defaultClient.authentications['iii_dispatch_auth'];
iii_dispatch_auth.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new IiiDispatch.DispatchingApi();

var dispatchId = 789; // Number | ID of dispatch that needs to be updated

var opts = { 
  'pickLongitude': 3.4, // Number | 乘客上車地點：經度
  'pickLatitude': 3.4, // Number | 乘客上車地點：緯度
  'pickPlaceId': "pickPlaceId_example" // String | 乘客上車地點：google place id
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.updateDispatchWithPick(dispatchId, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **dispatchId** | **Number**| ID of dispatch that needs to be updated | 
 **pickLongitude** | **Number**| 乘客上車地點：經度 | [optional] 
 **pickLatitude** | **Number**| 乘客上車地點：緯度 | [optional] 
 **pickPlaceId** | **String**| 乘客上車地點：google place id | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/x-www-form-urlencoded
 - **Accept**: application/xml, application/json

