Class: Ecoportal::API::GraphQL::Payload::Kickstand::BulkUpdateJobs

Inherits:
Logic::BaseModel show all
Defined in:
lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb

Constant Summary collapse

SCHEMA_VERSION =
'20260605'.freeze

Constants included from Common::GraphQL::Model::Diffable

Common::GraphQL::Model::Diffable::DIFF_CLASS

Instance Method Summary collapse

Methods included from Concerns::SnakeCamelAccess

#method_missing, #respond_to_missing?

Methods included from Common::GraphQL::Model::AsInput

#as_input, included

Methods included from Common::GraphQL::Model::Diffable

#as_update, #dirty?

Methods included from Common::GraphQL::ClassHelpers

included

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ecoportal::API::GraphQL::Concerns::SnakeCamelAccess

Instance Method Details

#error? ⇒ Boolean

Returns:

  • (Boolean)


25
26
27
28
29
30
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb', line 25

def error?
  errs = doc['errors']
  return false if errs.nil?

  !Array(errs).empty?
end

#errors ⇒ Object



17
18
19
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb', line 17

def errors
  @errors ||= Error::ValidationErrors.new(doc['errors'])
end

#items ⇒ Object



13
14
15
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb', line 13

def items
  @items ||= Array(doc['items'] || []).map { |j| job_class.new(j) }
end

#success? ⇒ Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb', line 21

def success?
  !error?
end