lib/purecloudplatformclientv2/models/activity_code.rb in purecloudplatformclientv2-22.0.0 vs lib/purecloudplatformclientv2/models/activity_code.rb in purecloudplatformclientv2-23.0.0

- old
+ new

@@ -17,38 +17,49 @@ require 'date' module PureCloud # Activity code data class ActivityCode - # The activity code's name + # The globally unique identifier for the object. + attr_accessor :id + + # The name of the activity code. Default activity codes will be created with an empty name attr_accessor :name - # Whether this activity code is active or only used for historical schedules + # Whether this activity code is active or has been deleted attr_accessor :is_active # Whether this is a default activity code attr_accessor :is_default - # The activity code's category + # The activity code's category. attr_accessor :category # The default length of the activity in minutes attr_accessor :length_in_minutes # Whether an agent is paid while performing this activity attr_accessor :counts_as_paid_time - # Indicates whether or not the activity should be counted as work time + # Indicates whether or not the activity should be counted as contiguous work time for calculating daily constraints attr_accessor :counts_as_work_time - # Whether an agent can select this activity code when creating or editing a time off request - attr_accessor :is_agent_time_off_selectable + # Whether an agent can select this activity code when creating or editing a time off request. Null if the activity's category is not time off. + attr_accessor :agent_time_off_selectable + # Version metadata for the associated management unit's list of activity codes + attr_accessor :metadata + + # The URI for this object + attr_accessor :self_uri + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { + :'id' => :'id', + :'name' => :'name', :'is_active' => :'isActive', :'is_default' => :'isDefault', @@ -59,19 +70,25 @@ :'counts_as_paid_time' => :'countsAsPaidTime', :'counts_as_work_time' => :'countsAsWorkTime', - :'is_agent_time_off_selectable' => :'isAgentTimeOffSelectable' + :'agent_time_off_selectable' => :'agentTimeOffSelectable', + :'metadata' => :'metadata', + + :'self_uri' => :'selfUri' + } end # Attribute type mapping. def self.swagger_types { + :'id' => :'String', + :'name' => :'String', :'is_active' => :'BOOLEAN', :'is_default' => :'BOOLEAN', @@ -82,12 +99,16 @@ :'counts_as_paid_time' => :'BOOLEAN', :'counts_as_work_time' => :'BOOLEAN', - :'is_agent_time_off_selectable' => :'BOOLEAN' + :'agent_time_off_selectable' => :'BOOLEAN', + :'metadata' => :'WfmVersionedEntityMetadata', + + :'self_uri' => :'String' + } end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -96,10 +117,19 @@ # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} + if attributes.has_key?(:'id') + + + self.id = attributes[:'id'] + + + end + + if attributes.has_key?(:'name') self.name = attributes[:'name'] @@ -159,19 +189,37 @@ end - if attributes.has_key?(:'isAgentTimeOffSelectable') + if attributes.has_key?(:'agentTimeOffSelectable') - self.is_agent_time_off_selectable = attributes[:'isAgentTimeOffSelectable'] + self.agent_time_off_selectable = attributes[:'agentTimeOffSelectable'] end + if attributes.has_key?(:'metadata') + + + self.metadata = attributes[:'metadata'] + + + end + + + if attributes.has_key?(:'selfUri') + + + self.self_uri = attributes[:'selfUri'] + + + end + + end # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properies with the reasons def list_invalid_properties @@ -197,10 +245,14 @@ + + + + allowed_values = ["OnQueueWork", "Break", "Meal", "Meeting", "OffQueueWork", "TimeOff", "Training", "Unavailable", "Unscheduled"] if @category && !allowed_values.include?(@category) return false end @@ -220,10 +272,23 @@ + + if @metadata.nil? + return false + end + + + + + + + + + end @@ -239,10 +304,15 @@ + + + + + # Custom attribute writer method checking allowed values (enum). # @param [Object] category Object to be assigned def category=(category) allowed_values = ["OnQueueWork", "Break", "Meal", "Meeting", "OffQueueWork", "TimeOff", "Training", "Unavailable", "Unscheduled"] if category && !allowed_values.include?(category) @@ -272,23 +342,36 @@ + + + + + + + + + + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && + id == o.id && name == o.name && is_active == o.is_active && is_default == o.is_default && category == o.category && length_in_minutes == o.length_in_minutes && counts_as_paid_time == o.counts_as_paid_time && counts_as_work_time == o.counts_as_work_time && - is_agent_time_off_selectable == o.is_agent_time_off_selectable + agent_time_off_selectable == o.agent_time_off_selectable && + metadata == o.metadata && + self_uri == o.self_uri end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -296,10 +379,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [name, is_active, is_default, category, length_in_minutes, counts_as_paid_time, counts_as_work_time, is_agent_time_off_selectable].hash + [id, name, is_active, is_default, category, length_in_minutes, counts_as_paid_time, counts_as_work_time, agent_time_off_selectable, metadata, self_uri].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash)