---
title: "init(provider:busName:busNumber:tripDuration:departureBusStopLocation:departurePlatform:arrivalBusStopLocation:arrivalPlatform:)"
framework: intents
role: symbol
role_heading: Initializer
path: "intents/inbustrip/init(provider:busname:busnumber:tripduration:departurebusstoplocation:departureplatform:arrivalbusstoplocation:arrivalplatform:)"
---

# init(provider:busName:busNumber:tripDuration:departureBusStopLocation:departurePlatform:arrivalBusStopLocation:arrivalPlatform:)

Creates a bus trip with the specified contents and attributes.

## Declaration

```swift
init(provider: String?, busName: String?, busNumber: String?, tripDuration: INDateComponentsRange, departureBusStopLocation: CLPlacemark, departurePlatform: String?, arrivalBusStopLocation: CLPlacemark, arrivalPlatform: String?)
```

## Parameters

- `provider`: The operator of the bus line.
- `busName`: The name of the bus.
- `busNumber`: The bus number.
- `tripDuration`: The timespan of the bus trip from departure to arrival.
- `departureBusStopLocation`: The bus stop where the bus trip starts.
- `departurePlatform`: The platform from which the bus departs.
- `arrivalBusStopLocation`: The bus stop where the bus trip ends.
- `arrivalPlatform`: The platform at which the bus arrives.

## Return Value

Return Value A new INBusTrip object or nil if the initializer can’t create one.
