Class: LlmCostTracker::PriceSync::Fetcher::Response

Inherits:
Data
  • Object
show all
Defined in:
lib/llm_cost_tracker/price_sync/fetcher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



11
12
13
# File 'lib/llm_cost_tracker/price_sync/fetcher.rb', line 11

def body
  @body
end

#etagObject (readonly)

Returns the value of attribute etag

Returns:

  • (Object)

    the current value of etag



11
12
13
# File 'lib/llm_cost_tracker/price_sync/fetcher.rb', line 11

def etag
  @etag
end

#fetched_atObject (readonly)

Returns the value of attribute fetched_at

Returns:

  • (Object)

    the current value of fetched_at



11
12
13
# File 'lib/llm_cost_tracker/price_sync/fetcher.rb', line 11

def fetched_at
  @fetched_at
end

#last_modifiedObject (readonly)

Returns the value of attribute last_modified

Returns:

  • (Object)

    the current value of last_modified



11
12
13
# File 'lib/llm_cost_tracker/price_sync/fetcher.rb', line 11

def last_modified
  @last_modified
end

#not_modifiedObject (readonly)

Returns the value of attribute not_modified

Returns:

  • (Object)

    the current value of not_modified



11
12
13
# File 'lib/llm_cost_tracker/price_sync/fetcher.rb', line 11

def not_modified
  @not_modified
end

Instance Method Details

#source_versionObject



12
13
14
# File 'lib/llm_cost_tracker/price_sync/fetcher.rb', line 12

def source_version
  etag || last_modified || Digest::SHA256.hexdigest(body.to_s)
end