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.



8205
8206
8207
8208
8209
8210
8211
# File 'lib/models/porcelain.rb', line 8205

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.



8201
8202
8203
# File 'lib/models/porcelain.rb', line 8201

def group
  @group
end

#rate_limitObject

Rate limit information.



8203
8204
8205
# File 'lib/models/porcelain.rb', line 8203

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



8213
8214
8215
8216
8217
8218
8219
# File 'lib/models/porcelain.rb', line 8213

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