Class: SDM::GroupUpdateResponse

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

Overview

groupUpdateResponse returns the fields of a group after it has been updated by a groupUpdateRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of GroupUpdateResponse.



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

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 updated group.



8199
8200
8201
# File 'lib/models/porcelain.rb', line 8199

def group
  @group
end

#rate_limitObject

Rate limit information.



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

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



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

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