Class: Google::Apis::WalletobjectsV1::TicketLeg
- Inherits:
-
Object
- Object
- Google::Apis::WalletobjectsV1::TicketLeg
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/walletobjects_v1/classes.rb,
lib/google/apis/walletobjects_v1/representations.rb,
lib/google/apis/walletobjects_v1/representations.rb
Instance Attribute Summary collapse
-
#arrival_date_time ⇒ String
The date/time of arrival.
-
#carriage ⇒ String
The train or ship name/number that the passsenger needs to board.
-
#departure_date_time ⇒ String
The date/time of departure.
-
#destination_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The destination name.
-
#destination_station_code ⇒ String
The destination station code.
-
#fare_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Short description/name of the fare for this leg of travel.
-
#origin_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The name of the origin station.
-
#origin_station_code ⇒ String
The origin station code.
-
#platform ⇒ String
The platform or gate where the passenger can board the carriage.
-
#ticket_seat ⇒ Google::Apis::WalletobjectsV1::TicketSeat
The reserved seat for the passenger(s).
-
#ticket_seats ⇒ Array<Google::Apis::WalletobjectsV1::TicketSeat>
The reserved seat for the passenger(s).
-
#transit_operator_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The name of the transit operator that is operating this leg of a trip.
-
#transit_terminus_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Terminus station or destination of the train/bus/etc.
-
#zone ⇒ String
The zone of boarding within the platform.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TicketLeg
constructor
A new instance of TicketLeg.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TicketLeg
Returns a new instance of TicketLeg.
7652 7653 7654 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7652 def initialize(**args) update!(**args) end |
Instance Attribute Details
#arrival_date_time ⇒ String
The date/time of arrival. This is an ISO 8601 extended format date/time, with
or without an offset. Time may be specified up to nanosecond precision.
Offsets may be specified with seconds precision (even though offset seconds is
not part of ISO 8601). For example: 1985-04-12T23:20:50.52Z
would be 20
minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.
1985-04-12T19:20:50.52-04:00
would be 20 minutes and 50.52 seconds after the
19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the
above example). If the event were in New York, this would be the equivalent of
Eastern Daylight Time (EDT). Remember that offset varies in regions that
observe Daylight Saving Time (or Summer Time), depending on the time of the
year. 1985-04-12T19:20:50.52
would be 20 minutes and 50.52 seconds after the
19th hour of April 12th, 1985 with no offset information. The portion of the
date/time without the offset is considered the "local date/time". This should
be the local date/time at the destination station. For example, if the event
occurs at the 20th hour of June 5th, 2018 at the destination station, the
local date/time portion should be 2018-06-05T20:00:00
. If the local date/
time at the destination station is 4 hours before UTC, an offset of -04:00
may be appended. Without offset information, some rich features may not be
available.
Corresponds to the JSON property arrivalDateTime
7559 7560 7561 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7559 def arrival_date_time @arrival_date_time end |
#carriage ⇒ String
The train or ship name/number that the passsenger needs to board.
Corresponds to the JSON property carriage
7564 7565 7566 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7564 def carriage @carriage end |
#departure_date_time ⇒ String
The date/time of departure. This is required if there is no validity time
interval set on the transit object. This is an ISO 8601 extended format date/
time, with or without an offset. Time may be specified up to nanosecond
precision. Offsets may be specified with seconds precision (even though offset
seconds is not part of ISO 8601). For example: 1985-04-12T23:20:50.52Z
would
be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.
1985-04-12T19:20:50.52-04:00
would be 20 minutes and 50.52 seconds after
the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as
the above example). If the event were in New York, this would be the
equivalent of Eastern Daylight Time (EDT). Remember that offset varies in
regions that observe Daylight Saving Time (or Summer Time), depending on the
time of the year. 1985-04-12T19:20:50.52
would be 20 minutes and 50.52
seconds after the 19th hour of April 12th, 1985 with no offset information.
The portion of the date/time without the offset is considered the "local date/
time". This should be the local date/time at the origin station. For example,
if the departure occurs at the 20th hour of June 5th, 2018 at the origin
station, the local date/time portion should be 2018-06-05T20:00:00
. If the
local date/time at the origin station is 4 hours before UTC, an offset of -04:
00
may be appended. Without offset information, some rich features may not be
available.
Corresponds to the JSON property departureDateTime
7588 7589 7590 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7588 def departure_date_time @departure_date_time end |
#destination_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The destination name.
Corresponds to the JSON property destinationName
7593 7594 7595 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7593 def destination_name @destination_name end |
#destination_station_code ⇒ String
The destination station code.
Corresponds to the JSON property destinationStationCode
7598 7599 7600 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7598 def destination_station_code @destination_station_code end |
#fare_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Short description/name of the fare for this leg of travel. Eg "Anytime Single
Use".
Corresponds to the JSON property fareName
7604 7605 7606 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7604 def fare_name @fare_name end |
#origin_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The name of the origin station. This is required if desinationName
is
present or if originStationCode
is not present.
Corresponds to the JSON property originName
7610 7611 7612 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7610 def origin_name @origin_name end |
#origin_station_code ⇒ String
The origin station code. This is required if destinationStationCode
is
present or if originName
is not present.
Corresponds to the JSON property originStationCode
7616 7617 7618 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7616 def origin_station_code @origin_station_code end |
#platform ⇒ String
The platform or gate where the passenger can board the carriage.
Corresponds to the JSON property platform
7621 7622 7623 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7621 def platform @platform end |
#ticket_seat ⇒ Google::Apis::WalletobjectsV1::TicketSeat
The reserved seat for the passenger(s). If more than one seat is to be
specified then use the ticketSeats
field instead. Both ticketSeat
and
ticketSeats
may not be set.
Corresponds to the JSON property ticketSeat
7628 7629 7630 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7628 def ticket_seat @ticket_seat end |
#ticket_seats ⇒ Array<Google::Apis::WalletobjectsV1::TicketSeat>
The reserved seat for the passenger(s). If only one seat is to be specified
then use the ticketSeat
field instead. Both ticketSeat
and ticketSeats
may not be set.
Corresponds to the JSON property ticketSeats
7635 7636 7637 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7635 def ticket_seats @ticket_seats end |
#transit_operator_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
The name of the transit operator that is operating this leg of a trip.
Corresponds to the JSON property transitOperatorName
7640 7641 7642 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7640 def transit_operator_name @transit_operator_name end |
#transit_terminus_name ⇒ Google::Apis::WalletobjectsV1::LocalizedString
Terminus station or destination of the train/bus/etc.
Corresponds to the JSON property transitTerminusName
7645 7646 7647 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7645 def transit_terminus_name @transit_terminus_name end |
#zone ⇒ String
The zone of boarding within the platform.
Corresponds to the JSON property zone
7650 7651 7652 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7650 def zone @zone end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
7657 7658 7659 7660 7661 7662 7663 7664 7665 7666 7667 7668 7669 7670 7671 7672 |
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7657 def update!(**args) @arrival_date_time = args[:arrival_date_time] if args.key?(:arrival_date_time) @carriage = args[:carriage] if args.key?(:carriage) @departure_date_time = args[:departure_date_time] if args.key?(:departure_date_time) @destination_name = args[:destination_name] if args.key?(:destination_name) @destination_station_code = args[:destination_station_code] if args.key?(:destination_station_code) @fare_name = args[:fare_name] if args.key?(:fare_name) @origin_name = args[:origin_name] if args.key?(:origin_name) @origin_station_code = args[:origin_station_code] if args.key?(:origin_station_code) @platform = args[:platform] if args.key?(:platform) @ticket_seat = args[:ticket_seat] if args.key?(:ticket_seat) @ticket_seats = args[:ticket_seats] if args.key?(:ticket_seats) @transit_operator_name = args[:transit_operator_name] if args.key?(:transit_operator_name) @transit_terminus_name = args[:transit_terminus_name] if args.key?(:transit_terminus_name) @zone = args[:zone] if args.key?(:zone) end |