Class: Bizowie::API::Response
- Inherits:
-
Object
- Object
- Bizowie::API::Response
- Defined in:
- lib/bizowie/api/response.rb
Overview
Response returned by #call.
Instance Attribute Summary collapse
-
#data ⇒ Hash
readonly
Decoded JSON response body (with
successremoved). -
#success ⇒ Integer
readonly
1on success,0otherwise.
Instance Method Summary collapse
-
#initialize(data:, success:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data:, success:) ⇒ Response
Returns a new instance of Response.
13 14 15 16 |
# File 'lib/bizowie/api/response.rb', line 13 def initialize(data:, success:) @data = data @success = success end |
Instance Attribute Details
#data ⇒ Hash (readonly)
Returns Decoded JSON response body (with success removed). { ‘unprocessed’ => 1 } if the body could not be parsed.
10 11 12 13 14 15 16 17 |
# File 'lib/bizowie/api/response.rb', line 10 class Response attr_reader :data, :success def initialize(data:, success:) @data = data @success = success end end |
#success ⇒ Integer (readonly)
Returns 1 on success, 0 otherwise.
10 11 12 13 14 15 16 17 |
# File 'lib/bizowie/api/response.rb', line 10 class Response attr_reader :data, :success def initialize(data:, success:) @data = data @success = success end end |