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, resource: nil, rate_limit: nil) ⇒ ResourceCreateResponse

Returns a new instance of ResourceCreateResponse.



3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
# File 'lib/models/porcelain.rb', line 3877

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

Instance Attribute Details

#metaObject

Reserved for future use.



3871
3872
3873
# File 'lib/models/porcelain.rb', line 3871

def meta
  @meta
end

#rate_limitObject

Rate limit information.



3875
3876
3877
# File 'lib/models/porcelain.rb', line 3875

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



3873
3874
3875
# File 'lib/models/porcelain.rb', line 3873

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



3893
3894
3895
3896
3897
3898
3899
# File 'lib/models/porcelain.rb', line 3893

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