Class: ContextDev::Models::Intake

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/intake.rb,
sig/context_dev/models/intake.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(duplicates:, invalid:, reserved:, reserved_is_ceiling:, submitted:) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::Intake for more details.

What submission took in, and what it charged for.

Parameters:

  • duplicates (Integer)

    URLs dropped before reserving because another entry resolved to the same page. N

  • invalid (Integer, nil)

    URLs from your list rejected as unusable; the same ones are itemised in `invalid

  • reserved (Integer)

    Pages credits were reserved for. Everything else — progress, the refund, the com

  • reserved_is_ceiling (Boolean)

    Whether reserved is an upper bound the batch may finish under. True only for a

  • submitted (Integer, nil)

    URLs in the list you sent, before validation and de-duplication. Null for a craw



# File 'lib/context_dev/models/intake.rb', line 45

Instance Attribute Details

#duplicatesInteger

URLs dropped before reserving because another entry resolved to the same page. Non-zero for sitemap crawls too, whose sitemaps routinely list a page more than once.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


12
# File 'lib/context_dev/models/intake.rb', line 12

required :duplicates, Integer

#invalidInteger?

URLs from your list rejected as unusable; the same ones are itemised in invalid_urls at submission. Null for a crawl — a crawl that resolves no usable page is rejected outright with a 400 rather than accepted with an empty list.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


20
# File 'lib/context_dev/models/intake.rb', line 20

required :invalid, Integer, nil?: true

#reservedInteger

Pages credits were reserved for. Everything else — progress, the refund, the completion percentage — is measured against this.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


27
# File 'lib/context_dev/models/intake.rb', line 27

required :reserved, Integer

#reserved_is_ceilingBoolean

Whether reserved is an upper bound the batch may finish under. True only for a crawl that follows links, whose reachable page count is unknowable until it runs. False for a scrape and for a sitemap crawl, where reserved is an exact page count.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


36
# File 'lib/context_dev/models/intake.rb', line 36

required :reserved_is_ceiling, ContextDev::Internal::Type::Boolean

#submittedInteger?

URLs in the list you sent, before validation and de-duplication. Null for a crawl, which is given a source rather than a list.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


43
# File 'lib/context_dev/models/intake.rb', line 43

required :submitted, Integer, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


31
# File 'sig/context_dev/models/intake.rbs', line 31

def to_hash: -> {