Class: ForestLiana::StripePaymentSerializer

Inherits:
Object
  • Object
show all
Includes:
ForestAdmin::JSONAPI::Serializer
Defined in:
app/serializers/forest_liana/stripe_payment_serializer.rb

Instance Method Summary collapse

Instance Method Details

#format_name(attribute_name) ⇒ Object



22
23
24
# File 'app/serializers/forest_liana/stripe_payment_serializer.rb', line 22

def format_name(attribute_name)
  attribute_name.to_s
end


34
35
36
# File 'app/serializers/forest_liana/stripe_payment_serializer.rb', line 34

def relationship_related_link(attribute_name)
  nil
end


30
31
32
# File 'app/serializers/forest_liana/stripe_payment_serializer.rb', line 30

def relationship_self_link(attribute_name)
  nil
end


14
15
16
# File 'app/serializers/forest_liana/stripe_payment_serializer.rb', line 14

def self_link
  "/forest#{super}"
end

#typeObject



18
19
20
# File 'app/serializers/forest_liana/stripe_payment_serializer.rb', line 18

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

#unformat_name(attribute_name) ⇒ Object



26
27
28
# File 'app/serializers/forest_liana/stripe_payment_serializer.rb', line 26

def unformat_name(attribute_name)
  attribute_name.to_s
end