Sha256: 1edc3717877b533214a1081d6c0e8108bb431451a421ca56dc804a2bd6dc0958

Contents?: true

Size: 325 Bytes

Versions: 1

Compression:

Stored size: 325 Bytes

Contents

module Workarea
  module Afterpay
    class Response
      def initialize(response)
        @response = response
      end

      def success?
        @response.present? && (@response.status == 201 || @response.status == 200)
      end

      def body
        @body ||= JSON.parse(@response.body)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
workarea-afterpay-2.0.2 lib/workarea/afterpay/response.rb