Sha256: 67012afd5458d6431d30d936227ac852f10bb3c873fdaf8f8c411ba7b512a11e
Contents?: true
Size: 610 Bytes
Versions: 8
Compression:
Stored size: 610 Bytes
Contents
module Bs2Api module Payment class Detail < Base attr_reader :success def initialize payment_id @payment_id = payment_id end def call response = detail_request raise Bs2Api::Errors::BadRequest, ::Util::Response.parse_error(response) unless response.ok? Bs2Api::Entities::Payment.from_response(response) end private def url "#{Bs2Api.endpoint}/pix/direto/forintegration/v1/pagamentos/#{@payment_id}" end def detail_request HTTParty.get(url, headers: headers) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems