Class: Fizzy::Types::JoinCode

Inherits:
Data
  • Object
show all
Defined in:
lib/fizzy/generated/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#activeObject (readonly)

Returns the value of attribute active

Returns:

  • (Object)

    the current value of active



629
630
631
# File 'lib/fizzy/generated/types.rb', line 629

def active
  @active
end

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



629
630
631
# File 'lib/fizzy/generated/types.rb', line 629

def code
  @code
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



629
630
631
# File 'lib/fizzy/generated/types.rb', line 629

def url
  @url
end

#usage_countObject (readonly)

Returns the value of attribute usage_count

Returns:

  • (Object)

    the current value of usage_count



629
630
631
# File 'lib/fizzy/generated/types.rb', line 629

def usage_count
  @usage_count
end

#usage_limitObject (readonly)

Returns the value of attribute usage_limit

Returns:

  • (Object)

    the current value of usage_limit



629
630
631
# File 'lib/fizzy/generated/types.rb', line 629

def usage_limit
  @usage_limit
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



631
632
633
634
635
636
637
638
639
# File 'lib/fizzy/generated/types.rb', line 631

def self.from_json(data)
  new(
    code: data["code"],
    url: data["url"],
    usage_count: data["usage_count"],
    usage_limit: data["usage_limit"],
    active: data["active"]
  )
end