Module: SchemaOrg::Mixins::PostalAddress

Includes:
ContactPoint
Included in:
PostalAddress
Defined in:
lib/schema_org/mixins/postal_address.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from ContactPoint

#area_served, #area_served=, #available_language, #available_language=, #contact_option, #contact_option=, #contact_type, #contact_type=, #email, #email=, #fax_number, #fax_number=, #hours_available, #hours_available=, #product_supported, #product_supported=, #service_area, #service_area=, #telephone, #telephone=

Methods included from Thing

#additional_type, #additional_type=, #alternate_name, #alternate_name=, #description, #description=, #disambiguating_description, #disambiguating_description=, #identifier, #identifier=, #image, #image=, #main_entity_of_page, #main_entity_of_page=, #name, #name=, #owner, #owner=, #potential_action, #potential_action=, #same_as, #same_as=, #subject_of, #subject_of=, #url, #url=

Class Method Details

.schema_property_definitionsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/schema_org/mixins/postal_address.rb', line 11

def self.schema_property_definitions
  {
    address_country: {
      schema_name: "addressCountry",
      schema_url: "https://schema.org/addressCountry",
      comment_lines: ["The country. Recommended to be in 2-letter [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1) format, for example \"US\". For backward compatibility, a 3-letter [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) country code such as \"SGP\" or a full country name such as \"Singapore\" can also be used."].freeze,
      ranges: ["Country", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    address_locality: {
      schema_name: "addressLocality",
      schema_url: "https://schema.org/addressLocality",
      comment_lines: ["The locality in which the street address is, and which is in the region. For example, Mountain View."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    address_region: {
      schema_name: "addressRegion",
      schema_url: "https://schema.org/addressRegion",
      comment_lines: ["The region in which the locality is, and which is in the country. For example, California or another appropriate first-level [Administrative division](https://en.wikipedia.org/wiki/List_of_administrative_divisions_by_country) such as the Province in Italy or Region in Germany."].freeze,
      ranges: ["AdministrativeArea", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    extended_address: {
      schema_name: "extendedAddress",
      schema_url: "https://schema.org/extendedAddress",
      comment_lines: ["An address extension such as an apartment number, C/O or alternative name."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    post_office_box_number: {
      schema_name: "postOfficeBoxNumber",
      schema_url: "https://schema.org/postOfficeBoxNumber",
      comment_lines: ["The post office box number for PO box addresses."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    postal_code: {
      schema_name: "postalCode",
      schema_url: "https://schema.org/postalCode",
      comment_lines: ["The postal code. For example, 94043."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    street_address: {
      schema_name: "streetAddress",
      schema_url: "https://schema.org/streetAddress",
      comment_lines: ["The street address. For example, 1600 Amphitheatre Pkwy."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#address_countryObject

The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example "US". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as "SGP" or a full country name such as "Singapore" can also be used.



87
88
89
# File 'lib/schema_org/mixins/postal_address.rb', line 87

def address_country
  read_property(:address_country)
end

#address_country=(value) ⇒ Object

The country. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example "US". For backward compatibility, a 3-letter ISO 3166-1 alpha-3 country code such as "SGP" or a full country name such as "Singapore" can also be used.



92
93
94
# File 'lib/schema_org/mixins/postal_address.rb', line 92

def address_country=(value)
  write_property(:address_country, value)
end

#address_localityObject

The locality in which the street address is, and which is in the region. For example, Mountain View.



97
98
99
# File 'lib/schema_org/mixins/postal_address.rb', line 97

def address_locality
  read_property(:address_locality)
end

#address_locality=(value) ⇒ Object

The locality in which the street address is, and which is in the region. For example, Mountain View.



102
103
104
# File 'lib/schema_org/mixins/postal_address.rb', line 102

def address_locality=(value)
  write_property(:address_locality, value)
end

#address_regionObject

The region in which the locality is, and which is in the country. For example, California or another appropriate first-level Administrative division such as the Province in Italy or Region in Germany.



107
108
109
# File 'lib/schema_org/mixins/postal_address.rb', line 107

def address_region
  read_property(:address_region)
end

#address_region=(value) ⇒ Object

The region in which the locality is, and which is in the country. For example, California or another appropriate first-level Administrative division such as the Province in Italy or Region in Germany.



112
113
114
# File 'lib/schema_org/mixins/postal_address.rb', line 112

def address_region=(value)
  write_property(:address_region, value)
end

#extended_addressObject

An address extension such as an apartment number, C/O or alternative name.



117
118
119
# File 'lib/schema_org/mixins/postal_address.rb', line 117

def extended_address
  read_property(:extended_address)
end

#extended_address=(value) ⇒ Object

An address extension such as an apartment number, C/O or alternative name.



122
123
124
# File 'lib/schema_org/mixins/postal_address.rb', line 122

def extended_address=(value)
  write_property(:extended_address, value)
end

#post_office_box_numberObject

The post office box number for PO box addresses.



127
128
129
# File 'lib/schema_org/mixins/postal_address.rb', line 127

def post_office_box_number
  read_property(:post_office_box_number)
end

#post_office_box_number=(value) ⇒ Object

The post office box number for PO box addresses.



132
133
134
# File 'lib/schema_org/mixins/postal_address.rb', line 132

def post_office_box_number=(value)
  write_property(:post_office_box_number, value)
end

#postal_codeObject

The postal code. For example, 94043.



137
138
139
# File 'lib/schema_org/mixins/postal_address.rb', line 137

def postal_code
  read_property(:postal_code)
end

#postal_code=(value) ⇒ Object

The postal code. For example, 94043.



142
143
144
# File 'lib/schema_org/mixins/postal_address.rb', line 142

def postal_code=(value)
  write_property(:postal_code, value)
end

#street_addressObject

The street address. For example, 1600 Amphitheatre Pkwy.



147
148
149
# File 'lib/schema_org/mixins/postal_address.rb', line 147

def street_address
  read_property(:street_address)
end

#street_address=(value) ⇒ Object

The street address. For example, 1600 Amphitheatre Pkwy.



152
153
154
# File 'lib/schema_org/mixins/postal_address.rb', line 152

def street_address=(value)
  write_property(:street_address, value)
end