---
title: "initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:scheduledPickupTime:"
framework: intents
role: symbol
role_heading: Instance Method
path: "intents/inrequestrideintent/initwithpickuplocation:dropofflocation:rideoptionname:partysize:paymentmethod:scheduledpickuptime:"
---

# initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:scheduledPickupTime:

Initializes an intent object with the specified ride information.

## Declaration

```occ
- (instancetype) initWithPickupLocation:(CLPlacemark *) pickupLocation dropOffLocation:(CLPlacemark *) dropOffLocation rideOptionName:(INSpeakableString *) rideOptionName partySize:(NSNumber *) partySize paymentMethod:(INPaymentMethod *) paymentMethod scheduledPickupTime:(INDateComponentsRange *) scheduledPickupTime;
```

## Parameters

- `pickupLocation`: The starting location for the ride.
- `dropOffLocation`: The destination of the ride.
- `rideOptionName`: The name of the ride option (if any) selected by the user.
- `partySize`: The number of passengers that the ride must accommodate.
- `paymentMethod`: The payment method requested by the user.
- `scheduledPickupTime`: The time at which the user wants to be picked up.

## Return Value

Return Value An initialized intent object or nil if the object could not be created.

## Discussion

Discussion Normally, you don’t create instances of this class yourself. Instead, SiriKit creates instances when the user tries to book a ride. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths.

## See Also

### Initializing the Intent Object

- [initWithPickupLocation:dropOffLocation:rideOptionName:partySize:paymentMethod:](intents/inrequestrideintent/initwithpickuplocation:dropofflocation:rideoptionname:partysize:paymentmethod:.md)
