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.



6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
# File 'lib/models/porcelain.rb', line 6046

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.



6040
6041
6042
# File 'lib/models/porcelain.rb', line 6040

def meta
  @meta
end

#rate_limitObject

Rate limit information.



6042
6043
6044
# File 'lib/models/porcelain.rb', line 6042

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



6044
6045
6046
# File 'lib/models/porcelain.rb', line 6044

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



6062
6063
6064
6065
6066
6067
6068
# File 'lib/models/porcelain.rb', line 6062

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