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.



10511
10512
10513
10514
10515
10516
10517
10518
10519
# File 'lib/models/porcelain.rb', line 10511

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

Instance Attribute Details

#metaObject

Reserved for future use.



10505
10506
10507
# File 'lib/models/porcelain.rb', line 10505

def meta
  @meta
end

#rate_limitObject

Rate limit information.



10507
10508
10509
# File 'lib/models/porcelain.rb', line 10507

def rate_limit
  @rate_limit
end

#resourceObject

The created Resource.



10509
10510
10511
# File 'lib/models/porcelain.rb', line 10509

def resource
  @resource
end

Instance Method Details

#to_json(options = {}) ⇒ Object



10521
10522
10523
10524
10525
10526
10527
# File 'lib/models/porcelain.rb', line 10521

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