Class: SDM::ResourceCreateResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

ResourceCreateResponse reports how the Resources were created in the system.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, rate_limit: nil, resource: nil) ⇒ ResourceCreateResponse

Returns a new instance of ResourceCreateResponse.



6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
# File 'lib/models/porcelain.rb', line 6002

def initialize(
  meta: nil,
  rate_limit: nil,
  resource: nil
)
  if meta != nil
    @meta = meta
  end
  if rate_limit != nil
    @rate_limit = rate_limit
  end
  if resource != nil
    @resource = resource
  end
end

Instance Attribute Details

#metaObject

Reserved for future use.



5996
5997
5998
# File 'lib/models/porcelain.rb', line 5996

def meta
  @meta
end

#rate_limitObject

Rate limit information.



5998
5999
6000
# File 'lib/models/porcelain.rb', line 5998

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



6000
6001
6002
# File 'lib/models/porcelain.rb', line 6000

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6018
6019
6020
6021
6022
6023
6024
# File 'lib/models/porcelain.rb', line 6018

def to_json(options = {})
  hash = {}
  self.instance_variables.each do |var|
    hash[var.id2name.delete_prefix("@")] = self.instance_variable_get var
  end
  hash.to_json
end