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/fixed.rb,
lib/inttegro/price/response.rb,
lib/inttegro/price/page_item.rb,
lib/inttegro/price/fixed_type.rb,
lib/inttegro/price/fixed_params.rb,
lib/inttegro/price/page_request.rb,
lib/inttegro/price/price_params.rb,
lib/inttegro/price/catalog_price.rb,
lib/inttegro/price/fixed_product.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/archived_response.rb,
lib/inttegro/price/fixed_params_type.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,
lib/inttegro/price/archived_response_price_variant1.rb,
lib/inttegro/price/archived_response_price_variant2.rb,
lib/inttegro/price/archived_response_price_variant1_type.rb,
lib/inttegro/price/archived_response_price_variant2_type.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, ArchivedResponse, ArchivedResponsePriceVariant1, ArchivedResponsePriceVariant1Type, ArchivedResponsePriceVariant2, ArchivedResponsePriceVariant2Type, CustomerSelectedAmount, CustomerSelectedAmountParams, EmbeddedProduct, Fixed, FixedParams, FixedParamsType, FixedProduct, FixedType, LookupRequest, Page, PageRequest, PageResponse, PriceParams, Response, SuggestedAmount, SuggestedAmountParams, UpdateRequest

Constant Summary collapse

PageItem =

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

T.type_alias { T.any(Inttegro::Price::Fixed, Inttegro::Customer::SelectedCatalogPrice) }
CatalogPrice =

Typed representation of the catalog price object in the Inttegro API.

T.type_alias { T.any(Inttegro::Price::Fixed, Inttegro::Customer::SelectedCatalogPrice) }
CatalogPriceParams =

Typed representation of the catalog price params object in the Inttegro API.

T.type_alias { T.any(Inttegro::Price::FixedParams, Inttegro::Customer::SelectedCatalogPriceParams) }

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