Class: SDM::GroupCreateResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/models/porcelain.rb

Overview

GroupCreateResponse reports the result of a create.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(group: nil, rate_limit: nil) ⇒ GroupCreateResponse

Returns a new instance of GroupCreateResponse.



8371
8372
8373
8374
8375
8376
8377
# File 'lib/models/porcelain.rb', line 8371

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

Instance Attribute Details

#groupObject

The created Group.



8367
8368
8369
# File 'lib/models/porcelain.rb', line 8367

def group
  @group
end

#rate_limitObject

Rate limit information.



8369
8370
8371
# File 'lib/models/porcelain.rb', line 8369

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8379
8380
8381
8382
8383
8384
8385
# File 'lib/models/porcelain.rb', line 8379

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