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.



5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
# File 'lib/models/porcelain.rb', line 5849

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.



5843
5844
5845
# File 'lib/models/porcelain.rb', line 5843

def meta
  @meta
end

#rate_limitObject

Rate limit information.



5847
5848
5849
# File 'lib/models/porcelain.rb', line 5847

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



5845
5846
5847
# File 'lib/models/porcelain.rb', line 5845

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



5865
5866
5867
5868
5869
5870
5871
# File 'lib/models/porcelain.rb', line 5865

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