Class: Google::Apis::WalletobjectsV1::TicketRestrictions

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TicketRestrictions

Returns a new instance of TicketRestrictions.



7235
7236
7237
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7235

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#other_restrictionsGoogle::Apis::WalletobjectsV1::LocalizedString

Extra restrictions that don't fall under the "route" or "time" categories. Corresponds to the JSON property otherRestrictions



7217
7218
7219
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7217

def other_restrictions
  @other_restrictions
end

#route_restrictionsGoogle::Apis::WalletobjectsV1::LocalizedString

Restrictions about routes that may be taken. For example, this may be the string "Reserved CrossCountry trains only". Corresponds to the JSON property routeRestrictions



7223
7224
7225
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7223

def route_restrictions
  @route_restrictions
end

#route_restrictions_detailsGoogle::Apis::WalletobjectsV1::LocalizedString

More details about the above routeRestrictions. Corresponds to the JSON property routeRestrictionsDetails



7228
7229
7230
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7228

def route_restrictions_details
  @route_restrictions_details
end

#time_restrictionsGoogle::Apis::WalletobjectsV1::LocalizedString

Restrictions about times this ticket may be used. Corresponds to the JSON property timeRestrictions



7233
7234
7235
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7233

def time_restrictions
  @time_restrictions
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7240
7241
7242
7243
7244
7245
# File 'lib/google/apis/walletobjects_v1/classes.rb', line 7240

def update!(**args)
  @other_restrictions = args[:other_restrictions] if args.key?(:other_restrictions)
  @route_restrictions = args[:route_restrictions] if args.key?(:route_restrictions)
  @route_restrictions_details = args[:route_restrictions_details] if args.key?(:route_restrictions_details)
  @time_restrictions = args[:time_restrictions] if args.key?(:time_restrictions)
end