Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-27 19:30:28 +01:00
40 Zeilen
790 B
Ruby
40 Zeilen
790 B
Ruby
# frozen_string_literal: true
|
|
|
|
module DiscourseSubscriptionClient
|
|
def self.find_subscriptions(resource_name)
|
|
end
|
|
end
|
|
|
|
SubscriptionClientSupplier =
|
|
Class.new Object do
|
|
attr_reader :product_slugs
|
|
|
|
def initialize(product_slugs)
|
|
@product_slugs = product_slugs
|
|
end
|
|
end
|
|
|
|
SubscriptionClientResource =
|
|
Class.new Object do
|
|
end
|
|
|
|
SubscriptionClientSubscription =
|
|
Class.new Object do
|
|
attr_reader :product_id
|
|
|
|
def initialize(product_id)
|
|
@product_id = product_id
|
|
end
|
|
end
|
|
|
|
module DiscourseSubscriptionClient
|
|
class Subscriptions
|
|
class Result
|
|
attr_accessor :supplier, :resource, :subscriptions, :products
|
|
|
|
def any?
|
|
supplier.present? && resource.present? && subscriptions.present? && products.present?
|
|
end
|
|
end
|
|
end
|
|
end
|