Sha256: d09c4231b188a9482ee8ae826d416f5265e9c0e18afc9e294e934921dae16d6f

Contents?: true

Size: 737 Bytes

Versions: 12

Compression:

Stored size: 737 Bytes

Contents

module Cobrato
  module Resources
    class Payment < Base
      crud :all

      def cancel(id)
        http.post("#{resource_base_path}/#{id}/cancel") do |response|
          respond_with_entity response
        end
      end

      def schema(params)
        http.get("#{resource_base_path}/schema", params: params) do |response|
          parsed_body(response)
        end
      end

      def unauthorize(id)
        http.post("#{resource_base_path}/#{id}/unauthorize") do |response|
          respond_with_entity response
        end
      end

      def register_error(id)
        http.post("#{resource_base_path}/#{id}/register_error") do |response|
          respond_with_entity response
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cobrato-client-1.1.2 lib/cobrato/resources/payment.rb
cobrato-client-1.1.1 lib/cobrato/resources/payment.rb
cobrato-client-1.1.0 lib/cobrato/resources/payment.rb
cobrato-client-1.0.1 lib/cobrato/resources/payment.rb
cobrato-client-1.0.0 lib/cobrato/resources/payment.rb
cobrato-client-0.27.0 lib/cobrato/resources/payment.rb
cobrato-client-0.26.0 lib/cobrato/resources/payment.rb
cobrato-client-0.25.0 lib/cobrato/resources/payment.rb
cobrato-client-0.24.1 lib/cobrato/resources/payment.rb
cobrato-client-0.24.0 lib/cobrato/resources/payment.rb
cobrato-client-0.23.0 lib/cobrato/resources/payment.rb
cobrato-client-0.23.0.beta12 lib/cobrato/resources/payment.rb