class Ittybit::Automations::AutomationsUpdateRequestTrigger

null. To update, provide the new trigger object.
Defines the trigger event and conditions. To clear/remove a trigger, provide

def self.from_json(json_object:)

Returns:
  • (Ittybit::Automations::AutomationsUpdateRequestTrigger) -

Parameters:
  • json_object (String) --
def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  event = parsed_json["event"]
  conditions = parsed_json["conditions"]&.map do |item|
    item = item.to_json
    Ittybit::Automations::AutomationsUpdateRequestTriggerConditionsItem.from_json(json_object: item)
  end
  new(
    event: event,
    conditions: conditions,
    additional_properties: struct
  )
end

def self.validate_raw(obj:)

Returns:
  • (Void) -

Parameters:
  • obj (Object) --
def self.validate_raw(obj:)
  obj.event&.is_a?(String) != false || raise("Passed value for field obj.event is not the expected type, validation failed.")
  obj.conditions&.is_a?(Array) != false || raise("Passed value for field obj.conditions is not the expected type, validation failed.")
end

def initialize(event: OMIT, conditions: OMIT, additional_properties: nil)

Returns:
  • (Ittybit::Automations::AutomationsUpdateRequestTrigger) -

Parameters:
  • additional_properties (OpenStruct) -- Additional properties unmapped to the current class definition
  • conditions (Array) -- Conditions that must be met for the trigger to activate.
  • event (String) -- The event that triggers the automation
def initialize(event: OMIT, conditions: OMIT, additional_properties: nil)
  @event = event if event != OMIT
  @conditions = conditions if conditions != OMIT
  @additional_properties = additional_properties
  @_field_set = { "event": event, "conditions": conditions }.reject do |_k, v|
    v == OMIT
  end
end

def to_json(*_args)

Returns:
  • (String) -
def to_json(*_args)
  @_field_set&.to_json
end