Class: Windoo::ComponentCriterion

Inherits:
BaseClasses::Criterion show all
Includes:
Mixins::APICollection
Defined in:
lib/windoo/objects/component_criterion.rb

Overview

The class for dealing with the criteria of Patch Components

Constant Summary collapse

RSRC_PATH =

Constants

'criteria'
CONTAINER_CLASS =
Windoo::Component
JSON_ATTRIBUTES =

Attributes

{

  # @!attribute criteriaId
  # @return [Integer] The id number of this criterion
  criteriaId: {
    class: :Integer,
    identifier: :primary,
    do_not_send: true,
    readonly: true
  },

  # @!attribute componentId
  # @return [Integer] The id number of the component which uses this criterion
  componentId: {
    class: :Integer,
    do_not_send: true,
    readonly: true
  }

}.freeze

Constants inherited from BaseClasses::Criterion

BaseClasses::Criterion::ATTRIBUTES_TO_UPDATE_TOGETHER, BaseClasses::Criterion::TYPES, BaseClasses::Criterion::TYPE_EA, BaseClasses::Criterion::TYPE_RECON

Constants inherited from BaseClasses::JSONObject

BaseClasses::JSONObject::PP_OMITTED_INST_VARS

Instance Attribute Summary collapse

Attributes inherited from BaseClasses::Criterion

#absoluteOrderId, #and_or, #name, #operator, #type, #value

Attributes inherited from BaseClasses::JSONObject

#init_data

Instance Method Summary collapse

Methods included from Mixins::APICollection

#==, #cnx, #container, #create_on_server, #delete, #deleted_id, included, #initialize, #pretty_print_instance_variables, #primary_id, #softwareTitle, #update_on_server

Methods inherited from BaseClasses::Criterion

#initialize, #local_absoluteOrderId=, #to_api

Methods included from Mixins::Immutable

extended, #mutable?

Methods inherited from BaseClasses::JSONObject

attribute_already_parsed?, ident_keys, #initialize, json_attributes, json_attributes_parsed, mutable?, parse_json_attributes, #pretty_print_instance_variables, primary_id_key, required_attributes, #to_api, #to_json, validate_attr

Instance Attribute Details

#componentIdInteger

Returns The id number of the component which uses this criterion.

Returns:

  • (Integer)

    The id number of the component which uses this criterion



# File 'lib/windoo/objects/component_criterion.rb', line 40

#criteriaIdInteger

Returns The id number of this criterion.

Returns:

  • (Integer)

    The id number of this criterion



# File 'lib/windoo/objects/component_criterion.rb', line 31

Instance Method Details

#handle_create_response(post_response, container_id: nil) ⇒ Object

See the section ‘REQUIRED ITEMS WHEN MIXING IN’ in the APICollection mixin.



52
53
54
55
56
# File 'lib/windoo/objects/component_criterion.rb', line 52

def handle_create_response(post_response, container_id: nil)
  @criteriaId = post_response[:criteriaId]
  @componentId = post_response[:componentId]
  @componentId
end

#handle_update_response(_put_response) ⇒ Object

See the section ‘REQUIRED ITEMS WHEN MIXING IN’ in the APICollection mixin.



60
61
62
# File 'lib/windoo/objects/component_criterion.rb', line 60

def handle_update_response(_put_response)
  @criteriaIds
end