Class: Cronofy::BatchResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/cronofy/types.rb

Defined Under Namespace

Classes: PartialSuccessError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entries) ⇒ BatchResponse

Returns a new instance of BatchResponse.



228
229
230
# File 'lib/cronofy/types.rb', line 228

def initialize(entries)
  @entries = entries
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



226
227
228
# File 'lib/cronofy/types.rb', line 226

def entries
  @entries
end

Instance Method Details

#errorsObject



232
233
234
# File 'lib/cronofy/types.rb', line 232

def errors
  entries.select { |entry| (entry.status % 100) != 2 }
end

#errors?Boolean

Returns:

  • (Boolean)


236
237
238
# File 'lib/cronofy/types.rb', line 236

def errors?
  errors.any?
end