Class: Spaceship::Tunes::Territory
- Defined in:
- spaceship/lib/spaceship/tunes/territory.rb
Instance Attribute Summary collapse
-
#code ⇒ String
The two-character country code (e.g. “US” for the United States).
-
#currency_code ⇒ String
The ISO 3166-1 alpha-3 currency code (e.g. “USD” for the United States).
-
#name ⇒ String
The country name (e.g. “United States” for the United States).
-
#region ⇒ String
The region (e.g. “The United States and Canada” for the United States).
-
#region_locale_key ⇒ String
The region locale key (e.g. “ITC.region.NAM” for the United States).
Attributes inherited from Base
Class Method Summary collapse
-
.from_code(code) ⇒ Object
Create a new object based on a two-character country code (e.g. “US” for the United States).
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#code ⇒ String
Returns The two-character country code (e.g. “US” for the United States).
7 8 9 |
# File 'spaceship/lib/spaceship/tunes/territory.rb', line 7 def code @code end |
#currency_code ⇒ String
Returns The ISO 3166-1 alpha-3 currency code (e.g. “USD” for the United States).
10 11 12 |
# File 'spaceship/lib/spaceship/tunes/territory.rb', line 10 def currency_code @currency_code end |
#name ⇒ String
Returns The country name (e.g. “United States” for the United States).
13 14 15 |
# File 'spaceship/lib/spaceship/tunes/territory.rb', line 13 def name @name end |
#region ⇒ String
Returns The region (e.g. “The United States and Canada” for the United States).
16 17 18 |
# File 'spaceship/lib/spaceship/tunes/territory.rb', line 16 def region @region end |
#region_locale_key ⇒ String
Returns The region locale key (e.g. “ITC.region.NAM” for the United States).
19 20 21 |
# File 'spaceship/lib/spaceship/tunes/territory.rb', line 19 def region_locale_key @region_locale_key end |
Class Method Details
.from_code(code) ⇒ Object
Create a new object based on a two-character country code (e.g. “US” for the United States)
31 32 33 34 35 |
# File 'spaceship/lib/spaceship/tunes/territory.rb', line 31 def from_code(code) obj = self.new obj.code = code return obj end |