Class: Webhookdb::Increase::WebhookSignature

Inherits:
TypedStruct
  • Object
show all
Defined in:
lib/webhookdb/increase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from TypedStruct

#[], #_apply, #as_json, #change, #initialize

Constructor Details

This class inherits a constructor from Webhookdb::TypedStruct

Instance Attribute Details

#tObject

Returns the value of attribute t.



27
28
29
# File 'lib/webhookdb/increase.rb', line 27

def t
  @t
end

#v1Object

Returns the value of attribute v1.



27
28
29
# File 'lib/webhookdb/increase.rb', line 27

def v1
  @v1
end

Instance Method Details

#_defaultsObject



29
# File 'lib/webhookdb/increase.rb', line 29

def _defaults = {t: nil, v1: []}

#formatObject



31
32
33
34
35
36
# File 'lib/webhookdb/increase.rb', line 31

def format
  parts = []
  parts << "t=#{self.t.utc.iso8601}" if self.t
  self.v1&.each { |v1| parts << "v1=#{v1}" }
  return parts.join(",")
end