Sha256: fba91c8bac81147393a1bf1cee90d92a07586a882664b73cd202cfa2efc15a9c

Contents?: true

Size: 874 Bytes

Versions: 8

Compression:

Stored size: 874 Bytes

Contents

require_relative 'model_base'
require_relative 'api_error'

module CorePro
  module Models
    class Envelope < ModelBase
      attr_accessor :data
      attr_accessor :errors
      attr_accessor :status
      attr_accessor :rawRequestBody
      attr_accessor :rawResponseBody

      def from_json! json, classDefs = {}
        classDefs = classDefs || {}
        classDefs['errors'] = ApiError
        super json, classDefs

        if classDefs.has_key?('data')
          if @data.kind_of?(Array)
            @data.each {|item|
              if item.instance_variable_defined?('@requestId')
                item.requestId = @requestId
              end
            }
          else
            if @data.instance_variable_defined?('@requestId')
              @data.requestId = @requestId
            end
          end
        end

        self

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
corepro_fvr-1.0.9 lib/corepro/models/envelope.rb
corepro_eg-1.0.8 lib/corepro/models/envelope.rb
corepro_eg-1.0.7 lib/corepro/models/envelope.rb
corepro_eg-1.0.6 lib/corepro/models/envelope.rb
corepro_eg-1.0.5 lib/corepro/models/envelope.rb
corepro_eg-1.0.4 lib/corepro/models/envelope.rb
corepro_eg-1.0.3 lib/corepro/models/envelope.rb
corepro_eg-1.0.2 lib/corepro/models/envelope.rb