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.



4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
# File 'lib/models/porcelain.rb', line 4451

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.



4445
4446
4447
# File 'lib/models/porcelain.rb', line 4445

def meta
  @meta
end

#rate_limitObject

Rate limit information.



4449
4450
4451
# File 'lib/models/porcelain.rb', line 4449

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



4447
4448
4449
# File 'lib/models/porcelain.rb', line 4447

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



4467
4468
4469
4470
4471
4472
4473
# File 'lib/models/porcelain.rb', line 4467

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