Class: SolidusSubscriptions::ChurnBuster::SubscriptionPaymentMethodSerializer
- Inherits:
-
Serializer
- Object
- Serializer
- SolidusSubscriptions::ChurnBuster::SubscriptionPaymentMethodSerializer
- Defined in:
- lib/solidus_subscriptions/churn_buster/subscription_payment_method_serializer.rb
Instance Attribute Summary
Attributes inherited from Serializer
Instance Method Summary collapse
Methods inherited from Serializer
Constructor Details
This class inherits a constructor from SolidusSubscriptions::ChurnBuster::Serializer
Instance Method Details
#to_h ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/solidus_subscriptions/churn_buster/subscription_payment_method_serializer.rb', line 6 def to_h { payment_method: { source: 'in_house', source_id: [ object.payment_method_to_use&.id, object.payment_source_to_use&.id ].compact.join('-'), type: 'card', properties: payment_source_properties, }, customer: SubscriptionCustomerSerializer.serialize(object), } end |