Class: MxHero::API::Account
- Inherits:
-
Struct
- Object
- Struct
- MxHero::API::Account
- Defined in:
- lib/resources/account.rb
Instance Attribute Summary collapse
-
#account ⇒ Object
Returns the value of attribute account.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#group ⇒ Object
Returns the value of attribute group.
-
#updated_date ⇒ Object
Returns the value of attribute updated_date.
Instance Method Summary collapse
-
#initialize(elements) ⇒ Account
constructor
A new instance of Account.
- #to_json ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(elements) ⇒ Account
Returns a new instance of Account.
5 6 7 |
# File 'lib/resources/account.rb', line 5 def initialize(elements) elements.each { |prop, value| send("#{prop}=", value) if respond_to?("#{prop}") } end |
Instance Attribute Details
#account ⇒ Object
Returns the value of attribute account
4 5 6 |
# File 'lib/resources/account.rb', line 4 def account @account end |
#created_date ⇒ Object
Returns the value of attribute created_date
4 5 6 |
# File 'lib/resources/account.rb', line 4 def created_date @created_date end |
#domain ⇒ Object
Returns the value of attribute domain
4 5 6 |
# File 'lib/resources/account.rb', line 4 def domain @domain end |
#group ⇒ Object
Returns the value of attribute group
4 5 6 |
# File 'lib/resources/account.rb', line 4 def group @group end |
#updated_date ⇒ Object
Returns the value of attribute updated_date
4 5 6 |
# File 'lib/resources/account.rb', line 4 def updated_date @updated_date end |
Instance Method Details
#to_json ⇒ Object
9 10 11 |
# File 'lib/resources/account.rb', line 9 def to_json { account: account, domain: domain, createdDate: created_date, updatedDate: updated_date, group: group }.to_json end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/resources/account.rb', line 13 def to_s "account: #{account}, domain: #{domain}, group: #{group}" end |