Sha256: 6e73596cf8f26487b62d782c342304f7eb7d453cf7c40db7b0b0c138a32b3432
Contents?: true
Size: 552 Bytes
Versions: 6
Compression:
Stored size: 552 Bytes
Contents
module Workarea module Sezzle class Response def initialize(response) @response = response end def success? @response.present? && (@response.status == 201 || @response.status == 200) end def body return {} unless @response.body.present? && @response.body != 'null' response_body = JSON.parse(@response.body) return response_body.first if response_body.kind_of?(Array) response_body end def status @response.status end end end end
Version data entries
6 entries across 6 versions & 1 rubygems