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



618
619
620
# File 'lib/fizzy/generated/types.rb', line 618

def active
  @active
end

#codeObject (readonly)

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



618
619
620
# File 'lib/fizzy/generated/types.rb', line 618

def code
  @code
end

#urlObject (readonly)

Returns the value of attribute url

Returns:

  • (Object)

    the current value of url



618
619
620
# File 'lib/fizzy/generated/types.rb', line 618

def url
  @url
end

#usage_countObject (readonly)

Returns the value of attribute usage_count

Returns:

  • (Object)

    the current value of usage_count



618
619
620
# File 'lib/fizzy/generated/types.rb', line 618

def usage_count
  @usage_count
end

#usage_limitObject (readonly)

Returns the value of attribute usage_limit

Returns:

  • (Object)

    the current value of usage_limit



618
619
620
# File 'lib/fizzy/generated/types.rb', line 618

def usage_limit
  @usage_limit
end

Class Method Details

.from_json(data) ⇒ Object

Parameters:

  • data (Hash)

    raw JSON response



620
621
622
623
624
625
626
627
628
# File 'lib/fizzy/generated/types.rb', line 620

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