module Substwirp
  class AdminSubscription < Substwirp::Base
    def self.grant_admin_subscription(user_id, product_id)
      response = twirp_client.grant_admin_subscription(
        user_id: user_id,
        product_id: product_id
      )
      raise response.error.msg if response.error

      self.from_twirp_object(response.data)
    end
  end
end
