Module: SchemaOrg::Mixins::TradeAction

Includes:
Action
Included in:
BuyAction, OrderAction, PayAction, PreOrderAction, QuoteAction, RentAction, SellAction, TipAction, TradeAction
Defined in:
lib/schema_org/mixins/trade_action.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Action

#action_process, #action_process=, #action_status, #action_status=, #agent, #agent=, #end_time, #end_time=, #error, #error=, #instrument, #instrument=, #location, #location=, #object, #object=, #participant, #participant=, #provider, #provider=, #result, #result=, #start_time, #start_time=, #target, #target=

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/trade_action.rb', line 11

def self.schema_property_definitions
  {
    price: {
      schema_name: "price",
      schema_url: "https://schema.org/price",
      comment_lines: ["The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.\\n\\nUsage guidelines:\\n\\n* Use the [[priceCurrency]] property (with 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\") instead of including [ambiguous symbols](http://en.wikipedia.org/wiki/Dollar_sign#Currencies_that_use_the_dollar_or_peso_sign) such as '$' in the value.\\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.\\n* Note that both [RDFa](http://www.w3.org/TR/xhtml-rdfa-primer/#using-the-content-attribute) and Microdata syntax allow the use of a \"content=\" attribute for publishing simple machine-readable values alongside more human-friendly formatting.\\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols."].freeze,
      ranges: ["Number", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    price_currency: {
      schema_name: "priceCurrency",
      schema_url: "https://schema.org/priceCurrency",
      comment_lines: ["The currency of the price, or a price component when attached to [[PriceSpecification]] and its subtypes.\\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,
    price_specification: {
      schema_name: "priceSpecification",
      schema_url: "https://schema.org/priceSpecification",
      comment_lines: ["One or more detailed price specifications, indicating the unit price and delivery or payment charges."].freeze,
      ranges: ["PriceSpecification"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#priceObject

The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.\n\nUsage guidelines:\n\n* Use the [[priceCurrency]] property (with 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") instead of including ambiguous symbols such as '$' in the value.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.\n* Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.



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

def price
  read_property(:price)
end

#price=(value) ⇒ Object

The offer price of a product, or of a price component when attached to PriceSpecification and its subtypes.\n\nUsage guidelines:\n\n* Use the [[priceCurrency]] property (with 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") instead of including ambiguous symbols such as '$' in the value.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.\n* Note that both RDFa and Microdata syntax allow the use of a "content=" attribute for publishing simple machine-readable values alongside more human-friendly formatting.\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.



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

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

#price_currencyObject

The currency of the price, or a price component when attached to [[PriceSpecification]] and its subtypes.\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".



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

def price_currency
  read_property(:price_currency)
end

#price_currency=(value) ⇒ Object

The currency of the price, or a price component when attached to [[PriceSpecification]] and its subtypes.\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".



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

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

#price_specificationObject

One or more detailed price specifications, indicating the unit price and delivery or payment charges.



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

def price_specification
  read_property(:price_specification)
end

#price_specification=(value) ⇒ Object

One or more detailed price specifications, indicating the unit price and delivery or payment charges.



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

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