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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CarriersCarrier

Returns a new instance of CarriersCarrier.



1742
1743
1744
# File 'lib/google/apis/content_v2_1/classes.rb', line 1742

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)


1729
1730
1731
# File 'lib/google/apis/content_v2_1/classes.rb', line 1729

def country
  @country
end

#nameString

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

Returns:

  • (String)


1734
1735
1736
# File 'lib/google/apis/content_v2_1/classes.rb', line 1734

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>)


1740
1741
1742
# File 'lib/google/apis/content_v2_1/classes.rb', line 1740

def services
  @services
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1747
1748
1749
1750
1751
# File 'lib/google/apis/content_v2_1/classes.rb', line 1747

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