Class: Clickwrap::Import::Legacy::Result

Inherits:
Data
  • Object
show all
Defined in:
lib/clickwrap/import/legacy.rb

Overview

What an import did, or would do. Returned by both the dry run and the real thing so a migration script reads the same either way.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#actor_referenceObject (readonly)

Returns the value of attribute actor_reference

Returns:

  • (Object)

    the current value of actor_reference



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def actor_reference
  @actor_reference
end

#counts_as_currentObject (readonly)

Returns the value of attribute counts_as_current

Returns:

  • (Object)

    the current value of counts_as_current



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def counts_as_current
  @counts_as_current
end

#eventObject (readonly)

Returns the value of attribute event

Returns:

  • (Object)

    the current value of event



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def event
  @event
end

#idempotency_keyObject (readonly)

Returns the value of attribute idempotency_key

Returns:

  • (Object)

    the current value of idempotency_key



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def idempotency_key
  @idempotency_key
end

#knownObject (readonly)

Returns the value of attribute known

Returns:

  • (Object)

    the current value of known



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def known
  @known
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def message
  @message
end

#occurred_atObject (readonly)

Returns the value of attribute occurred_at

Returns:

  • (Object)

    the current value of occurred_at



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def occurred_at
  @occurred_at
end

#policy_keyObject (readonly)

Returns the value of attribute policy_key

Returns:

  • (Object)

    the current value of policy_key



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def policy_key
  @policy_key
end

#recorded_at_by_serverObject (readonly)

Returns the value of attribute recorded_at_by_server

Returns:

  • (Object)

    the current value of recorded_at_by_server



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def recorded_at_by_server
  @recorded_at_by_server
end

#statement_keysObject (readonly)

Returns the value of attribute statement_keys

Returns:

  • (Object)

    the current value of statement_keys



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def statement_keys
  @statement_keys
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def status
  @status
end

#unknownObject (readonly)

Returns the value of attribute unknown

Returns:

  • (Object)

    the current value of unknown



46
47
48
# File 'lib/clickwrap/import/legacy.rb', line 46

def unknown
  @unknown
end

Instance Method Details

#already_imported?Boolean

Returns:

  • (Boolean)


50
# File 'lib/clickwrap/import/legacy.rb', line 50

def already_imported? = status == :already_imported

#event_idObject



54
# File 'lib/clickwrap/import/legacy.rb', line 54

def event_id = event&.id

#imported?Boolean

Returns:

  • (Boolean)


49
# File 'lib/clickwrap/import/legacy.rb', line 49

def imported? = status == :imported

#planned?Boolean

Returns:

  • (Boolean)


51
# File 'lib/clickwrap/import/legacy.rb', line 51

def planned? = status == :planned

#receiptObject



53
# File 'lib/clickwrap/import/legacy.rb', line 53

def receipt = event && Receipt.new(event)

#to_sObject



55
# File 'lib/clickwrap/import/legacy.rb', line 55

def to_s = message

#written?Boolean

Returns:

  • (Boolean)


52
# File 'lib/clickwrap/import/legacy.rb', line 52

def written? = !event.nil?