Files
strike_me-api/lib/strike_me/api/invoices/invoice.rb
T
2025-10-18 12:37:08 -05:00

27 lines
577 B
Ruby

# frozen_string_literal: true
module StrikeMe
module API
class Invoices
class Invoice < BaseModel
attribute :invoiceId
attribute :amount
attribute :state
attribute :created, :datetime
attribute :description
attribute :issuerId
attribute :receiverId
attribute :payerId
attribute_names.select { _1.end_with? 'Id' }.each do |snake_name|
alias_attribute snake_name.underscore, snake_name
end
def paid?
state == 'PAID'
end
end
end
end
end