Class: Mosaic::Sdk::Models::Nav
- Includes:
- Searchable
- Defined in:
- lib/mosaic/sdk/models/nav.rb
Overview
Represents the NAV (Net Asset Value) collection from the Mosaic API.
NAVs can be accessed in two ways:
-
Top-level (code-addressed): use Mosaic::Sdk.Nav to call #list with
codes:. This POSTs to/v2/navs/searchand returns raw nav arrays keyed by code.createis NOT available at the top level. -
Nested under a clone: use
clone.navs(a collection scoped to/v2/clones/:clone_id/navs) to call #list, #create, #latest, or #for_date.
Defined Under Namespace
Classes: Instance
Instance Method Summary collapse
-
#create(price:, unit:, date:, pricing_method:, bank_id:, source: nil, user: nil, currency: nil) ⇒ Instance
Creates a new NAV for the parent clone.
-
#for_date(date) ⇒ Instance
Returns the NAV for a specific date.
-
#latest(historical: false) ⇒ Instance
Returns the latest NAV for the parent clone.
-
#list(codes: [], from: nil, to: nil, on: nil, historical: false, sources: nil, view: nil, currencies: nil) ⇒ Array<Instance>, Hash{String=>Array}
Lists NAVs: nested under a clone it returns that clone's NAVs (GET); at the top level it runs a code-addressed batch search (POST
/search).
Methods inherited from Base
Constructor Details
This class inherits a constructor from Mosaic::Sdk::Models::Base
Instance Method Details
#create(price:, unit:, date:, pricing_method:, bank_id:, source: nil, user: nil, currency: nil) ⇒ Instance
Creates a new NAV for the parent clone.
#for_date(date) ⇒ Instance
Returns the NAV for a specific date.
#latest(historical: false) ⇒ Instance
Returns the latest NAV for the parent clone.
#list(codes: [], from: nil, to: nil, on: nil, historical: false, sources: nil, view: nil, currencies: nil) ⇒ Array<Instance>, Hash{String=>Array}
Lists NAVs: nested under a clone it returns that clone's NAVs (GET);
at the top level it runs a code-addressed batch search (POST /search).