Sha256: f80b253a766551b39e792570fa40545dc3e459f29d62e56c34372a2fc8b3d83f

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

module SolidusNexio
  class ApmSource < SolidusSupport.payment_source_parent_class
    self.table_name = 'solidus_nexio_apm_sources'

    belongs_to :user, class_name: Spree::UserClassHandle.new, foreign_key: 'user_id', optional: true

    enum kind: { braintreePayPal: 0 }

    def reusable?
      gateway_payment_profile_id.present?
    end

    def name
      I18n.t("nexio.apms.#{kind.underscore}.name")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_nexio-0.5.1 app/models/solidus_nexio/apm_source.rb
solidus_nexio-0.5.0 app/models/solidus_nexio/apm_source.rb