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.



4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
# File 'lib/models/porcelain.rb', line 4950

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.



4944
4945
4946
# File 'lib/models/porcelain.rb', line 4944

def meta
  @meta
end

#rate_limitObject

Rate limit information.



4948
4949
4950
# File 'lib/models/porcelain.rb', line 4948

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



4946
4947
4948
# File 'lib/models/porcelain.rb', line 4946

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



4966
4967
4968
4969
4970
4971
4972
# File 'lib/models/porcelain.rb', line 4966

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