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



7226
7227
7228
7229
7230
7231
7232
# File 'lib/models/porcelain.rb', line 7226

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.



7222
7223
7224
# File 'lib/models/porcelain.rb', line 7222

def group
  @group
end

#rate_limitObject

Rate limit information.



7224
7225
7226
# File 'lib/models/porcelain.rb', line 7224

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



7234
7235
7236
7237
7238
7239
7240
# File 'lib/models/porcelain.rb', line 7234

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