Sha256: f2d590c7a060743b4003f77bdddfc1ca65e375453e991fe76508a42389393551

Contents?: true

Size: 806 Bytes

Versions: 3

Compression:

Stored size: 806 Bytes

Contents

module Mollie
	module API
		module Object
			class Payment < Base
				STATUS_OPEN      = "open"
				STATUS_CANCELLED = "cancelled"
				STATUS_EXPIRED   = "expired"
				STATUS_PAID      = "paid"
				STATUS_PAIDOUT   = "paidout"

				attr_accessor :id,
				              :status,
				              :mode,
				              :amount,
				              :description,
				              :method,
				              :createdDatetime,
				              :paidDatetime,
				              :epiredDatetime,
				              :cancelledDatetime,
				              :metadata,
				              :details,
				              :links

				def open? ()
					@status == STATUS_OPEN
				end

				def paid? ()
					!@paidDatetime.nil?
				end

				def getPaymentUrl ()
					@links && @links.paymentUrl
				end
			end
		end
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mollie-api-ruby-1.1.1 lib/Mollie/API/Object/Payment.rb
mollie-api-ruby-1.1.0 lib/Mollie/API/Object/Payment.rb
mollie-api-ruby-1.0.1 lib/Mollie/API/Object/Payment.rb