Module: SchemaOrg::Mixins::ExchangeRateSpecification

Includes:
StructuredValue
Included in:
ExchangeRateSpecification
Defined in:
lib/schema_org/mixins/exchange_rate_specification.rb

Class Method Summary collapse

Instance Method Summary collapse

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
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 11

def self.schema_property_definitions
  {
    currency: {
      schema_name: "currency",
      schema_url: "https://schema.org/currency",
      comment_lines: ["The currency in which the monetary amount is expressed.\\n\\nUse standard formats: [ISO 4217 currency format](http://en.wikipedia.org/wiki/ISO_4217), e.g. \"USD\"; [Ticker symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for cryptocurrencies, e.g. \"BTC\"; well known names for [Local Exchange Trading Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system) (LETS) and other currency types, e.g. \"Ithaca HOUR\"."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    current_exchange_rate: {
      schema_name: "currentExchangeRate",
      schema_url: "https://schema.org/currentExchangeRate",
      comment_lines: ["The current price of a currency."].freeze,
      ranges: ["UnitPriceSpecification"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    exchange_rate_spread: {
      schema_name: "exchangeRateSpread",
      schema_url: "https://schema.org/exchangeRateSpread",
      comment_lines: ["The difference between the price at which a broker or other intermediary buys and sells foreign currency."].freeze,
      ranges: ["MonetaryAmount", "Number"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#currencyObject

The currency in which the monetary amount is expressed.\n\nUse standard formats: ISO 4217 currency format, e.g. "USD"; Ticker symbol for cryptocurrencies, e.g. "BTC"; well known names for Local Exchange Trading Systems (LETS) and other currency types, e.g. "Ithaca HOUR".



47
48
49
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 47

def currency
  read_property(:currency)
end

#currency=(value) ⇒ Object

The currency in which the monetary amount is expressed.\n\nUse standard formats: ISO 4217 currency format, e.g. "USD"; Ticker symbol for cryptocurrencies, e.g. "BTC"; well known names for Local Exchange Trading Systems (LETS) and other currency types, e.g. "Ithaca HOUR".



52
53
54
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 52

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

#current_exchange_rateObject

The current price of a currency.



57
58
59
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 57

def current_exchange_rate
  read_property(:current_exchange_rate)
end

#current_exchange_rate=(value) ⇒ Object

The current price of a currency.



62
63
64
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 62

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

#exchange_rate_spreadObject

The difference between the price at which a broker or other intermediary buys and sells foreign currency.



67
68
69
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 67

def exchange_rate_spread
  read_property(:exchange_rate_spread)
end

#exchange_rate_spread=(value) ⇒ Object

The difference between the price at which a broker or other intermediary buys and sells foreign currency.



72
73
74
# File 'lib/schema_org/mixins/exchange_rate_specification.rb', line 72

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