Sha256: 7c151e13c98b38ee81858dbc76b02a47afe227e3051ba994daf51035d8520dd8
Contents?: true
Size: 640 Bytes
Versions: 6
Compression:
Stored size: 640 Bytes
Contents
# frozen_string_literal: true module SolidusSubscriptions class OrderCreator def initialize(installment) @installment = installment end def call ::Spree::Order.create( user: installment.subscription.user, email: installment.subscription.user.email, store: installment.subscription.store || ::Spree::Store.default, subscription_order: true, subscription: installment.subscription, currency: installment.subscription.currency, **extra_attributes ) end private def extra_attributes {} end attr_reader :installment end end
Version data entries
6 entries across 6 versions & 1 rubygems