Class: Sendle::Api::Responses::Json

Inherits:
Object
  • Object
show all
Defined in:
lib/sendle/api/responses/json.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json_string) ⇒ Json

Returns a new instance of Json.



7
8
9
10
# File 'lib/sendle/api/responses/json.rb', line 7

def initialize(json_string)
  @raw = json_string
  @json = JSON.parse(json_string)
end

Instance Attribute Details

#jsonObject (readonly)

Returns the value of attribute json.



5
6
7
# File 'lib/sendle/api/responses/json.rb', line 5

def json
  @json
end

#rawObject (readonly)

Returns the value of attribute raw.



5
6
7
# File 'lib/sendle/api/responses/json.rb', line 5

def raw
  @raw
end