Class: ZeroClick::Sellers::Agentify::MarkdownResult

Inherits:
Object
  • Object
show all
Defined in:
lib/zeroclick/sellers/agentify.rb

Overview

The converted document plus the response headers worth forwarding to the agent — the customer's CDN caches the markdown too.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(markdown:, cache_control: nil, content_type: nil, etag: nil, zcj_id: nil) ⇒ MarkdownResult

zcj_id is the journey id the conversion minted (x-zcj-id), or nil when the chain is off for this seller. Forwarded onto the agent's response so a wrapping page-view beacon can stitch this marketing view to the same journey as the storefront visit and purchase the agent reaches through the inlined links.



64
65
66
67
68
69
70
71
# File 'lib/zeroclick/sellers/agentify.rb', line 64

def initialize(markdown:, cache_control: nil, content_type: nil, etag: nil, zcj_id: nil)
  @markdown = markdown
  @cache_control = cache_control
  @content_type = content_type
  @etag = etag
  @zcj_id = zcj_id
  freeze
end

Instance Attribute Details

#cache_controlObject (readonly)

Returns the value of attribute cache_control.



57
58
59
# File 'lib/zeroclick/sellers/agentify.rb', line 57

def cache_control
  @cache_control
end

#content_typeObject (readonly)

Returns the value of attribute content_type.



57
58
59
# File 'lib/zeroclick/sellers/agentify.rb', line 57

def content_type
  @content_type
end

#etagObject (readonly)

Returns the value of attribute etag.



57
58
59
# File 'lib/zeroclick/sellers/agentify.rb', line 57

def etag
  @etag
end

#markdownObject (readonly)

Returns the value of attribute markdown.



57
58
59
# File 'lib/zeroclick/sellers/agentify.rb', line 57

def markdown
  @markdown
end

#zcj_idObject (readonly)

Returns the value of attribute zcj_id.



57
58
59
# File 'lib/zeroclick/sellers/agentify.rb', line 57

def zcj_id
  @zcj_id
end