Sha256: fab93cb7975b1dcf16624699f676970ef244d48c67f88fd21ac9062bf250e69b

Contents?: true

Size: 465 Bytes

Versions: 7

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

module SolidusSubscriptions
  module ChurnBuster
    class OrderSerializer < Serializer
      def to_h
        {
          payment: {
            source: 'in_house',
            source_id: object.number,
            amount_in_cents: object.display_total.cents,
            currency: object.currency,
          },
          customer: SubscriptionCustomerSerializer.serialize(object.subscription),
        }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
solidus_subscriptions-2.0.2 lib/solidus_subscriptions/churn_buster/order_serializer.rb
solidus_subscriptions-2.0.1 lib/solidus_subscriptions/churn_buster/order_serializer.rb
solidus_subscriptions-2.0.0 lib/solidus_subscriptions/churn_buster/order_serializer.rb
solidus_subscriptions-1.1.0 lib/solidus_subscriptions/churn_buster/order_serializer.rb
solidus_subscriptions-1.0.1 lib/solidus_subscriptions/churn_buster/order_serializer.rb
solidus_subscriptions-1.0.0 lib/solidus_subscriptions/churn_buster/order_serializer.rb
solidus_subscriptions-1.0.0.rc1 lib/solidus_subscriptions/churn_buster/order_serializer.rb