Class: MxHero::API::Account

Inherits:
Struct
  • Object
show all
Defined in:
lib/resources/account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#accountObject

Returns the value of attribute account

Returns:

  • (Object)

    the current value of account



4
5
6
# File 'lib/resources/account.rb', line 4

def 
  @account
end

#created_dateObject

Returns the value of attribute created_date

Returns:

  • (Object)

    the current value of created_date



4
5
6
# File 'lib/resources/account.rb', line 4

def created_date
  @created_date
end

#domainObject

Returns the value of attribute domain

Returns:

  • (Object)

    the current value of domain



4
5
6
# File 'lib/resources/account.rb', line 4

def domain
  @domain
end

#groupObject

Returns the value of attribute group

Returns:

  • (Object)

    the current value of group



4
5
6
# File 'lib/resources/account.rb', line 4

def group
  @group
end

#updated_dateObject

Returns the value of attribute updated_date

Returns:

  • (Object)

    the current value of updated_date



4
5
6
# File 'lib/resources/account.rb', line 4

def updated_date
  @updated_date
end

Instance Method Details

#to_jsonObject



9
10
11
# File 'lib/resources/account.rb', line 9

def to_json
  { account: , domain: domain, createdDate: created_date, updatedDate: updated_date, group: group }.to_json
end

#to_sObject



13
14
15
# File 'lib/resources/account.rb', line 13

def to_s
  "account: #{}, domain: #{domain}, group: #{group}" 
end