Class: Viglink::Rate

Inherits:
Struct
  • Object
show all
Defined in:
lib/viglink/rate.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



4
5
6
# File 'lib/viglink/rate.rb', line 4

def description
  @description
end

#maxObject

Returns the value of attribute max

Returns:

  • (Object)

    the current value of max



4
5
6
# File 'lib/viglink/rate.rb', line 4

def max
  @max
end

#minObject

Returns the value of attribute min

Returns:

  • (Object)

    the current value of min



4
5
6
# File 'lib/viglink/rate.rb', line 4

def min
  @min
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



4
5
6
# File 'lib/viglink/rate.rb', line 4

def type
  @type
end

#type_nameObject

Returns the value of attribute type_name

Returns:

  • (Object)

    the current value of type_name



4
5
6
# File 'lib/viglink/rate.rb', line 4

def type_name
  @type_name
end

Class Method Details

.from_json(rate) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/viglink/rate.rb', line 6

def self.from_json(rate)
  new min: rate['min'],
      max: rate['max'],
      type: rate['type'],
      type_name: rate['typeName'],
      description: rate['description']
end