Class: ForestLiana::StripeSubscriptionSerializer

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

Instance Method Summary collapse

Instance Method Details

#format_name(attribute_name) ⇒ Object



29
30
31
# File 'app/serializers/forest_liana/stripe_subscription_serializer.rb', line 29

def format_name(attribute_name)
  attribute_name.to_s
end


41
42
43
# File 'app/serializers/forest_liana/stripe_subscription_serializer.rb', line 41

def relationship_related_link(attribute_name)
  nil
end


37
38
39
# File 'app/serializers/forest_liana/stripe_subscription_serializer.rb', line 37

def relationship_self_link(attribute_name)
  nil
end


21
22
23
# File 'app/serializers/forest_liana/stripe_subscription_serializer.rb', line 21

def self_link
  "/forest#{super}"
end

#typeObject



25
26
27
# File 'app/serializers/forest_liana/stripe_subscription_serializer.rb', line 25

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

#unformat_name(attribute_name) ⇒ Object



33
34
35
# File 'app/serializers/forest_liana/stripe_subscription_serializer.rb', line 33

def unformat_name(attribute_name)
  attribute_name.to_s
end