Class: Inttegro::Price

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/price/price.rb,
lib/inttegro/price/base.rb,
lib/inttegro/price/page.rb,
lib/inttegro/price/type.rb,
lib/inttegro/price/response.rb,
lib/inttegro/price/page_item.rb,
lib/inttegro/price/page_request.rb,
lib/inttegro/price/price_params.rb,
lib/inttegro/price/catalog_price.rb,
lib/inttegro/price/page_response.rb,
lib/inttegro/price/action_request.rb,
lib/inttegro/price/lookup_request.rb,
lib/inttegro/price/update_request.rb,
lib/inttegro/price/embedded_product.rb,
lib/inttegro/price/suggested_amount.rb,
lib/inttegro/price/catalog_price_params.rb,
lib/inttegro/price/suggested_amount_params.rb,
lib/inttegro/price/customer_selected_amount.rb,
lib/inttegro/price/customer_selected_amount_params.rb

Overview

An inline price returned by the API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Defined Under Namespace

Classes: ActionRequest, CatalogPrice, CatalogPriceParams, CustomerSelectedAmount, CustomerSelectedAmountParams, EmbeddedProduct, LookupRequest, Page, PageRequest, PageResponse, PriceParams, Response, SuggestedAmount, SuggestedAmountParams, Type, UpdateRequest

Constant Summary collapse

PageItem =

Typed representation of the page item object in the Inttegro API.

T.type_alias { Inttegro::Price::CatalogPrice }

Instance Attribute Summary collapse

Instance Attribute Details

#currency ⇒ Inttegro::Money::Currency (readonly)

A currency code recognized by the Inttegro API. Individual operations can support a subset of these currencies.

Required in the API payload. Wire name: currency.



30
31
32
33
# File 'lib/inttegro/price/price.rb', line 30

class Price
  const :currency, Inttegro::Money::Currency
  const :value, Integer
end

#value ⇒ Integer (readonly)

Amount in the currency's smallest unit.

Required in the API payload. Wire name: value.

Returns:

  • (Integer)


30
31
32
33
# File 'lib/inttegro/price/price.rb', line 30

class Price
  const :currency, Inttegro::Money::Currency
  const :value, Integer
end