Class: ForestLiana::StripeInvoiceSerializer

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

Instance Method Summary collapse

Instance Method Details

#format_name(attribute_name) ⇒ Object



31
32
33
# File 'app/serializers/forest_liana/stripe_invoice_serializer.rb', line 31

def format_name(attribute_name)
  attribute_name.to_s
end


43
44
45
# File 'app/serializers/forest_liana/stripe_invoice_serializer.rb', line 43

def relationship_related_link(attribute_name)
  nil
end


39
40
41
# File 'app/serializers/forest_liana/stripe_invoice_serializer.rb', line 39

def relationship_self_link(attribute_name)
  nil
end


23
24
25
# File 'app/serializers/forest_liana/stripe_invoice_serializer.rb', line 23

def self_link
  "/forest#{super}"
end

#typeObject



27
28
29
# File 'app/serializers/forest_liana/stripe_invoice_serializer.rb', line 27

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

#unformat_name(attribute_name) ⇒ Object



35
36
37
# File 'app/serializers/forest_liana/stripe_invoice_serializer.rb', line 35

def unformat_name(attribute_name)
  attribute_name.to_s
end