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.



483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
# File 'lib/models/porcelain.rb', line 483

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.



480
481
482
# File 'lib/models/porcelain.rb', line 480

def 
  @account
end

#metaObject

Reserved for future use.



478
479
480
# File 'lib/models/porcelain.rb', line 478

def meta
  @meta
end

#rate_limitObject

Rate limit information.



482
483
484
# File 'lib/models/porcelain.rb', line 482

def rate_limit
  @rate_limit
end

Instance Method Details

#to_json(options = {}) ⇒ Object



500
501
502
503
504
505
506
# File 'lib/models/porcelain.rb', line 500

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