Sha256: 6e5f64325fd68cef83dc78b0d443d365817e741dab86972977edf8e6e43d1a4a

Contents?: true

Size: 825 Bytes

Versions: 5

Compression:

Stored size: 825 Bytes

Contents

module ForestLiana
  class StripeCardSerializer
    include JSONAPI::Serializer

    attribute :account
    attribute :account_holder_name
    attribute :account_holder_type
    attribute :bank_name
    attribute :country
    attribute :currency
    attribute :default_for_currency
    attribute :fingerprint
    attribute :last4
    attribute :rooting_number
    attribute :status

    has_one :customer

    def self_link
      "/forest#{super}"
    end

    def type
      @options[:context][:type] || 'stripe_bank_accounts'
    end

    def format_name(attribute_name)
      attribute_name.to_s
    end

    def unformat_name(attribute_name)
      attribute_name.to_s
    end

    def relationship_self_link(attribute_name)
      nil
    end

    def relationship_related_link(attribute_name)
      nil
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
forest_liana-1.3.33 app/serializers/forest_liana/stripe_bank_account_serializer.rb
forest_liana-1.3.32 app/serializers/forest_liana/stripe_bank_account_serializer.rb
forest_liana-1.3.31 app/serializers/forest_liana/stripe_bank_account_serializer.rb
forest_liana-1.3.30 app/serializers/forest_liana/stripe_bank_account_serializer.rb
forest_liana-1.3.29 app/serializers/forest_liana/stripe_bank_account_serializer.rb