Class: RoyalMailApi::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/royal_mail_api/response.rb

Defined Under Namespace

Classes: Shipment

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



16
17
18
19
# File 'lib/royal_mail_api/response.rb', line 16

def initialize(response)
  @parser = RoyalMailApi::XmlParser.new
  set_attrs(response)
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



3
4
5
# File 'lib/royal_mail_api/response.rb', line 3

def body
  @body
end

#errorsObject

Returns the value of attribute errors.



3
4
5
# File 'lib/royal_mail_api/response.rb', line 3

def errors
  @errors
end

#httpObject

Returns the value of attribute http.



3
4
5
# File 'lib/royal_mail_api/response.rb', line 3

def http
  @http
end

#parserObject

Returns the value of attribute parser.



3
4
5
# File 'lib/royal_mail_api/response.rb', line 3

def parser
  @parser
end

#shipmentsObject

Returns the value of attribute shipments.



3
4
5
# File 'lib/royal_mail_api/response.rb', line 3

def shipments
  @shipments
end

#warningsObject

Returns the value of attribute warnings.



3
4
5
# File 'lib/royal_mail_api/response.rb', line 3

def warnings
  @warnings
end