Class: BaseCRM::SyncMeta

Inherits:
Model
  • Object
show all
Defined in:
lib/basecrm/models/sync_meta.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ack_keyString (readonly)

Returns An acknowledgement key.

Returns:

  • (String)

    An acknowledgement key.



# File 'lib/basecrm/models/sync_meta.rb', line 7

#event_typeString (readonly)

Returns An event type. Possible values: ‘created`, `updated`, `deleted`.

Returns:

  • (String)

    An event type. Possible values: ‘created`, `updated`, `deleted`.



# File 'lib/basecrm/models/sync_meta.rb', line 3

#revisionString (readonly)

Returns Data revision.

Returns:

  • (String)

    Data revision.



15
16
17
# File 'lib/basecrm/models/sync_meta.rb', line 15

def acknowledged?
  !!@acknowledged
end

Instance Method Details

#ackObject



19
20
21
22
# File 'lib/basecrm/models/sync_meta.rb', line 19

def ack
  @acknowledged = true
  [:ack, self.ack_key]
end

#acknowledged?Boolean

attr_reader :revision

Returns:

  • (Boolean)


15
16
17
# File 'lib/basecrm/models/sync_meta.rb', line 15

def acknowledged?
  !!@acknowledged
end

#nackObject



24
25
26
27
# File 'lib/basecrm/models/sync_meta.rb', line 24

def nack
  @acknowledged = true
  [:nack, self.ack_key]
end