Class: Smplkit::Audit::Forwarder

Inherits:
Struct
  • Object
show all
Defined in:
lib/smplkit/audit/forwarders.rb

Overview

rubocop:disable Lint/StructNewOverride – “:filter“ matches the API attribute and shadowing Struct#filter is the expected ergonomics.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def created_at
  @created_at
end

#dataObject

Returns the value of attribute data

Returns:

  • (Object)

    the current value of data



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def data
  @data
end

#deleted_atObject

Returns the value of attribute deleted_at

Returns:

  • (Object)

    the current value of deleted_at



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def deleted_at
  @deleted_at
end

#enabledObject

Returns the value of attribute enabled

Returns:

  • (Object)

    the current value of enabled



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def enabled
  @enabled
end

#filterObject

Returns the value of attribute filter

Returns:

  • (Object)

    the current value of filter



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def filter
  @filter
end

#forwarder_typeObject

Returns the value of attribute forwarder_type

Returns:

  • (Object)

    the current value of forwarder_type



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def forwarder_type
  @forwarder_type
end

#httpObject

Returns the value of attribute http

Returns:

  • (Object)

    the current value of http



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def http
  @http
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def id
  @id
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def name
  @name
end

#slugObject

Returns the value of attribute slug

Returns:

  • (Object)

    the current value of slug



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def slug
  @slug
end

#transformObject

Returns the value of attribute transform

Returns:

  • (Object)

    the current value of transform



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def transform
  @transform
end

#updated_atObject

Returns the value of attribute updated_at

Returns:

  • (Object)

    the current value of updated_at



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def updated_at
  @updated_at
end

#versionObject

Returns the value of attribute version

Returns:

  • (Object)

    the current value of version



220
221
222
# File 'lib/smplkit/audit/forwarders.rb', line 220

def version
  @version
end

Class Method Details

.from_resource(resource) ⇒ Object



226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/smplkit/audit/forwarders.rb', line 226

def self.from_resource(resource)
  a = resource.attributes
  new(
    id: resource.id,
    name: a.name,
    slug: a.slug,
    forwarder_type: a.forwarder_type,
    enabled: a.enabled.nil? || a.enabled,
    filter: Smplkit::Helpers.deep_stringify_keys(a.filter || {}),
    transform: a.transform,
    http: ForwarderHttp.from_wire(a.http),
    data: Smplkit::Helpers.deep_stringify_keys(a.data || {}),
    created_at: a.created_at,
    updated_at: a.updated_at,
    deleted_at: a.deleted_at,
    version: a.version
  )
end