Class: Google::Apis::ContentV2_1::CarriersCarrier

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/content_v2_1/classes.rb,
generated/google/apis/content_v2_1/representations.rb,
generated/google/apis/content_v2_1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ CarriersCarrier

Returns a new instance of CarriersCarrier.



1507
1508
1509
# File 'generated/google/apis/content_v2_1/classes.rb', line 1507

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

Instance Attribute Details

#countryString

The CLDR country code of the carrier (e.g., "US"). Always present. Corresponds to the JSON property country

Returns:

  • (String)


1494
1495
1496
# File 'generated/google/apis/content_v2_1/classes.rb', line 1494

def country
  @country
end

#nameString

The name of the carrier (e.g., "UPS"). Always present. Corresponds to the JSON property name

Returns:

  • (String)


1499
1500
1501
# File 'generated/google/apis/content_v2_1/classes.rb', line 1499

def name
  @name
end

#servicesArray<String>

A list of supported services (e.g., "ground") for that carrier. Contains at least one service. Corresponds to the JSON property services

Returns:

  • (Array<String>)


1505
1506
1507
# File 'generated/google/apis/content_v2_1/classes.rb', line 1505

def services
  @services
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1512
1513
1514
1515
1516
# File 'generated/google/apis/content_v2_1/classes.rb', line 1512

def update!(**args)
  @country = args[:country] if args.key?(:country)
  @name = args[:name] if args.key?(:name)
  @services = args[:services] if args.key?(:services)
end