Class: SDM::AccountUpdateResponse

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

Overview

AccountUpdateResponse returns the fields of a Account after it has been updated by a AccountUpdateRequest.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(meta: nil, account: nil, rate_limit: nil) ⇒ AccountUpdateResponse

Returns a new instance of AccountUpdateResponse.



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/models/porcelain.rb', line 477

def initialize(
  meta: nil,
  account: nil,
  rate_limit: nil
)
  if meta != nil
    @meta = meta
  end
  if  != nil
    @account = 
  end
  if rate_limit != nil
    @rate_limit = rate_limit
  end
end

Instance Attribute Details

#accountObject

The updated Account.



473
474
475
# File 'lib/models/porcelain.rb', line 473

def 
  @account
end

#metaObject

Reserved for future use.



471
472
473
# File 'lib/models/porcelain.rb', line 471

def meta
  @meta
end

#rate_limitObject

Rate limit information.



475
476
477
# File 'lib/models/porcelain.rb', line 475

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



493
494
495
496
497
498
499
# File 'lib/models/porcelain.rb', line 493

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